diff --git a/.github/workflows/library_rust_tests.yml b/.github/workflows/library_rust_tests.yml index 55b2b90a1..f193213d2 100644 --- a/.github/workflows/library_rust_tests.yml +++ b/.github/workflows/library_rust_tests.yml @@ -114,4 +114,4 @@ jobs: working-directory: ./${{ matrix.library }}/runtimes/rust/ shell: bash run: | - cargo run --example main + cargo run --release --example main diff --git a/DynamoDbEncryption/runtimes/rust/src/intercept.rs b/DynamoDbEncryption/runtimes/rust/src/intercept.rs index 50395a38d..4ab4738d2 100644 --- a/DynamoDbEncryption/runtimes/rust/src/intercept.rs +++ b/DynamoDbEncryption/runtimes/rust/src/intercept.rs @@ -4,6 +4,7 @@ #![deny(warnings, unconditional_panic)] #![deny(nonstandard_style)] #![deny(clippy::all)] +#![allow(unused)] use aws_sdk_dynamodb::{ config::{ diff --git a/DynamoDbEncryption/runtimes/rust/src/lib.rs b/DynamoDbEncryption/runtimes/rust/src/lib.rs index 451e83e2c..eeea2b4b4 100644 --- a/DynamoDbEncryption/runtimes/rust/src/lib.rs +++ b/DynamoDbEncryption/runtimes/rust/src/lib.rs @@ -46,22 +46,22 @@ pub(crate) use crate::implementation_from_dafny::HMAC; pub(crate) use crate::implementation_from_dafny::UTF8; pub(crate) use crate::implementation_from_dafny::UUID; -pub mod aes_gcm; -pub mod aes_kdf_ctr; -pub mod concurrent_call; -pub mod dafny_libraries; -pub mod ddb; -pub mod digest; -pub mod ecdh; -pub mod ecdsa; -pub mod hmac; +pub(crate) mod aes_gcm; +pub(crate) mod aes_kdf_ctr; +pub(crate) mod concurrent_call; +pub(crate) mod dafny_libraries; +pub(crate) mod ddb; +pub(crate) mod digest; +pub(crate) mod ecdh; +pub(crate) mod ecdsa; +pub(crate) mod hmac; pub mod intercept; -pub mod kms; -pub mod local_cmc; -pub mod random; -pub mod rsa; -pub mod sets; -pub mod software_externs; -pub mod storm_tracker; -pub mod time; -pub mod uuid; +pub(crate) mod kms; +pub(crate) mod local_cmc; +pub(crate) mod random; +pub(crate) mod rsa; +pub(crate) mod sets; +pub(crate) mod software_externs; +pub(crate) mod storm_tracker; +pub(crate) mod time; +pub(crate) mod uuid; diff --git a/releases/rust/db_esdk/.gitignore b/releases/rust/db_esdk/.gitignore new file mode 100644 index 000000000..fa8d85ac5 --- /dev/null +++ b/releases/rust/db_esdk/.gitignore @@ -0,0 +1,2 @@ +Cargo.lock +target diff --git a/releases/rust/db_esdk/.gitignore~ b/releases/rust/db_esdk/.gitignore~ new file mode 100644 index 000000000..f39a07024 --- /dev/null +++ b/releases/rust/db_esdk/.gitignore~ @@ -0,0 +1,35 @@ +*.pem +Cargo.lock +src/aes_gcm.rs +src/aes_kdf_ctr.rs +src/client +src/client.rs +src/concurrent_call.rs +src/conversions +src/conversions.rs +src/dafny_libraries.rs +src/ddb.rs +src/deps +src/deps.rs +src/digest.rs +src/ecdh.rs +src/ecdsa.rs +src/error +src/error.rs +src/hmac.rs +src/implementation_from_dafny.rs +src/kms.rs +src/local_cmc.rs +src/operation +src/operation.rs +src/random.rs +src/rsa.rs +src/sets.rs +src/standard_library_conversions.rs +src/standard_library_externs.rs +src/storm_tracker.rs +src/time.rs +src/types +src/types.rs +src/uuid.rs +target diff --git a/releases/rust/db_esdk/Cargo.toml b/releases/rust/db_esdk/Cargo.toml new file mode 100644 index 000000000..e63880bf1 --- /dev/null +++ b/releases/rust/db_esdk/Cargo.toml @@ -0,0 +1,34 @@ +[package] +name = "aws-db-esdk" +version = "0.1.0" +edition = "2021" +rust-version = "1.80.0" +keywords = ["crypto", "cryptography", "security", "dynamodb", "ddb", "encryption", "client-side", "clientside"] +license = "ISC AND (Apache-2.0 OR ISC)" +description = "aws-db-esdk is a library for implementing client side encryption with DynamoDB." +homepage = "https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/releases/rust/db_esdk" +repository = "https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/releases/rust/db_esdk" +authors = ["AWS-CryptoTools"] +documentation = "https://docs.rs/crate/aws-db-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.54.0" +aws-sdk-kms = "1.50.0" +aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] } +aws-smithy-types = "1.2.9" +chrono = "0.4.38" +dafny_runtime = { path = "./dafny_runtime_rust"} +dashmap = "6.1.0" +pem = "3.0.4" +tokio = {version = "1.41.1", features = ["full"] } +uuid = { version = "1.11.0", features = ["v4"] } + +[[example]] +name = "main" diff --git a/releases/rust/db_esdk/README.md b/releases/rust/db_esdk/README.md new file mode 100644 index 000000000..3244a4cc9 --- /dev/null +++ b/releases/rust/db_esdk/README.md @@ -0,0 +1,65 @@ +# AWS Database Encryption SDK for DynamoDB + +AWS Database Encryption SDK for DynamoDB + +## Using the AWS Database Encryption SDK for DynamoDB for Rust + +The AWS Database Encryption SDK for DynamoDB is available on [Crates.io](https://www.crates.io/). + +## Building the AWS Database Encryption SDK for DynamoDB + +To build, the AWS Database Encryption SDK for DynamoDB requires the most up to date version of [Dafny](https://github.com/dafny-lang/dafny) on your PATH. + +You will also need to ensure that you fetch all submodules using either `git clone --recursive ...` when cloning the repository or `git submodule update --init` on an existing clone. + +To setup your project to use the AWS Database Encryption SDK for DynamoDB in Rust, run: + +``` +cd DynamoDbEncryption +# Polymorph smithy to Rust +make polymorph_rust +# Transpile Dafny to Rust +make transpile_rust +# Build Project +cd runtimes/rust +cargo build +``` + +### (Optional) Set up the AWS Database Encryption SDK for DynamoDB to work with AWS KMS + +If you set up the AWS Database Encryption SDK for DynamoDB to use the AWS KMS Keyring, +the AWS Database Encryption SDK for DynamoDB will make calls to AWS KMS on your behalf, +using the appropriate AWS SDK. + +However, you must first set up AWS credentials for use with the AWS SDK. + +## Testing the AWS Database Encryption SDK for DynamoDB for Rust + +### Configure AWS credentials + +To run the test suite you must first set up AWS credentials for use with the AWS SDK. +This is required in order to run the integration tests, which use a KMS Keyring against a publicly accessible KMS CMK. + +### Run the tests + +Run the test suite with: + +``` +cd 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/db_esdk/dafny_runtime_rust/.gitignore b/releases/rust/db_esdk/dafny_runtime_rust/.gitignore new file mode 100644 index 000000000..2f7896d1d --- /dev/null +++ b/releases/rust/db_esdk/dafny_runtime_rust/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml b/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml new file mode 100644 index 000000000..d5244c747 --- /dev/null +++ b/releases/rust/db_esdk/dafny_runtime_rust/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "dafny_runtime" +version = "0.1.0" +edition = "2021" + +[dependencies] +once_cell = "1.18.0" +num = "0.4" +itertools = "0.11.0" diff --git a/releases/rust/db_esdk/dafny_runtime_rust/src/lib.rs b/releases/rust/db_esdk/dafny_runtime_rust/src/lib.rs new file mode 100644 index 000000000..fc267756b --- /dev/null +++ b/releases/rust/db_esdk/dafny_runtime_rust/src/lib.rs @@ -0,0 +1,4071 @@ +#[cfg(test)] +mod tests; + +mod system; +pub use mem::MaybeUninit; +use num::{bigint::ParseBigIntError, Integer, Num, One, Signed}; +pub use once_cell::unsync::Lazy; +use std::{ + any::Any, + borrow::Borrow, + boxed::Box, + cell::{RefCell, UnsafeCell}, + clone::Clone, + cmp::Ordering, + collections::{HashMap, HashSet}, + convert::From, + fmt::{Debug, Display, Formatter}, + hash::{Hash, Hasher}, + ptr::NonNull, + mem, + ops::{Add, Deref, Div, Fn, Mul, Neg, Rem, Sub}, + rc::{Rc, Weak}, + vec::Vec, +}; + +pub use system::*; + +pub use itertools; +pub use num::bigint::BigInt; +pub use num::rational::BigRational; +pub use num::FromPrimitive; +pub use num::NumCast; +pub use num::ToPrimitive; +pub use num::Zero; +pub use std::convert::Into; + +// An atomic box is just a RefCell in Rust +pub type SizeT = usize; + +pub trait DafnyType: Clone + DafnyPrint + 'static {} + +impl DafnyType for T where T: Clone + DafnyPrint + 'static {} +pub trait DafnyTypeEq: DafnyType + Hash + Eq {} + +impl DafnyTypeEq for T where T: DafnyType + Hash + Eq {} + +// Dafny's type (0) compiles to NontrivialDefault to prevent subset types from being considered as Default if their witness is nonzero +pub trait NontrivialDefault { + fn nontrivial_default() -> Self; +} + +pub mod dafny_runtime_conversions { + use crate::DafnyType; + use crate::DafnyTypeEq; + pub type DafnyInt = crate::DafnyInt; + pub type DafnySequence = crate::Sequence; + pub type DafnyMap = crate::Map; + pub type DafnySet = crate::Set; + pub type DafnyMultiset = crate::Multiset; + pub type DafnyBool = bool; + pub type DafnyChar = crate::DafnyChar; + pub type DafnyCharUTF16 = crate::DafnyCharUTF16; + + use num::BigInt; + use num::ToPrimitive; + + use std::collections::HashMap; + use std::collections::HashSet; + use std::hash::Hash; + use std::rc::Rc; + + pub mod object { + pub type DafnyClass = crate::Object; + pub type DafnyArray = crate::Object<[T]>; + pub type DafnyArray2 = crate::Object>; + pub type DafnyArray3 = crate::Object>; + // Conversion to and from Dafny reference-counted classes. All these methods take ownership of the class. + pub fn dafny_class_to_struct(ptr: DafnyClass) -> T { + let t: &T = crate::rd!(ptr); + t.clone() + } + pub fn dafny_class_to_boxed_struct(ptr: DafnyClass) -> Box { + Box::new(dafny_class_to_struct(ptr)) + } + pub unsafe fn dafny_class_to_rc_struct(ptr: DafnyClass) -> ::std::rc::Rc { + crate::rcmut::to_rc(ptr.0.unwrap()) + } + pub fn struct_to_dafny_class(t: T) -> DafnyClass { + crate::Object::new(t) + } + pub fn boxed_struct_to_dafny_class(t: Box) -> DafnyClass { + struct_to_dafny_class(*t) + } + pub unsafe fn rc_struct_to_dafny_class(t: ::std::rc::Rc) -> DafnyClass { + crate::Object::from_rc(t) + } + // Conversions to and from Dafny arrays. They all take ownership + pub unsafe fn dafny_array_to_vec(ptr: DafnyArray) -> Vec { + ptr.as_ref().to_vec() + } + pub fn vec_to_dafny_array(array: Vec) -> DafnyArray { + // SAFETY: We own the array + unsafe { + crate::Object::from_rc(::std::rc::Rc::from(array.into_boxed_slice())) + } + } + pub unsafe fn dafny_array2_to_vec(ptr: DafnyArray2) -> Vec> { + crate::rd!(ptr).to_vec() + } + } + + pub mod ptr { + pub type DafnyClass = crate::Ptr; + pub type DafnyArray = crate::Ptr<[T]>; + pub type DafnyArray2 = crate::Ptr>; + pub type DafnyArray3 = crate::Ptr>; + // Conversion to and from Dafny reference-counted classes. All these methods take ownership of the class. + pub unsafe fn dafny_class_to_struct(ptr: DafnyClass) -> T { + *dafny_class_to_boxed_struct(ptr) + } + pub unsafe fn dafny_class_to_boxed_struct(ptr: DafnyClass) -> Box { + Box::from_raw(crate::Ptr::into_raw(ptr)) + } + pub fn struct_to_dafny_class(t: T) -> DafnyClass { + boxed_struct_to_dafny_class(Box::new(t)) + } + pub fn boxed_struct_to_dafny_class(t: Box) -> DafnyClass { + crate::Ptr::from_raw_nonnull(Box::into_raw(t)) + } + // Conversions to and from Dafny arrays. They all take ownership + pub unsafe fn dafny_array_to_vec(ptr: DafnyArray) -> Vec { + ptr.as_ref().to_vec() + } + pub fn vec_to_dafny_array(array: Vec) -> DafnyArray { + crate::Ptr::from_box(array.into_boxed_slice()) + } + pub unsafe fn dafny_array2_to_vec(ptr: DafnyArray2) -> Vec> { + Box::from_raw(crate::Ptr::into_raw(ptr)).to_vec() + } + } + + pub fn dafny_int_to_bigint(i: &DafnyInt) -> BigInt { + i.data.as_ref().clone() + } + pub fn bigint_to_dafny_int(i: &BigInt) -> DafnyInt { + DafnyInt { + data: Rc::new(i.clone()), + } + } + + pub fn dafny_sequence_to_vec(s: &DafnySequence, elem_converter: fn(&T) -> X) -> Vec + where + T: DafnyType, + { + let mut array: Vec = Vec::with_capacity(s.cardinality_usize()); + DafnySequence::::append_recursive(&mut array, s); + array.iter().map(|x| elem_converter(x)).collect() + } + + // Used for external conversions + pub fn vec_to_dafny_sequence( + array: &Vec, + elem_converter: fn(&X) -> T, + ) -> DafnySequence + where + T: DafnyType, + { + let mut result: Vec = Vec::with_capacity(array.len()); + for elem in array.iter() { + result.push(elem_converter(elem)); + } + DafnySequence::::from_array_owned(result) + } + + pub fn dafny_map_to_hashmap( + m: &DafnyMap, + converter_k: fn(&K) -> K2, + converter_v: fn(&V) -> V2, + ) -> HashMap + where + K: DafnyTypeEq, + V: DafnyTypeEq, + K2: Eq + Hash, + V2: Clone, + { + m.to_hashmap_owned(converter_k, converter_v) + } + + pub fn hashmap_to_dafny_map( + map: &HashMap, + converter_k: fn(&K2) -> K, + converter_v: fn(&V2) -> V, + ) -> DafnyMap + where + K: DafnyTypeEq, + V: DafnyTypeEq, + K2: Eq + Hash, + V2: Clone, + { + DafnyMap::::from_hashmap(map, converter_k, converter_v) + } + + // --unicode-char:true + pub mod unicode_chars_true { + use crate::Sequence; + + type DafnyChar = crate::DafnyChar; + type DafnyString = Sequence; + + pub fn string_to_dafny_string(s: &str) -> DafnyString { + Sequence::from_array_owned(s.chars().map(|v| crate::DafnyChar(v)).collect()) + } + pub fn dafny_string_to_string(s: &DafnyString) -> String { + let characters = s.to_array(); + characters.iter().map(|v| v.0).collect::() + } + } + + // --unicode-char:false + pub mod unicode_chars_false { + use crate::Sequence; + + type DafnyCharUTF16 = crate::DafnyCharUTF16; + type DafnyString = Sequence; + + pub fn string_to_dafny_string(s: &str) -> DafnyString { + Sequence::from_array_owned(s.encode_utf16().map(|v| crate::DafnyCharUTF16(v)).collect()) + } + pub fn dafny_string_to_string(s: &DafnyString) -> String { + let characters = s + .to_array() + .as_ref() + .iter() + .map(|v| v.0) + .collect::>(); + String::from_utf16_lossy(&characters) + } + } + + pub fn set_to_dafny_set( + set: &HashSet, + converter: fn(&U) -> T, + ) -> DafnySet { + DafnySet::from_iterator(set.iter().map(converter)) + } + pub fn dafny_set_to_set(set: &DafnySet, converter: fn(&T) -> U) -> HashSet + where + T: DafnyTypeEq, + U: Clone + Eq + Hash, + { + let mut result: HashSet = HashSet::new(); + for s in set.data.iter() { + result.insert(converter(s)); + } + result + } + + pub fn dafny_multiset_to_owned_vec( + ms: &DafnyMultiset, + converter: fn(&T) -> U, + ) -> Vec + where + T: DafnyTypeEq, + U: Clone + Eq, + { + let mut result: Vec = Vec::new(); + for s in ms.data.iter() { + // Push T as many times as its size + for _ in 0..s.1.data.to_usize().unwrap() { + result.push(converter(&s.0)); + } + } + result + } + + pub fn vec_to_dafny_multiset(vec: &Vec, converter: fn(&U) -> T) -> DafnyMultiset + where + T: DafnyTypeEq, + U: Clone + Eq + Hash, + { + DafnyMultiset::from_iterator(vec.into_iter().map(|u: &U| converter(u))) + } +} + +pub trait DafnyUsize { + fn into_usize(self) -> usize; +} + +// ************** +// Dafny integers +// ************** + +// Zero-cost abstraction over a Rc +#[derive(Clone)] +pub struct DafnyInt { + data: Rc, +} + +impl DafnyInt { + pub fn new(data: Rc) -> DafnyInt { + DafnyInt { data } + } + pub fn as_usize(&self) -> usize { + self.to_usize().unwrap() + } +} + +impl DafnyUsize for DafnyInt { + fn into_usize(self) -> usize { + self.as_usize() + } +} + +impl AsRef for DafnyInt { + fn as_ref(&self) -> &BigInt { + &self.data + } +} + +// truncate_u(x, u64) +// = ::to_u128(&x).unwrap() as u64; +#[macro_export] +macro_rules! truncate { + ($x:expr, $t:ty) => { + <$crate::DafnyInt as ::std::convert::Into<$t>>::into($x) + }; +} + +impl Into for DafnyInt { + fn into(self) -> u8 { + self.data.to_u8().unwrap() + } +} +impl Into for DafnyInt { + fn into(self) -> u16 { + self.data.to_u16().unwrap() + } +} +impl Into for DafnyInt { + fn into(self) -> u32 { + self.data.to_u32().unwrap() + } +} +impl Into for DafnyInt { + fn into(self) -> u64 { + self.data.to_u64().unwrap() + } +} +impl Into for DafnyInt { + fn into(self) -> u128 { + self.data.to_u128().unwrap() + } +} +impl Into for DafnyInt { + fn into(self) -> i8 { + self.data.to_i8().unwrap() + } +} +impl Into for DafnyInt { + fn into(self) -> i16 { + self.data.to_i16().unwrap() + } +} +impl Into for DafnyInt { + fn into(self) -> i32 { + self.data.to_i32().unwrap() + } +} +impl Into for DafnyInt { + fn into(self) -> i64 { + self.data.to_i64().unwrap() + } +} +impl Into for DafnyInt { + fn into(self) -> i128 { + self.data.to_i128().unwrap() + } +} +impl Into for DafnyInt { + fn into(self) -> usize { + self.data.to_usize().unwrap() + } +} + +impl ToPrimitive for DafnyInt { + fn to_i64(&self) -> Option { + self.data.to_i64() + } + + fn to_u64(&self) -> Option { + self.data.to_u64() + } + + // Override of functions + fn to_u128(&self) -> Option { + self.data.to_u128() + } + + fn to_i128(&self) -> Option { + self.data.to_i128() + } +} + +impl Default for DafnyInt { + fn default() -> Self { + DafnyInt::new(Rc::new(BigInt::zero())) + } +} + +impl NontrivialDefault for DafnyInt { + fn nontrivial_default() -> Self { + Self::default() + } +} + +impl PartialEq for DafnyInt { + fn eq(&self, other: &DafnyInt) -> bool { + self.data.eq(&other.data) + } +} +impl Eq for DafnyInt {} +impl Hash for DafnyInt { + fn hash(&self, state: &mut H) { + self.data.hash(state); + } +} + +impl DafnyPrint for DafnyInt { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "{}", self.data) + } +} + +impl ::std::fmt::Debug for DafnyInt { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.data) + } +} + +impl Add for DafnyInt { + type Output = DafnyInt; + + fn add(self, rhs: DafnyInt) -> Self::Output { + DafnyInt { + data: Rc::new(self.data.as_ref() + rhs.data.as_ref()), + } + } +} + +impl Mul for DafnyInt { + type Output = DafnyInt; + + fn mul(self, rhs: DafnyInt) -> Self::Output { + DafnyInt { + data: Rc::new(self.data.as_ref() * rhs.data.as_ref()), + } + } +} + +impl Div for DafnyInt { + type Output = DafnyInt; + + fn div(self, rhs: DafnyInt) -> Self::Output { + DafnyInt { + data: Rc::new(self.data.as_ref() / rhs.data.as_ref()), + } + } +} + +impl Sub for DafnyInt { + type Output = DafnyInt; + + fn sub(self, rhs: DafnyInt) -> Self::Output { + DafnyInt { + data: Rc::new(self.data.as_ref() - rhs.data.as_ref()), + } + } +} +impl Rem for DafnyInt { + type Output = DafnyInt; + + fn rem(self, rhs: DafnyInt) -> Self::Output { + DafnyInt { + data: Rc::new(self.data.as_ref() % rhs.data.as_ref()), + } + } +} +impl Neg for DafnyInt { + type Output = DafnyInt; + + #[inline] + fn neg(self) -> Self::Output { + DafnyInt { + data: Rc::new(-self.data.as_ref()), + } + } +} +impl Zero for DafnyInt { + #[inline] + fn zero() -> Self { + DafnyInt { + data: Rc::new(BigInt::zero()), + } + } + #[inline] + fn is_zero(&self) -> bool { + self.data.is_zero() + } +} +impl One for DafnyInt { + #[inline] + fn one() -> Self { + DafnyInt { + data: Rc::new(BigInt::one()), + } + } +} +impl Num for DafnyInt { + type FromStrRadixErr = ParseBigIntError; + + #[inline] + fn from_str_radix(s: &str, radix: u32) -> Result { + Ok(DafnyInt { + data: Rc::new(BigInt::from_str_radix(s, radix)?), + }) + } +} +impl Ord for DafnyInt { + #[inline] + fn cmp(&self, other: &Self) -> Ordering { + self.data.cmp(&other.data) + } +} +impl Signed for DafnyInt { + #[inline] + fn abs(&self) -> Self { + DafnyInt { + data: Rc::new(self.data.as_ref().abs()), + } + } + + #[inline] + fn abs_sub(&self, other: &Self) -> Self { + DafnyInt { + data: Rc::new(self.data.as_ref().abs_sub(other.data.as_ref())), + } + } + + #[inline] + fn signum(&self) -> Self { + DafnyInt { + data: Rc::new(self.data.as_ref().signum()), + } + } + + #[inline] + fn is_positive(&self) -> bool { + self.data.as_ref().is_positive() + } + + #[inline] + fn is_negative(&self) -> bool { + self.data.as_ref().is_negative() + } +} + +// Comparison +impl PartialOrd for DafnyInt { + #[inline] + fn partial_cmp(&self, other: &DafnyInt) -> Option { + self.data.partial_cmp(&other.data) + } +} + +impl DafnyInt { + #[inline] + pub fn parse_bytes(number: &[u8], radix: u32) -> DafnyInt { + DafnyInt { + data: ::std::rc::Rc::new(BigInt::parse_bytes(number, radix).unwrap()), + } + } + pub fn from_usize(usize: usize) -> DafnyInt { + DafnyInt { + data: Rc::new(BigInt::from(usize)), + } + } + pub fn from_i32(i: i32) -> DafnyInt { + DafnyInt { + data: Rc::new(BigInt::from(i)), + } + } +} + +macro_rules! impl_dafnyint_from { + () => {}; + ($type:ident) => { + impl ::std::convert::From<$type> for $crate::DafnyInt { + fn from(n: $type) -> Self { + $crate::DafnyInt { + data: ::std::rc::Rc::new(n.into()), + } + } + } + impl $crate::DafnyUsize for $type { + fn into_usize(self) -> usize { + self as usize + } + } + }; +} + +impl_dafnyint_from! { u8 } +impl_dafnyint_from! { u16 } +impl_dafnyint_from! { u32 } +impl_dafnyint_from! { u64 } +impl_dafnyint_from! { u128 } +impl_dafnyint_from! { i8 } +impl_dafnyint_from! { i16 } +impl_dafnyint_from! { i32 } +impl_dafnyint_from! { i64 } +impl_dafnyint_from! { i128 } +impl_dafnyint_from! { usize } + +impl<'a> From<&'a [u8]> for DafnyInt { + fn from(number: &[u8]) -> Self { + DafnyInt::parse_bytes(number, 10) + } +} + +// Now the same but for &[u8, N] for any kind of such references +impl<'a, const N: usize> From<&'a [u8; N]> for DafnyInt { + fn from(number: &[u8; N]) -> Self { + DafnyInt::parse_bytes(number, 10) + } +} + +impl From for DafnyInt { + fn from(c: char) -> Self { + let cu32: u32 = c.into(); + int!(cu32) + } +} + +impl From for DafnyInt { + fn from(c: DafnyChar) -> Self { + int!(c.0) + } +} + +impl From for DafnyInt { + fn from(c: DafnyCharUTF16) -> Self { + int!(c.0) + } +} + +// ************** +// Immutable sequences +// ************** + +impl Eq for Sequence {} + +impl Add<&Sequence> for &Sequence { + type Output = Sequence; + + fn add(self, rhs: &Sequence) -> Self::Output { + Sequence::new_concat_sequence(self, rhs) + } +} + +impl Hash for Sequence { + fn hash(&self, state: &mut H) { + self.cardinality_usize().hash(state); + let array = self.to_array(); + // Iterate over the elements + for elt in array.iter() { + elt.hash(state); + } + } +} + +// Clone can be derived automatically +#[derive(Clone)] +pub enum Sequence +where + T: DafnyType, +{ + ArraySequence { + // Values could be a native array because we will know statically that all + // accesses are in bounds when using this data structure + values: Rc>, + }, + ConcatSequence { + left: Rc>>, + right: Rc>>, + length: SizeT, + boxed: Rc>>>>, + }, +} + +impl Sequence +where + T: DafnyType, +{ + pub fn from_array(values: Ptr<[T]>) -> Sequence { + let mut v = vec![]; + v.extend_from_slice(read!(values)); + Sequence::ArraySequence { + values: Rc::new(v), + } + } + pub fn from_array_object(values: &Object<[T]>) -> Sequence { + let mut v = vec![]; + v.extend_from_slice(rd!(values)); + Sequence::ArraySequence { + values: Rc::new(v), + } + } + pub fn from_array_slice(values: Ptr<[T]>, start: &DafnyInt, end: &DafnyInt) -> Sequence { + let mut v = vec![]; + v.extend_from_slice(&read!(values)[start.to_usize().unwrap()..end.to_usize().unwrap()]); + Sequence::ArraySequence { + values: Rc::new(v), + } + } + pub fn from_array_slice_object(values: &Object<[T]>, start: &DafnyInt, end: &DafnyInt) -> Sequence { + let mut v = vec![]; + v.extend_from_slice(&rd!(values)[start.to_usize().unwrap()..end.to_usize().unwrap()]); + Sequence::ArraySequence { + values: Rc::new(v), + } + } + pub fn from_array_take(values: Ptr<[T]>, n: &DafnyInt) -> Sequence { + let mut v = vec![]; + v.extend_from_slice(&read!(values)[..n.to_usize().unwrap()]); + Sequence::ArraySequence { + values: Rc::new(v), + } + } + pub fn from_array_take_object(values: &Object<[T]>, n: &DafnyInt) -> Sequence { + let mut v = vec![]; + v.extend_from_slice(&rd!(values)[..n.to_usize().unwrap()]); + Sequence::ArraySequence { + values: Rc::new(v), + } + } + pub fn from_array_drop(values: Ptr<[T]>, n: &DafnyInt) -> Sequence { + let mut v = vec![]; + v.extend_from_slice(&read!(values)[n.to_usize().unwrap()..]); + Sequence::ArraySequence { + values: Rc::new(v), + } + } + pub fn from_array_drop_object(values: &Object<[T]>, n: &DafnyInt) -> Sequence { + let mut v = vec![]; + v.extend_from_slice(&rd!(values)[n.to_usize().unwrap()..]); + Sequence::ArraySequence { + values: Rc::new(v), + } + } + pub fn from_array_owned(values: Vec) -> Sequence { + Sequence::ArraySequence { + values: Rc::new(values), + } + } + pub fn new_concat_sequence(left: &Sequence, right: &Sequence) -> Sequence { + Sequence::ConcatSequence { + left: Rc::new(UnsafeCell::new(left.clone())), + right: Rc::new(UnsafeCell::new(right.clone())), + length: left.cardinality_usize() + right.cardinality_usize(), + boxed: Rc::new(RefCell::new(None)), + } + } + pub fn to_array(&self) -> Rc> { + // Let's convert the if then else below to a proper match statement + match self { + Sequence::ArraySequence { values, .. } => + // The length of the elements + { + Rc::clone(values) + } + Sequence::ConcatSequence { + length, + boxed, + left, + right, + } => { + let into_boxed = boxed.as_ref().clone(); + let into_boxed_borrowed = into_boxed.borrow(); + let borrowed: Option<&Rc>> = into_boxed_borrowed.as_ref(); + if let Some(cache) = borrowed.as_ref() { + return Rc::clone(cache); + } + // Let's create an array of size length and fill it up recursively + // We don't materialize nested arrays because most of the time they are forgotten + let mut array: Vec = Vec::with_capacity(*length); + Sequence::::append_recursive(&mut array, self); + let result = Rc::new(array); + let mut cache = boxed.borrow_mut(); + let mutable_left: *mut Sequence = left.get(); + let mutable_right: *mut Sequence = right.get(); + // safety: Once the array is computed, left and right won't ever be read again. + unsafe { *mutable_left = seq!() }; + unsafe { *mutable_right = seq!() }; + *cache = Some(result.clone()); + result + } + } + } + + pub fn append_recursive(array: &mut Vec, this: &Sequence) { + match this { + Sequence::ArraySequence { values, .. } => + // The length of the elements + { + for value in values.iter() { + array.push(value.clone()); + } + } + Sequence::ConcatSequence { + boxed, left, right, .. + } => + // Let's create an array of size length and fill it up recursively + { + let into_boxed = boxed.as_ref().clone(); + let into_boxed_borrowed = into_boxed.borrow(); + let borrowed: Option<&Rc>> = into_boxed_borrowed.as_ref(); + if let Some(values) = borrowed.as_ref() { + for value in values.iter() { + array.push(value.clone()); + } + return; + } + // safety: When a concat is initialized, the left and right are well defined + Sequence::::append_recursive(array, unsafe { &mut *left.get() }); + Sequence::::append_recursive(array, unsafe { &mut *right.get() }); + } + } + } + /// Returns the cardinality of this [`Sequence`]. + // The cardinality returns the length of the sequence + pub fn cardinality_usize(&self) -> SizeT { + match self { + Sequence::ArraySequence { values, .. } => + // The length of the elements + { + values.len() + } + Sequence::ConcatSequence { length, .. } => *length, + } + } + pub fn cardinality(&self) -> DafnyInt { + DafnyInt::from_usize(self.cardinality_usize()) + } + pub fn get_usize(&self, index: SizeT) -> T { + let array = self.to_array(); + array[index].clone() + } + + pub fn slice(&self, start: &DafnyInt, end: &DafnyInt) -> Sequence { + let start_index = start.data.as_ref().to_usize().unwrap(); + let end_index = end.data.as_ref().to_usize().unwrap(); + let new_data = Sequence::from_array_owned(self.to_array()[start_index..end_index].to_vec()); + new_data + } + pub fn take(&self, end: &DafnyInt) -> Sequence { + let end_index = end.data.as_ref().to_usize().unwrap(); + let new_data = Sequence::from_array_owned(self.to_array()[..end_index].to_vec()); + new_data + } + pub fn drop(&self, start: &DafnyInt) -> Sequence { + let start_index = start.data.as_ref().to_usize().unwrap(); + let new_data = Sequence::from_array_owned(self.to_array()[start_index..].to_vec()); + new_data + } + + pub fn update_index(&self, index: &DafnyInt, value: &T) -> Self { + let mut result = self.to_array().as_ref().clone(); + result[index.data.to_usize().unwrap()] = value.clone(); + Sequence::from_array_owned(result) + } + + pub fn concat(&self, other: &Sequence) -> Sequence { + Sequence::new_concat_sequence(self, other) + } + + pub fn get(&self, index: &DafnyInt) -> T { + self.get_usize(index.data.to_usize().unwrap()) + } + pub fn iter(&self) -> SequenceIter { + SequenceIter { + array: self.to_array(), + index: 0, + } + } +} + +pub struct SequenceIter { + array: Rc>, + index: SizeT, +} +impl Iterator for SequenceIter { + type Item = T; + fn next(&mut self) -> Option { + if self.index < self.array.len() { + let result = self.array[self.index].clone(); + self.index += 1; + Some(result) + } else { + None + } + } +} + +impl Default for Sequence { + fn default() -> Self { + Sequence::from_array_owned(vec![]) + } +} +impl NontrivialDefault for Sequence { + fn nontrivial_default() -> Self { + Self::default() + } +} + +impl Sequence { + pub fn as_dafny_multiset(&self) -> Multiset { + Multiset::from_array(&self.to_array()) + } +} + +// Makes it possible to write iterator.collect::> and obtain a sequence +impl FromIterator for Sequence { + fn from_iter>(iter: I) -> Self { + Sequence::from_array_owned(iter.into_iter().collect()) + } +} + +impl Sequence { + pub fn contains(&self, value: &T) -> bool { + self.to_array().contains(value) + } +} +impl PartialEq> for Sequence +where + T: DafnyType + PartialEq, +{ + fn eq(&self, other: &Sequence) -> bool { + // Iterate through both elements and verify that they are equal + let values: Rc> = self.to_array(); + if other.cardinality_usize() != values.len() { + return false; + } + let mut i: usize = 0; + for value in values.iter() { + if value != &other.get_usize(i) { + return false; + } + i += 1; + } + true + } +} + +impl PartialOrd for Sequence { + fn partial_cmp(&self, other: &Sequence) -> Option { + // Comparison is only prefix-based + match self.cardinality_usize().cmp(&other.cardinality_usize()) { + Ordering::Equal => { + if self == other { + Some(Ordering::Equal) + } else { + None + } + } + Ordering::Less => { + for i in 0..self.cardinality_usize() { + if self.get_usize(i) != other.get_usize(i) { + return None; + } + } + Some(Ordering::Less) + } + Ordering::Greater => { + for i in 0..other.cardinality_usize() { + if self.get_usize(i) != other.get_usize(i) { + return None; + } + } + Some(Ordering::Greater) + } + } + } +} + +impl DafnyPrint for Sequence { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + if !V::is_char() { + write!(f, "[")?; + } + let mut first = true; + for value in self.to_array().iter() { + if !first && !V::is_char() { + write!(f, ", ")?; + } + first = false; + value.fmt_print(f, true)?; + } + if !V::is_char() { + write!(f, "]") + } else { + write!(f, "") + } + } +} + +impl Debug for Sequence { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + self.fmt_print(f, false) + } +} + +// ************** +// Immutable maps +// ************** + +#[derive(Clone)] +pub struct Map +where + K: DafnyTypeEq, + V: DafnyType, +{ + data: Rc>, +} + +impl Default for Map { + fn default() -> Self { + Map { + data: Rc::new(HashMap::new()), + } + } +} + +impl NontrivialDefault for Map { + fn nontrivial_default() -> Self { + Self::default() + } +} + +impl Hash for Map { + fn hash(&self, state: &mut H) { + self.data.len().hash(state); // Worst performance for things that are not hashable like maps + } +} + +impl PartialEq> for Map +where + K: DafnyTypeEq, + V: DafnyTypeEq, +{ + fn eq(&self, other: &Map) -> bool { + if self.data.len() != other.data.len() { + return false; + } + for (k, v) in self.data.iter() { + if other.data.get(k) != Some(v) { + return false; + } + } + return true; + } +} + +impl Eq for Map {} + +impl Map { + pub fn new_empty() -> Map { + Map { + data: Rc::new(HashMap::new()), + } + } + pub fn from_array(values: &Vec<(K, V)>) -> Map { + Self::from_iterator(values.iter().map(|(k, v)| (k.clone(), v.clone()))) + } + pub fn from_iterator(data: I) -> Map + where + I: Iterator, + { + let mut result: HashMap = HashMap::new(); + for (k, v) in data { + result.insert(k, v); + } + Self::from_hashmap_owned(result) + } + pub fn from_hashmap_owned(values: HashMap) -> Map { + Map { + data: Rc::new(values), + } + } + pub fn to_hashmap_owned( + &self, + converter_k: fn(&K) -> K2, + converter_v: fn(&V) -> V2, + ) -> HashMap + where + K2: Eq + std::hash::Hash, + V2: Clone, + { + let mut result: HashMap = HashMap::new(); + for (k, v) in self.data.iter() { + result.insert(converter_k(k), converter_v(v)); + } + result + } + pub fn cardinality_usize(&self) -> usize { + self.data.len() + } + pub fn cardinality(&self) -> DafnyInt { + DafnyInt::from_usize(self.cardinality_usize()) + } + pub fn contains(&self, key: &K) -> bool { + self.data.contains_key(key) + } + pub fn get_or_none(&self, key: &K) -> Option { + self.data.get(key).cloned() + } + // Dafny will normally guarantee that the key exists. + pub fn get(&self, key: &K) -> V { + self.data[key].clone() + } + pub fn merge(&self, other: &Map) -> Map { + if other.cardinality_usize() == 0 { + return self.clone(); + } + if self.cardinality_usize() == 0 { + return other.clone(); + } + let mut new_data = (*other.data).clone(); + // Overriding self's keys with other's keys if there are some. + for (k, v) in self.data.iter() { + if !other.contains(k) { + new_data.insert(k.clone(), v.clone()); + } + } + Self::from_hashmap_owned(new_data) + } + pub fn subtract(&self, keys: &Set) -> Self { + if keys.cardinality_usize() == 0 { + return self.clone(); + } + let mut result: HashMap = HashMap::new(); + for (k, v) in self.data.iter() { + if !keys.contains(k) { + result.insert(k.clone(), v.clone()); + } + } + Self::from_hashmap_owned(result) + } + + pub fn from_hashmap( + map: &HashMap, + converter_k: fn(&K2) -> K, + converter_v: fn(&V2) -> V, + ) -> Map + where + K: DafnyTypeEq, + V: DafnyTypeEq, + K2: Eq + Hash, + V2: Clone, + { + let mut result: HashMap = HashMap::new(); + for (k, v) in map.iter() { + result.insert(converter_k(k), converter_v(v)); + } + Map { + data: Rc::new(result), + } + } + pub fn keys(&self) -> Set { + let mut result: HashSet = HashSet::new(); + for (k, _) in self.data.iter() { + result.insert(k.clone()); + } + Set::from_hashset_owned(result) + } + + pub fn update_index(&self, index: &K, value: &V) -> Self { + let mut result = self.data.as_ref().clone(); + result.insert(index.clone(), value.clone()); + Map::from_hashmap_owned(result) + } + + pub fn update_index_owned(&self, index: K, value: V) -> Self { + let mut result = self.data.as_ref().clone(); + result.insert(index, value); + Map::from_hashmap_owned(result) + } + + pub fn iter_raw(&self) -> std::collections::hash_map::Iter<'_, K, V> { + self.data.iter() + } + + pub fn iter(&self) -> impl Iterator + '_ { + self.data.iter().map(|(k, _v)| k).cloned() + } +} + + +impl Map { + pub fn values(&self) -> Set { + let mut result: Vec = Vec::new(); + for (_, v) in self.data.iter() { + result.push(v.clone()); + } + Set::from_array(&result) + } + pub fn items(&self) -> Set<(K, V)> { + let mut result: Vec<(K, V)> = Vec::new(); + for (k, v) in self.data.iter() { + result.push((k.clone(), v.clone())); + } + Set::from_array(&result) + } +} + +impl Map { + pub fn as_dafny_multiset(&self) -> Multiset { + Multiset::from_hashmap(&self.data) + } +} + +pub struct MapBuilder +where + K: Clone + Eq + std::hash::Hash, + V: Clone, +{ + data: HashMap, +} + +impl MapBuilder +where + K: DafnyTypeEq, + V: DafnyType, +{ + pub fn new() -> MapBuilder { + MapBuilder { + data: HashMap::new(), + } + } + pub fn add(&mut self, key: &K, value: &V) { + // Dafny will prove that overriding has the same value anyway + self.data.insert(key.clone(), value.clone()); + } + pub fn build(self) -> Map { + Map::from_hashmap_owned(self.data) + } +} + +impl DafnyPrint for Map +where + K: DafnyTypeEq, + V: DafnyType, +{ + fn fmt_print(&self, f: &mut Formatter<'_>, in_seq: bool) -> std::fmt::Result { + f.write_str("map[")?; + let mut first = true; + for (k, v) in self.data.iter() { + if !first { + f.write_str(", ")?; + } + first = false; + k.fmt_print(f, in_seq)?; + f.write_str(" := ")?; + v.fmt_print(f, in_seq)?; + } + f.write_str("]") + } +} + +impl Debug for Map +where + K: DafnyTypeEq, + V: DafnyTypeEq, +{ + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + self.fmt_print(f, false) + } +} + +// ************** +// Immutable sets +// ************** + +#[derive(Clone)] +pub struct Set { + data: Rc>, +} + +// Since there is no canonical way to iterate over a set to compute the hash. +impl ::std::hash::Hash for Set { + fn hash<_H: ::std::hash::Hasher>(&self, _state: &mut _H) { + self.cardinality_usize().hash(_state) + } +} + +impl Eq for Set {} + +impl Default for Set +where + T: DafnyTypeEq, +{ + fn default() -> Self { + Self::new_empty() + } +} +impl NontrivialDefault for Set { + fn nontrivial_default() -> Self { + Self::default() + } +} + +impl PartialEq> for Set +where + V: DafnyTypeEq, +{ + fn eq(&self, other: &Set) -> bool { + // 1. Same cardinality + // 2. All the elements of self are in the other + if self.cardinality_usize() != other.cardinality_usize() { + false + } else { + for value in self.data.iter() { + if !other.contains(value) { + return false; + } + } + for value in other.data.iter() { + if !self.contains(value) { + return false; + } + } + true + } + } +} + +impl PartialOrd for Set { + fn partial_cmp(&self, other: &Self) -> Option { + // Partial ordering is inclusion + if self.cardinality_usize() <= other.cardinality_usize() { + for value in self.data.iter() { + if !other.contains(value) { + return None; + } + } + if self.cardinality_usize() == other.cardinality_usize() { + Some(Ordering::Equal) + } else { + Some(Ordering::Less) + } + } else { + for value in other.data.iter() { + if !self.contains(value) { + return None; + } + } + Some(Ordering::Greater) + } + } +} + +impl Set { + pub fn new_empty() -> Set { + Self::from_hashset_owned(HashSet::new()) + } + pub fn from_array(array: &Vec) -> Set { + Self::from_iterator(array.iter().map(|v| v.clone())) + } + pub fn from_iterator(data: I) -> Set + where + I: Iterator, + { + let mut set: HashSet = HashSet::new(); + for value in data { + set.insert(value); + } + Self::from_hashset_owned(set) + } + pub fn from_sequence(data: &Rc>) -> Set { + Self::from_array(data.to_array().borrow()) + } + pub fn from_hashset_owned(hashset: HashSet) -> Set { + Set { + data: Rc::new(hashset), + } + } + pub fn cardinality_usize(&self) -> usize { + self.data.len() + } + pub fn cardinality(&self) -> DafnyInt { + DafnyInt::from_usize(self.data.len()) + } + pub fn contains(&self, value: &V) -> bool { + self.data.contains(value) + } + pub fn merge(self: &Self, other: &Set) -> Set { + if self.cardinality_usize() == 0 { + return other.clone(); + } + if other.cardinality_usize() == 0 { + return self.clone(); + } + let mut result = self.data.as_ref().clone(); + // iterate over the other, add only not contained elements + for value in other.data.iter() { + if !result.contains(value) { + result.insert(value.clone()); + } + } + Set::from_hashset_owned(result) + } + + pub fn intersect(self: &Self, other: &Set) -> Set { + if self.cardinality_usize() == 0 { + return self.clone(); + } + if other.cardinality_usize() == 0 { + return other.clone(); + } + // Start with an empty vec with capacity the smallest of both sets + let mut result = HashSet::new(); + + // iterate over the other, take only elements in common + for value in self.data.iter() { + if other.data.contains(value) { + result.insert(value.clone()); + } + } + Set::from_hashset_owned(result) + } + + pub fn subtract(&self, other: &Set) -> Set { + if self.cardinality_usize() == 0 { + return self.clone(); + } + if other.cardinality_usize() == 0 { + return self.clone(); + } + // Start with a vec the size of the first one + let mut result = HashSet::new(); + + // iterate over the other, take only elements not in second + for value in self.data.iter() { + if !other.contains(value) { + result.insert(value.clone()); + } + } + Set::from_hashset_owned(result) + } + + pub fn disjoint(&self, other: &Set) -> bool { + if self.cardinality_usize() == 0 { + return true; + } + if other.cardinality_usize() == 0 { + return true; + } + if other.data.len() < self.data.len() { + // iterate over the other, take only elements not in self + for value in other.data.iter() { + if self.contains(value) { + return false; + } + } + } else { + // iterate over the self, take only elements not in other + for value in self.data.iter() { + if other.contains(value) { + return false; + } + } + } + true + } + + pub fn equals(&self, other: &Set) -> bool { + if self.cardinality_usize() != other.cardinality_usize() { + return false; + } + // iterate over the other, take only elements not in second + for value in other.data.iter() { + if !self.contains(value) { + return false; + } + } + true + } + + pub fn elements(self: &Self) -> Set { + self.clone() + } + + pub fn as_dafny_multiset(&self) -> Multiset { + Multiset::from_set(self) + } + + pub fn iter(&self) -> std::collections::hash_set::Iter<'_, V> { + self.data.iter() + } + + pub fn peek(&self) -> V { + self.data.iter().next().unwrap().clone() + } +} + +pub struct SetBuilder +where + T: Clone + Eq + std::hash::Hash, +{ + data: HashMap, +} + +impl SetBuilder { + pub fn new() -> SetBuilder { + SetBuilder { + data: HashMap::new(), + } + } + pub fn add(&mut self, value: &T) { + // Dafny will prove that overriding has the same value anyway + self.data.insert(value.clone(), true); + } + pub fn build(self) -> Set { + // Iterate over all the key values of the hashmap and add them to an array + let mut result: Vec = Vec::new(); + for (k, _v) in self.data.iter() { + result.push(k.clone()); + } + + Set::from_array(&result) + } +} + +impl DafnyPrint for Set { + fn fmt_print(&self, f: &mut Formatter<'_>, in_seq: bool) -> std::fmt::Result { + f.write_str("{")?; + let mut first = true; + for value in self.data.iter() { + if !first { + f.write_str(", ")?; + } + first = false; + value.fmt_print(f, in_seq)?; + } + f.write_str("}") + } +} + +impl Debug for Set +where + V: DafnyTypeEq, +{ + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + self.fmt_print(f, false) + } +} + +// ******************* +// Immutable multisets +// ******************* + +#[derive(Clone)] +pub struct Multiset { + pub data: HashMap, + pub size: DafnyInt, +} + +impl Multiset { + pub fn new_empty() -> Multiset { + Self::from_array(&vec![]) + } + pub fn get_total(map: &HashMap) -> DafnyInt { + let mut total = DafnyInt::zero(); + for (_, v) in map.iter() { + total = total + v.clone(); + } + total + } + pub fn from_hashmap_owned(map: HashMap) -> Multiset { + Multiset { + size: Self::get_total(&map), + data: map, + } + } + pub fn from_hashmap(map: &HashMap) -> Multiset { + Self::from_hashmap_owned(map.clone()) + } + pub fn from_array(data: &Vec) -> Multiset { + Self::from_iterator(data.iter().map(|x| x.clone())) + } + pub fn from_iterator(data: I) -> Multiset + where + I: Iterator, + { + let mut hashmap: HashMap = HashMap::new(); + let mut total: DafnyInt = DafnyInt::zero(); + for value in data { + let count = hashmap.entry(value.clone()).or_insert(DafnyInt::zero()); + *count = count.clone() + DafnyInt::one(); + total = total + DafnyInt::one(); + } + Multiset { + data: hashmap, + size: total, + } + } + pub fn from_set(set: &Set) -> Multiset { + Self::from_iterator(set.data.iter().map(|v| v.clone())) + } + + pub fn cardinality_usize(&self) -> SizeT { + self.size.data.to_usize().unwrap() + } + pub fn cardinality(&self) -> DafnyInt { + self.size.clone() + } + pub fn contains(&self, value: &V) -> bool { + self.data.contains_key(value) && self.data.get(value).unwrap() > &DafnyInt::zero() + } + pub fn get(&self, value: &V) -> DafnyInt { + if self.data.contains_key(value) { + self.data.get(value).unwrap().clone() + } else { + DafnyInt::zero() + } + } + pub fn update_count(&self, value: &V, new_count: &DafnyInt) -> Multiset { + let mut result = self.clone(); + let old_count = self.get(value); + if new_count == &DafnyInt::zero() { + result.data.remove(value); + } else { + result.data.insert(value.clone(), new_count.clone()); + } + result.size = self.size.clone() + new_count.clone() - old_count; + result + } + pub fn merge(&self, other: &Multiset) -> Multiset { + if other.size.is_zero() { + return self.clone(); + } + if self.size.is_zero() { + return other.clone(); + } + let mut result = self.data.clone(); + for (k, v) in other.data.iter() { + let old_count = self.get(k); + let new_count = old_count.clone() + v.clone(); + result.insert(k.clone(), new_count); + } + Multiset { + data: result, + size: self.size.clone() + other.size.clone(), + } + } + pub fn intersect(&self, other: &Multiset) -> Multiset { + if other.size.is_zero() { + return other.clone(); + } + if self.size.is_zero() { + return self.clone(); + } + let mut result = HashMap::::new(); + let mut total = DafnyInt::zero(); + for (k, other_count) in other.data.iter() { + let self_count = self.get(k); + let resulting_count = if self_count < *other_count { + self_count + } else { + other_count.clone() + }; + if resulting_count.is_positive() { + result.insert(k.clone(), resulting_count.clone()); + total = total + resulting_count; + } + } + Multiset { + data: result, + size: total, + } + } + pub fn subtract(&self, other: &Multiset) -> Multiset { + if other.size.is_zero() { + return self.clone(); + } + if self.size.is_zero() { + return self.clone(); + } + let mut result = self.data.clone(); + let mut total = self.size.clone(); + for (k, v) in other.data.iter() { + let old_count = self.get(k); + let new_count = old_count.clone() - v.clone(); + if !new_count.is_positive() { + total = total - old_count.clone(); + result.remove(k); + } else { + total = total - v.clone(); + result.insert(k.clone(), new_count); + } + } + Multiset { + data: result, + size: total, + } + } + pub fn disjoint(&self, other: &Multiset) -> bool { + for value in other.data.keys() { + if self.contains(value) { + return false; + } + } + true + } + + pub fn as_dafny_multiset(&self) -> Multiset { + self.clone() + } + + pub fn peek(&self) -> V { + self.data.iter().next().unwrap().0.clone() + } + + pub fn iter_raw(&self) -> std::collections::hash_map::Iter<'_, V, DafnyInt> { + self.data.iter() + } + + pub fn iter(&self) -> impl Iterator + '_ { + self.data.iter().flat_map( + |(k, &ref v)| + ::std::iter::repeat(k).take(v.clone().as_usize())).cloned() + } +} + +impl Default for Multiset +where + T: DafnyTypeEq, +{ + fn default() -> Self { + Self::new_empty() + } +} +impl NontrivialDefault for Multiset { + fn nontrivial_default() -> Self { + Self::default() + } +} + +impl PartialOrd> for Multiset { + fn partial_cmp(&self, other: &Multiset) -> Option { + match self.cardinality().cmp(&other.cardinality()) { + Ordering::Less => { + for value in self.data.keys() { + if !other.contains(value) || self.get(value) > other.get(value) { + return None; + } + } + Some(Ordering::Less) + } + Ordering::Equal => { + for value in self.data.keys() { + if self.get(value) != other.get(value) { + return None; + } + } + Some(Ordering::Equal) + } + Ordering::Greater => { + for value in other.data.keys() { + if !self.contains(value) || self.get(value) < other.get(value) { + return None; + } + } + Some(Ordering::Greater) + } + } + } +} + +impl DafnyPrint for Multiset { + fn fmt_print(&self, f: &mut Formatter<'_>, in_seq: bool) -> std::fmt::Result { + f.write_str("multiset{")?; + let mut first = true; + for value in self.data.iter() { + for _count in 0..value.1.data.to_usize().unwrap() { + if !first { + f.write_str(", ")?; + } + first = false; + value.0.fmt_print(f, in_seq)?; + } + } + f.write_str("}") + } +} + +impl Debug for Multiset +where + V: DafnyTypeEq, +{ + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + self.fmt_print(f, false) + } +} + +impl PartialEq> for Multiset { + fn eq(&self, other: &Multiset) -> bool { + if self.cardinality() != other.cardinality() { + return false; + } + // iterate over the other, take only elements not in second + for value in other.data.iter() { + if !self.contains(value.0) || self.get(value.0) != *value.1 { + return false; + } + } + true + } +} +impl Eq for Multiset {} +impl Hash for Multiset { + fn hash(&self, state: &mut H) { + self.cardinality().hash(state); + } +} + +pub fn dafny_rational_to_int(r: &BigRational) -> BigInt { + euclidian_division(r.numer().clone(), r.denom().clone()) +} + +pub fn nullable_referential_equality(left: Option>, right: Option>) -> bool { + match (left, right) { + (Some(l), Some(r)) => Rc::ptr_eq(&l, &r), + (None, None) => true, + _ => false, + } +} + +pub fn euclidian_division(a: A, b: A) -> A { + if !a.is_negative() { + if !b.is_negative() { + a / b + } else { + -(a / -b) + } + } else { + if !b.is_negative() { + -((-(a + One::one())) / b) - One::one() + } else { + (-(a + One::one())) / (-b) + One::one() + } + } +} + +pub fn euclidian_modulo(a: A, b: A) -> A { + if !a.is_negative() { + if !b.is_negative() { + a % b + } else { + a % -b + } + } else { + let bp = b.abs(); + let c = (-a) % bp.clone(); + if c == Zero::zero() { + Zero::zero() + } else { + bp - c + } + } +} + +pub struct IntegerRange + One + Ord + Clone> { + hi: A, + current: A, +} + +impl + One + Ord + Clone> Iterator for IntegerRange { + type Item = A; + + fn next(&mut self) -> Option { + if self.current < self.hi { + let result = self.current.clone(); + self.current = self.current.clone() + One::one(); + Some(result) + } else { + None + } + } +} + +pub fn integer_range + One + Ord + Clone>( + low: A, + hi: A, +) -> impl Iterator { + IntegerRange { hi, current: low } +} + +pub struct IntegerRangeDown + One + Ord + Clone> { + current: A, + low: A, +} + +impl + One + Ord + Clone> Iterator for IntegerRangeDown { + type Item = A; + + fn next(&mut self) -> Option { + if self.current > self.low { + self.current = self.current.clone() - One::one(); + Some(self.current.clone()) + } else { + None + } + } +} + +pub fn integer_range_down + One + Ord + Clone>( + hi: A, + low: A, +) -> impl Iterator { + IntegerRangeDown { current: hi, low } +} + +// Unbounded versions + +pub struct IntegerRangeUnbounded + One + Clone> { + current: A, +} +impl + One + Clone> Iterator for IntegerRangeUnbounded { + type Item = A; + + fn next(&mut self) -> Option { + let result = self.current.clone(); + self.current = self.current.clone() + One::one(); + Some(result) + } +} +pub fn integer_range_unbounded + One + Clone>( + low: A, +) -> impl Iterator { + IntegerRangeUnbounded { current: low } +} + +pub struct IntegerRangeDownUnbounded + One + Clone> { + current: A, +} + +impl + One + Clone> Iterator for IntegerRangeDownUnbounded { + type Item = A; + + fn next(&mut self) -> Option { + self.current = self.current.clone() - One::one(); + Some(self.current.clone()) + } +} + +pub fn integer_range_down_unbounded + One + Clone>( + hi: A, +) -> impl Iterator { + IntegerRangeDownUnbounded { current: hi } +} + +pub struct LazyFieldWrapper(pub Lazy A>>); + +impl PartialEq for LazyFieldWrapper { + fn eq(&self, other: &Self) -> bool { + self.0.deref() == other.0.deref() + } +} + +impl Default for LazyFieldWrapper { + fn default() -> Self { + Self(Lazy::new(Box::new(A::default))) + } +} + +impl DafnyPrint for LazyFieldWrapper { + fn fmt_print(&self, f: &mut Formatter<'_>, in_seq: bool) -> std::fmt::Result { + self.0.deref().fmt_print(f, in_seq) + } +} + +// Convert the DafnyPrint above into a macro so that we can create it for functions of any input arity +macro_rules! dafny_print_function { + ($($n:tt)*) => { + impl $crate::DafnyPrint for ::std::rc::Rc B> { + fn fmt_print(&self, f: &mut ::std::fmt::Formatter<'_>, _in_seq: bool) -> ::std::fmt::Result { + write!(f, "") + } + } + } +} +// Now create a loop like impl_tuple_print_loop so that we can create functions up to size 32 +macro_rules! dafny_print_function_loop { + ($first:ident $($rest:ident)*) => { + dafny_print_function_loop! { $($rest)* } + dafny_print_function! { $first $($rest)* } + }; + () => { + } +} +// Emit functions till 32 parameters +dafny_print_function_loop! { A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 +A17 A18 A19 A20 A21 A22 A23 A24 A25 A26 A27 A28 A29 A30 A31 A32 } + +pub struct FunctionWrapper(pub A); +impl DafnyPrint for FunctionWrapper { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "") + } +} + +impl Clone for FunctionWrapper { + fn clone(&self) -> Self { + Self(self.0.clone()) + } +} + +impl PartialEq for FunctionWrapper> { + fn eq(&self, other: &Self) -> bool { + Rc::ptr_eq(&self.0, &other.0) + } +} + +pub struct DafnyPrintWrapper(pub T); +impl Display for DafnyPrintWrapper<&T> { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + self.0.fmt_print(f, false) + } +} + +// from gazebo +#[inline] +pub unsafe fn transmute_unchecked(x: A) -> B { + assert_eq!(std::mem::size_of::(), std::mem::size_of::()); + debug_assert_eq!(0, (&x as *const A).align_offset(std::mem::align_of::())); + let b = std::ptr::read(&x as *const A as *const B); + std::mem::forget(x); + b +} + +pub trait DafnyPrint { + fn fmt_print(&self, f: &mut Formatter<'_>, in_seq: bool) -> std::fmt::Result; + + // Vec gets special treatment so we carry that information here + #[inline] + fn is_char() -> bool { + false + } +} + +impl DafnyPrint for *const T { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "<{} object>", std::any::type_name::()) + } +} + +macro_rules! impl_print_display { + ($name:ty) => { + impl $crate::DafnyPrint for $name { + fn fmt_print(&self, f: &mut ::std::fmt::Formatter<'_>, _in_seq: bool) -> ::std::fmt::Result { + ::std::fmt::Display::fmt(&self, f) + } + } + }; +} + +impl_print_display! { String } +impl_print_display! { bool } +impl_print_display! { u8 } +impl_print_display! { u16 } +impl_print_display! { u32 } +impl_print_display! { u64 } +impl_print_display! { u128 } +impl_print_display! { i8 } +impl_print_display! { i16 } +impl_print_display! { i32 } +impl_print_display! { i64 } +impl_print_display! { i128 } +impl_print_display! { usize } + +impl DafnyPrint for f32 { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "{:.1}", self) + } +} + +impl DafnyPrint for f64 { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "{:.1}", self) + } +} + +impl DafnyPrint for () { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "()") + } +} + +#[derive(Clone)] +pub struct DafnyCharUTF16(pub u16); +pub type DafnyStringUTF16 = Sequence; + +impl Default for DafnyCharUTF16 { + fn default() -> Self { + Self('a' as u16) + } +} + +impl DafnyPrint for DafnyCharUTF16 { + #[inline] + fn fmt_print(&self, f: &mut Formatter<'_>, in_seq: bool) -> std::fmt::Result { + let real_char = char::decode_utf16(vec![self.clone()].iter().map(|v| v.0)) + .map(|r| r.map_err(|e| e.unpaired_surrogate())) + .collect::>()[0]; + let rendered_char = match real_char { + Ok(c) => c, + Err(e) => { + return write!(f, "Invalid UTF-16 code point: {}", e); + } + }; + + if in_seq { + write!(f, "{}", rendered_char) + } else { + write!(f, "'{}'", rendered_char) + } + } + + #[inline] + fn is_char() -> bool { + true + } +} + +impl Debug for DafnyCharUTF16 { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + self.fmt_print(f, false) + } +} + +impl PartialEq for DafnyCharUTF16 { + fn eq(&self, other: &DafnyCharUTF16) -> bool { + self.0 == other.0 + } +} +impl Eq for DafnyCharUTF16 {} +impl Hash for DafnyCharUTF16 { + fn hash(&self, state: &mut H) { + self.0.hash(state) + } +} + +impl PartialOrd for DafnyCharUTF16 { + fn partial_cmp(&self, other: &DafnyCharUTF16) -> Option { + (self.0).partial_cmp(&other.0) + } +} + +impl Add for DafnyCharUTF16 { + type Output = DafnyCharUTF16; + + fn add(self, rhs: DafnyCharUTF16) -> Self::Output { + DafnyCharUTF16(self.0 + rhs.0) + } +} + +impl Sub for DafnyCharUTF16 { + type Output = DafnyCharUTF16; + + fn sub(self, rhs: DafnyCharUTF16) -> Self::Output { + DafnyCharUTF16(self.0 - rhs.0) + } +} + +#[derive(Clone)] +pub struct DafnyChar(pub char); +pub type DafnyString = Sequence; + +impl Default for DafnyChar { + fn default() -> Self { + Self('a') + } +} + +impl DafnyPrint for DafnyChar { + #[inline] + fn fmt_print(&self, f: &mut Formatter<'_>, in_seq: bool) -> std::fmt::Result { + if in_seq { + write!(f, "{}", self.0) + } else { + write!(f, "'{}'", self.0) + } + } + + #[inline] + fn is_char() -> bool { + true + } +} + +impl Debug for DafnyChar { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + self.fmt_print(f, false) + } +} + +impl PartialEq for DafnyChar { + fn eq(&self, other: &DafnyChar) -> bool { + self.0 == other.0 + } +} + +impl PartialOrd for DafnyChar { + fn partial_cmp(&self, other: &DafnyChar) -> Option { + (self.0 as u32).partial_cmp(&(other.0 as u32)) + } +} +impl Eq for DafnyChar {} +impl Hash for DafnyChar { + fn hash(&self, state: &mut H) { + self.0.hash(state) + } +} + +impl Add for DafnyChar { + type Output = DafnyChar; + + fn add(self, rhs: DafnyChar) -> Self::Output { + DafnyChar(unsafe { char::from_u32_unchecked(self.0 as u32 + rhs.0 as u32) }) + } +} + +impl Sub for DafnyChar { + type Output = DafnyChar; + + fn sub(self, rhs: DafnyChar) -> Self::Output { + DafnyChar(unsafe { char::from_u32_unchecked(self.0 as u32 - rhs.0 as u32) }) + } +} + +impl DafnyPrint for Option { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + match self { + Some(x) => x.fmt_print(f, false), + None => write!(f, "null"), + } + } +} + +impl DafnyPrint for BigInt { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "{}", self) + } +} + +fn divides_a_power_of_10(mut i: BigInt) -> (bool, BigInt, usize) { + let one: BigInt = One::one(); + + let mut factor = one.clone(); + let mut log10 = 0; + + let zero = Zero::zero(); + let ten = BigInt::from_i32(10).unwrap(); + + if i <= zero { + return (false, factor, log10); + } + + while i.is_multiple_of(&ten) { + i /= BigInt::from_i32(10).unwrap(); + log10 += 1; + } + + let two = BigInt::from_i32(2).unwrap(); + let five = BigInt::from_i32(5).unwrap(); + + while i.is_multiple_of(&five) { + i /= &five; + factor *= &two; + log10 += 1; + } + + while i.is_multiple_of(&two) { + i /= &two; + factor *= &two; + log10 += 1; + } + + (i == one, factor, log10) +} + +impl DafnyPrint for BigRational { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + if self.denom() == &One::one() || self.numer() == &Zero::zero() { + write!(f, "{}.0", self.numer()) + } else { + let (divides, factor, log10) = divides_a_power_of_10(self.denom().clone()); + if divides { + let mut num = self.numer().clone(); + num *= factor; + + if num.is_negative() { + write!(f, "-")?; + num = -num; + } + + let digits = num.to_string(); + + if log10 < digits.len() { + let digit_count = digits.len() - log10; + write!(f, "{}", &digits[..digit_count])?; + write!(f, ".")?; + write!(f, "{}", &digits[digit_count..]) + } else { + let z = log10 - digits.len(); + write!(f, "0.")?; + for _ in 0..z { + write!(f, "0")?; + } + write!(f, "{}", digits) + } + } else { + write!(f, "({}.0 / {}.0)", self.numer(), self.denom()) + } + } + } +} + +impl DafnyPrint for Rc { + fn fmt_print(&self, f: &mut Formatter<'_>, in_seq: bool) -> std::fmt::Result { + self.as_ref().fmt_print(f, in_seq) + } +} + +impl DafnyPrint for Vec { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + if !T::is_char() { + write!(f, "[")?; + } + + for (i, item) in self.iter().enumerate() { + if !T::is_char() { + if i > 0 { + write!(f, ", ")?; + } + + item.fmt_print(f, false)?; + } else { + item.fmt_print(f, true)?; + } + } + + if !T::is_char() { + write!(f, "]") + } else { + Ok(()) + } + } +} + +impl DafnyPrint for RefCell { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + self.borrow().fmt_print(f, _in_seq) + } +} + +impl DafnyPrint for HashSet { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "{{")?; + + let mut i = 0; + + for item in self.iter() { + if i > 0 { + write!(f, ", ")?; + } + + item.fmt_print(f, false)?; + + i += 1; + } + + write!(f, "}}") + } +} + +pub fn char_lt(left: char, right: char) -> bool { + let left_code = left as u32; + let right_code = right as u32; + + left_code < right_code +} + +pub fn string_of(s: &str) -> DafnyString { + s.chars() + .map(|v| DafnyChar(v)) + .collect::>() +} + +pub fn string_utf16_of(s: &str) -> DafnyStringUTF16 { + Sequence::from_array_owned(s.encode_utf16().map(|v| DafnyCharUTF16(v)).collect()) +} + +macro_rules! impl_tuple_print { + ($($items:ident)*) => { + impl <$($items,)*> $crate::DafnyPrint for ($($items,)*) + where + $($items: $crate::DafnyPrint,)* + { + #[allow(unused_assignments)] + fn fmt_print(&self, f: &mut ::std::fmt::Formatter<'_>, _in_seq: bool) -> ::std::fmt::Result { + #[allow(non_snake_case)] + let ($($items,)*) = self; + + write!(f, "(")?; + + let mut i = 0; + + $( + if (i > 0) { + write!(f, ", ")?; + } + + $items.fmt_print(f, false)?; + + i += 1; + )* + + write!(f, ")") + } + } + }; +} + +macro_rules! impl_tuple_print_loop { + () => {}; + ($first:ident $($rest:ident)*) => { + impl_tuple_print_loop! { $($rest)* } + impl_tuple_print! { $first $($rest)* } + }; +} + +// 32 elements ought to be enough for everyone +impl_tuple_print_loop! { + A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 + A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 + A21 A22 A23 A24 A25 A26 A27 A28 A29 A30 + A31 +} + +// seq!(1, 2, 3) is rewritten to Sequence::from_array_owned(vec!(1, 2, 3)) +#[macro_export] +macro_rules! seq { + ($($x:expr),*) => { + $crate::Sequence::from_array_owned(vec![$($x), *]) + } +} + +#[macro_export] +macro_rules! set { + ($($x:expr), *) => { + { + // No warning about this variable not needing to be mut in the case of an empty set + #[allow(unused_mut)] + let mut temp_hash = ::std::collections::HashSet::new(); + $( + temp_hash.insert($x); + )* + $crate::Set::from_hashset_owned(temp_hash) + } + } +} + +#[macro_export] +macro_rules! multiset { + ($($x:expr), *) => { + { + #[allow(unused_mut)] + let mut temp_hash = ::std::collections::HashMap::new(); + #[allow(unused_mut)] + let mut total_size: usize = 0; + $( { + #[allow(unused_mut)] + let mut entry = temp_hash.entry($x).or_insert($crate::DafnyInt::from(0)); + *entry = (*entry).clone() + $crate::DafnyInt::from(1); + total_size += 1; + } + )* + $crate::Multiset { + data: temp_hash, + size: $crate::DafnyInt::from(total_size), + } + } + } +} + +// we enable the syntax map![k1 => v1, k2 => v2] +#[macro_export] +macro_rules! map { + ($($k:expr => $v:expr), *) => { + { + #[allow(unused_mut)] + let mut temp_hash = ::std::collections::HashMap::new(); + $( + temp_hash.insert($k.clone(), $v.clone()); + )* + $crate::Map::from_hashmap_owned(temp_hash) + } + } +} + +#[macro_export] +macro_rules! int { + ($x:expr) => { + $crate::DafnyInt::from($x) + }; +} + +////////// +// Arrays +////////// + +macro_rules! ARRAY_GETTER_LENGTH0 { + () => { + #[inline] + pub fn length0(&self) -> $crate::DafnyInt { + $crate::DafnyInt::from(self.length0_usize()) + } + #[inline] + pub fn length0_usize(&self) -> usize { + self.data.len() + } + } +} +macro_rules! ARRAY_GETTER_LENGTH { + ($field: ident, $field_usize: ident) => { + #[inline] + pub fn $field(&self) -> $crate::DafnyInt { + $crate::DafnyInt::from(self.$field_usize()) + } + #[inline] + pub fn $field_usize(&self) -> usize { + self.$field + } + } +} + +// An 1-dimensional Dafny array is a zero-cost abstraction over a pointer on a native array +#[macro_export] +macro_rules! array { + ($($x:expr), *) => { + $crate::array::from_native(::std::boxed::Box::new([$($x), *])) + } +} + +macro_rules! ARRAY_INIT { + {$length: ident, $inner: expr} => { + $crate::array::initialize_box_usize($length, { + ::std::rc::Rc::new(move |_| { $inner }) + }) + } +} + +macro_rules! ARRAY_INIT_INNER { + ($length: ident) => { + $crate::array::placebos_box_usize::($length) + } +} + +// ARRAY_DATA_TYPE(length0, length1, length2) will return +// Box<[Box<[Box<[T]>]>]> +macro_rules! ARRAY_DATA_TYPE { + ($length:ident) => { + ::std::boxed::Box<[T]> + }; + ($length:ident, $($rest_length:ident),+) => { + ::std::boxed::Box<[ARRAY_DATA_TYPE!($($rest_length),+)]> + }; +} + +// Macro to generate generalizations of the function placebos_usize to higher-dimensions arrays + +#[macro_export] +macro_rules! INIT_ARRAY_DATA { + // Handle the innermost array initialization + ($ArrayType:ident, $last_length:ident) => { + ARRAY_INIT_INNER!($last_length) + }; + // Handle recursive array initialization for multiple dimensions + ($ArrayType:ident, $first_length:ident, $($rest_length:ident),+) => { + ARRAY_INIT!($first_length, INIT_ARRAY_DATA!($ArrayType, $($rest_length),+)) + }; +} + +macro_rules! ARRAY_METHODS { + // Accepts any number of length identifiers + ($ArrayType:ident, $length0: ident, $($length:ident),+) => { + pub fn placebos_box_usize( + $length0: usize, + $($length: usize),+ + ) -> ::std::boxed::Box<$ArrayType<$crate::MaybeUninit>> { + ::std::boxed::Box::new($ArrayType { + $($length: $length),+, + data: INIT_ARRAY_DATA!($ArrayType, $length0, $($length),+), + }) + } + + pub fn placebos_usize( + $length0: usize, + $($length: usize),+ + ) -> $crate::Ptr<$ArrayType<$crate::MaybeUninit>> { + $crate::Ptr::from_box(Self::placebos_box_usize( + $length0, + $($length),+ + )) + } + + pub fn placebos_usize_object( + $length0: usize, + $($length: usize),+ + ) -> $crate::Object<$ArrayType<$crate::MaybeUninit>> { + // SAFETY: We know the object is owned and never referred to by anything else + $crate::Object::new($ArrayType { + $($length: $length),+, + data: INIT_ARRAY_DATA!($ArrayType, $length0, $($length),+), + }) + } + + pub fn placebos( + $length0: &$crate::DafnyInt, + $($length: &$crate::DafnyInt),+ + ) -> $crate::Ptr<$ArrayType<$crate::MaybeUninit>> { + Self::placebos_usize( + $length0.as_usize(), + $($length.as_usize()),+ + ) + } + + // Once all the elements have been initialized, transform the signature of the pointer + pub fn construct(p: $crate::Ptr<$ArrayType<$crate::MaybeUninit>>) -> $crate::Ptr<$ArrayType> { + unsafe { std::mem::transmute(p) } + } + // Once all the elements have been initialized, transform the signature of the pointer + pub fn construct_object(p: $crate::Object<$ArrayType<$crate::MaybeUninit>>) -> $crate::Object<$ArrayType> { + unsafe { std::mem::transmute(p) } + } + }; +} + + +macro_rules! ARRAY_STRUCT { + ($ArrayType:ident, $length0: ident, $($length:ident),+) => { + pub struct $ArrayType { + $($length: usize),+, + pub data: ARRAY_DATA_TYPE!($length0, $($length),+), + } + } +} + +macro_rules! ARRAY_TO_VEC_LOOP { + (@inner $self: ident, $tmp: ident, $data: expr) => { + $tmp.push($data.clone()); + }; + (@for $self: ident, $tmp: ident, $data: expr, $length_usize: ident $(, $rest_length_usize: ident)*) => { + for i in 0..$self.$length_usize() { + ARRAY_TO_VEC_LOOP!(@inner $self, $tmp, $data[i] $(, $rest_length_usize)*); + } + }; + (@inner $self: ident, $outerTmp: ident, $data: expr $(, $rest_length_usize: ident)*) => { + { + let mut tmp = ::std::vec::Vec::new(); + ARRAY_TO_VEC_LOOP!(@for $self, tmp, $data $(, $rest_length_usize)*); + $outerTmp.push(tmp); + } + }; + + ($self: ident, $data: expr $(, $rest_length_usize: ident)*) => { + { + let mut tmp = ::std::vec::Vec::new(); + ARRAY_TO_VEC_LOOP!(@for $self, tmp, $data $(, $rest_length_usize)*); + tmp + } + }; +} + +macro_rules! ARRAY_TO_VEC_TYPE { + ($length0: ident) => { + ::std::vec::Vec + }; + ($length0: ident $(, $res_length: ident)*) => { + ::std::vec::Vec + } +} + +macro_rules! ARRAY_TO_VEC { + ($length0_usize: ident $(, $res_length_usize: ident)*) => { + pub fn to_vec(&self) -> ARRAY_TO_VEC_TYPE!($length0_usize, $($res_length_usize),*) { + ARRAY_TO_VEC_LOOP!(self, self.data, $length0_usize, $($res_length_usize),*) + } + } +} + +macro_rules! ARRAY_LENGTHS { + () => { + + }; + (($length0: ident, $length0_usize: ident) $(, $rest: tt)*) => { + ARRAY_GETTER_LENGTH0!(); + ARRAY_LENGTHS!($(, $rest)*); + }; + (, ($length: ident, $length_usize: ident) $(, $rest: tt)*) => { + ARRAY_GETTER_LENGTH!($length, $length_usize); + ARRAY_LENGTHS!($(, $rest)*); + } +} + +macro_rules! ARRAY_METHODS_WRAPPER { + ($ArrayType:ident, $(($length:ident, $length_usize: ident)), +) => { + ARRAY_METHODS!($ArrayType, $($length), +); + } +} + +macro_rules! ARRAY_TO_VEC_WRAPPER { + ($(($length:ident, $length_usize: ident)), +) => { + ARRAY_TO_VEC!($($length_usize), +); + } +} + +macro_rules! ARRAY_STRUCT_WRAPPER { + ($ArrayType:ident, $(($length:ident, $length_usize: ident)), +) => { + ARRAY_STRUCT!($ArrayType, $($length), +); + } +} + +macro_rules! ARRAY_DEF { + ($ArrayType:ident, $(($length:ident, $length_usize: ident)), +) => { + ARRAY_STRUCT_WRAPPER!($ArrayType, $(($length, $length_usize)), +); + impl $ArrayType { + ARRAY_LENGTHS!{ + $(($length, $length_usize)), + + } + ARRAY_METHODS_WRAPPER!{$ArrayType, + $(($length, $length_usize)), + + } + } + impl $ArrayType { + ARRAY_TO_VEC_WRAPPER!{ + $(($length, $length_usize)), + + } + } + } +} + +// Array2 to Array16 + +ARRAY_DEF!{Array2, + (length0, length0_usize), + (length1, length1_usize) +} + +ARRAY_DEF!{Array3, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize) +} + +ARRAY_DEF!{Array4, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize) +} + +ARRAY_DEF!{Array5, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize) +} + +ARRAY_DEF!{Array6, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize), + (length5, length5_usize) +} + +ARRAY_DEF!{Array7, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize), + (length5, length5_usize), + (length6, length6_usize) +} + +ARRAY_DEF!{Array8, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize), + (length5, length5_usize), + (length6, length6_usize), + (length7, length7_usize) +} + +ARRAY_DEF!{Array9, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize), + (length5, length5_usize), + (length6, length6_usize), + (length7, length7_usize), + (length8, length8_usize) +} + +ARRAY_DEF!{Array10, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize), + (length5, length5_usize), + (length6, length6_usize), + (length7, length7_usize), + (length8, length8_usize), + (length9, length9_usize) +} + +ARRAY_DEF!{Array11, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize), + (length5, length5_usize), + (length6, length6_usize), + (length7, length7_usize), + (length8, length8_usize), + (length9, length9_usize), + (length10, length10_usize) +} + +ARRAY_DEF!{Array12, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize), + (length5, length5_usize), + (length6, length6_usize), + (length7, length7_usize), + (length8, length8_usize), + (length9, length9_usize), + (length10, length10_usize), + (length11, length11_usize) +} + +ARRAY_DEF!{Array13, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize), + (length5, length5_usize), + (length6, length6_usize), + (length7, length7_usize), + (length8, length8_usize), + (length9, length9_usize), + (length10, length10_usize), + (length11, length11_usize), + (length12, length12_usize) +} + +ARRAY_DEF!{Array14, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize), + (length5, length5_usize), + (length6, length6_usize), + (length7, length7_usize), + (length8, length8_usize), + (length9, length9_usize), + (length10, length10_usize), + (length11, length11_usize), + (length12, length12_usize), + (length13, length13_usize) +} + +ARRAY_DEF!{Array15, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize), + (length5, length5_usize), + (length6, length6_usize), + (length7, length7_usize), + (length8, length8_usize), + (length9, length9_usize), + (length10, length10_usize), + (length11, length11_usize), + (length12, length12_usize), + (length13, length13_usize), + (length14, length14_usize) +} + +ARRAY_DEF!{Array16, + (length0, length0_usize), + (length1, length1_usize), + (length2, length2_usize), + (length3, length3_usize), + (length4, length4_usize), + (length5, length5_usize), + (length6, length6_usize), + (length7, length7_usize), + (length8, length8_usize), + (length9, length9_usize), + (length10, length10_usize), + (length11, length11_usize), + (length12, length12_usize), + (length13, length13_usize), + (length14, length14_usize), + (length15, length15_usize) +} + +pub mod array { + use super::DafnyInt; + use num::ToPrimitive; + use std::mem::MaybeUninit; + use std::{boxed::Box, rc::Rc, vec::Vec}; + use super::Ptr; + + #[inline] + pub fn from_native(v: Box<[T]>) -> Ptr<[T]> { + Ptr::from_box(v) + } + #[inline] + pub fn from_vec(v: Vec) -> Ptr<[T]> { + from_native(v.into_boxed_slice()) + } + pub fn to_vec(v: Ptr<[T]>) -> Vec { + unsafe { Box::<[T]>::from_raw(v.into_raw()) }.into_vec() + } + pub fn initialize_usize(n: usize, initializer: Rc T>) -> Ptr<[T]> { + let mut v = Vec::with_capacity(n); + for i in 0..n { + v.push(initializer(i)); + } + from_vec(v) + } + + pub fn placebos(n: &DafnyInt) -> Ptr<[MaybeUninit]> { + placebos_usize(n.as_usize()) + } + pub fn placebos_usize(n: usize) -> Ptr<[MaybeUninit]> { + Ptr::from_box(placebos_box_usize(n)) + } + pub fn placebos_usize_object(n: usize) -> super::Object<[MaybeUninit]> { + super::rcmut::array_object_from_box(placebos_box_usize(n)) + } + // Once all the elements have been initialized, transform the signature of the pointer + pub fn construct(p: Ptr<[MaybeUninit]>) -> Ptr<[T]> { + unsafe { std::mem::transmute(p) } + } + pub fn construct_object(p: super::Object<[MaybeUninit]>) -> super::Object<[T]> { + unsafe { std::mem::transmute(p) } + } + + pub fn placebos_box(n: &DafnyInt) -> Box<[MaybeUninit]> { + placebos_box_usize(n.to_usize().unwrap()) + } + pub fn placebos_box_usize(n_usize: usize) -> Box<[MaybeUninit]> { + // This code is optimized to take a constant time. See: + // https://users.rust-lang.org/t/allocate-a-boxed-array-of-maybeuninit/110169/7 + std::iter::repeat_with(MaybeUninit::uninit) + .take(n_usize) + .collect() + } + + pub fn initialize(n: &DafnyInt, initializer: Rc T>) -> Ptr<[T]> { + super::Ptr::from_box(initialize_box(n, initializer)) + } + + pub fn initialize_box(n: &DafnyInt, initializer: Rc T>) -> Box<[T]> { + initialize_box_usize(n.to_usize().unwrap(), initializer) + } + pub fn initialize_box_usize( + n_usize: usize, + initializer: Rc T>, + ) -> Box<[T]> { + let mut v = Vec::with_capacity(n_usize); + for i in 0..n_usize { + v.push(initializer(&int!(i))); + } + v.into_boxed_slice() + } + + #[inline] + pub fn length_usize(this: Ptr<[T]>) -> usize { + // safety: Dafny won't call this function unless it can guarantee the array is still allocated + super::read!(this).len() + } + #[inline] + pub fn length(this: Ptr<[T]>) -> DafnyInt { + int!(length_usize(this)) + } + #[inline] + pub fn get_usize(this: Ptr<[T]>, i: usize) -> T { + // safety: Dafny won't call this function unless it can guarantee the array is still allocated + this.as_ref()[i].clone() + } + #[inline] + pub fn get(this: Ptr<[T]>, i: &DafnyInt) -> T { + get_usize(this, i.to_usize().unwrap()) + } + #[inline] + pub fn update_usize(this: Ptr<[T]>, i: usize, val: T) { + // safety: Dafny won't call this function unless it can guarantee the array is still allocated + crate::modify!(this)[i] = val; + } + #[inline] + pub fn update(this: Ptr<[T]>, i: &DafnyInt, val: T) { + update_usize(this, i.to_usize().unwrap(), val); + } +} + +/////////////////// +// Class helpers // +/////////////////// +pub fn allocate() -> Ptr { + let this_ptr = Box::into_raw(Box::new(MaybeUninit::uninit())) as *mut MaybeUninit as *mut T; + Ptr::from_raw_nonnull(this_ptr) +} +// Generic function to safely deallocate a raw pointer +#[inline] +pub fn deallocate(pointer: Ptr) { + // safety: Dafny won't call this function unless it can guarantee the object is still allocated + unsafe { + // Takes ownership of the reference, + // so that it's deallocated at the end of the method + let _ = Box::from_raw(pointer.into_raw()); + } +} + +pub struct ExactPool { + current: T, + yielded: bool, +} + +// Implement iterator for an exact pool, yielding +impl Iterator for ExactPool { + type Item = T; + fn next(&mut self) -> Option { + if self.yielded { + None + } else { + self.yielded = true; + Some(self.current.clone()) + } + } +} +pub fn exact_range(value: T) -> ExactPool { + ExactPool { + current: value, + yielded: false, + } +} + +// Any Dafny trait must require classes extending it to have a method "as_any_mut" +// that can convert the reference from that trait to a reference of Any + +// 'is' is meant to be used on references only, to check if a trait reference is a class reference +#[macro_export] +macro_rules! is { + ($raw:expr, $id:ty) => { + $crate::modify!($crate::cast_any!($raw)) + .downcast_mut::<$id>() + .is_some() + }; +} + +#[macro_export] +macro_rules! is_object { + ($raw:expr, $id:ty) => { + $crate::md!($crate::cast_any_object!($raw)) + .downcast_mut::<$id>() + .is_some() + }; +} + +// cast_any is meant to be used on references only, to convert any references (classes or traits)* +// to an Any reference trait +#[macro_export] +macro_rules! cast_any { + ($raw:expr) => { + $crate::Upcast::::upcast($crate::read!($raw)) + }; +} +// cast_any_object is meant to be used on references only, to convert any references (classes or traits)* +// to an Any reference trait +#[macro_export] +macro_rules! cast_any_object { + ($obj:expr) => { + $crate::UpcastObject::::upcast($crate::md!($obj)) + }; +} + + +// When initializing an uninitialized field for the first time, +// we ensure we don't drop the previous content +// This is problematic if the same field is overwritten multiple times +/// In that case, prefer to use update_uninit +#[macro_export] +macro_rules! update_field_nodrop { + ($ptr:expr, $field:ident, $value:expr) => { + $crate::update_nodrop!($crate::modify!($ptr).$field, $value) + }; +} + +// Same as update_field_nodrop but for mutable fields +#[macro_export] +macro_rules! update_field_mut_nodrop { + ($ptr:expr, $field:ident, $value:expr) => { + let lhs = $ptr; + let value = $value; + unsafe { $crate::read!(lhs).$field.get().write(value) } + }; +} + +// When initializing an uninitialized field for the first time, +// we ensure we don't drop the previous content +#[macro_export] +macro_rules! update_nodrop { + ($ptr:expr, $value:expr) => { + // safety: Dafny won't call this function unless it can guarantee the value at the address was not + // yet initialized, so that not dropping it won't create a memory leak + unsafe { ::std::ptr::addr_of_mut!($ptr).write($value) } + } +} + +// Given a class or array pointer, transforms it to a mutable reference +#[macro_export] +macro_rules! modify { + ($ptr:expr) => { + { + #[allow(unused_unsafe)] + let tmp = unsafe {&mut *(::std::cell::UnsafeCell::raw_get($ptr.0.unwrap_unchecked().as_ptr()))}; + tmp + } + } +} + +// Given a class or array pointer, transforms it to a read-only reference +#[macro_export] +macro_rules! read { + ($ptr:expr) => { + { + #[allow(unused_unsafe)] + let tmp = unsafe {&*(::std::cell::UnsafeCell::raw_get($ptr.0.unwrap_unchecked().as_ptr()))}; + tmp + } + } +} + +// If the field is guaranteed to be assigned only once, update_field_nodrop is sufficient +#[macro_export] +macro_rules! update_field_uninit { + ($t:expr, $field:ident, $field_assigned:expr, $value:expr) => {{ + let computed_value = $value; + #[allow(unused_assignments)] + if $field_assigned { + $crate::modify!($t).$field = computed_value; + } else { + $crate::update_field_nodrop!($t, $field, computed_value); + $field_assigned = true; + } + }}; +} + +// Same as update_field_uninit but for mutable fields +#[macro_export] +macro_rules! update_field_mut_uninit { + ($t:expr, $field:ident, $field_assigned:expr, $value:expr) => {{ + let computed_value = $value; + #[allow(unused_assignments)] + if $field_assigned { + $crate::modify_field!($crate::read!($t).$field, computed_value); + } else { + $crate::update_field_mut_nodrop!($t, $field, computed_value); + $field_assigned = true; + } + }}; +} + +// Macro to call at the end of the first new; constructor when not every field is guaranteed to be assigned. +#[macro_export] +macro_rules! update_field_if_uninit { + ($t:expr, $field:ident, $field_assigned:expr, $value:expr) => {{ + let computed_value = $value; + if !$field_assigned { + $crate::update_field_nodrop!($t, $field, computed_value); + $field_assigned = true; + } + }}; +} + +// Same as update_field_if_uninit but for mutable fields +#[macro_export] +macro_rules! update_field_mut_if_uninit { + ($t:expr, $field:ident, $field_assigned:expr, $value:expr) => {{ + let computed_value = $value; + if !$field_assigned { + $crate::update_field_mut_nodrop!($t, $field, computed_value); + $field_assigned = true; + } + }}; +} + +///////////////// +// Raw pointers (require wrapping because of equality) +///////////////// + +// This Ptr has the same run-time space as *mut +pub struct Ptr(pub Option>>); + +impl Ptr { + pub fn null() -> Self { + Ptr(None) + } + pub fn is_null(&self) -> bool { + self.0.is_none() + } + #[inline] + pub fn from_raw_nonnull(t: *mut T) -> Ptr { + unsafe { Ptr(Some(::std::mem::transmute::, NonNull>>(NonNull::new_unchecked(t)))) } + } + pub fn from_box(t: Box) -> Ptr { + Self::from_raw_nonnull(Box::into_raw(t)) + } + pub fn into_raw(self) -> *mut T { + if self.is_null() { + panic!("Cannot turn a null pointer into a raw pointer"); + } + let nonnull = unsafe { self.0.unwrap_unchecked() }; + unsafe { ::std::mem::transmute::<_, *mut T>(nonnull.as_ptr()) } + } +} + +impl > Ptr { + pub fn is_instance_of(self) -> bool { + if self.is_null() { + false + } else { + read!(Upcast::::upcast(read!(self))) + .downcast_ref::() + .is_some() + } + } +} + +impl NontrivialDefault for Ptr { + fn nontrivial_default() -> Self { + // Create a null pointer + Self::null() + } +} + +impl Ptr { + pub fn new(val: T) -> Ptr { + Self::from_box(Box::new(val)) + } +} + + +impl Eq for Ptr {} + +impl Clone for Ptr { + fn clone(&self) -> Self { + *self + } +} + +impl Copy for Ptr { } + +impl Default for Ptr { + fn default() -> Self { + Ptr::null() + } +} + +impl Debug for Ptr { + fn fmt(&self, f: &mut Formatter) -> std::fmt::Result { + self.fmt_print(f, false) + } +} +impl DafnyPrint for Ptr { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "") + } +} + + +impl PartialEq> for Ptr { + fn eq(&self, other: &Ptr) -> bool { + if !self.is_null() { + if !other.is_null() { + // To compare addresses, we need to ensure we only compare thin pointers + // https://users.rust-lang.org/t/comparing-addresses-between-fat-and-thin-pointers/89008 + ::std::ptr::eq( + self.clone().into_raw() as *const (), + other.clone().into_raw() as *const ()) + } else { + false + } + } else if !other.is_null() { + false + } else { + true + } + } +} + +impl std::hash::Hash for Ptr { + fn hash(&self, state: &mut H) { + if !self.is_null() { + (read!(self.clone()) as *const T as *const ()).hash(state); + } else { + 0.hash(state); + } + } +} + +impl AsMut for Ptr { + fn as_mut(&mut self) -> &mut T { + modify!(self.clone()) + } +} +impl AsRef for Ptr { + fn as_ref(&self) -> &T { + read!(self.clone()) + } +} + +impl Ptr { + // Never use on local values, only on &self types previously called on Ptr types. + pub fn from_ref(r: &T) -> Ptr { + Ptr(unsafe {::std::mem::transmute::<_, Option>>>(r as *const T)}) + } +} +// cast is meant to be used on references only, to downcast a trait reference to a class reference +#[macro_export] +macro_rules! cast { + ($raw:expr, $id:ty) => { + { + #[allow(unused_unsafe)] + let tmp = + unsafe { + let expr = $raw; + let res: $crate::Ptr<$id> = + if expr.is_null() { + $crate::Ptr::null() + } else { + $crate::Ptr::from_raw_nonnull(expr.into_raw() as *mut $id) + }; + res + }; + tmp + } + }; + +} + +///////////////// +// Reference-counted classes mode +///////////////// + +pub struct Object(pub Option>); + +impl Object { + // For safety, it requires the Rc to have been created with Rc::new() + pub unsafe fn from_rc(rc: Rc) -> Object { + Object(Some(rcmut::from_rc(rc))) + } + pub fn null() -> Object { + Object(None) + } + pub fn is_null(&self) -> bool { + self.0.is_none() + } +} +impl > Object { + pub fn is_instance_of(self) -> bool { + // safety: Dafny won't call this function unless it can guarantee the object is still allocated + rd!(UpcastObject::::upcast(rd!(self))) + .downcast_ref::() + .is_some() + } +} +impl Object { + pub fn new(val: T) -> Object { + Object(Some(rcmut::new(val))) + } +} +impl Eq for Object {} + +impl Clone for Object { + fn clone(&self) -> Self { + Object(self.0.clone()) + } +} + +impl Default for Object { + fn default() -> Self { + Object(None) + } +} + +impl> Debug for Object { + fn fmt(&self, f: &mut Formatter) -> std::fmt::Result { + self.fmt_print(f, false) + } +} +impl > DafnyPrint for Object { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + let obj_any = UpcastObject::::upcast(self.as_ref()); + let option_string = obj_any.as_ref().downcast_ref::(); + match option_string { + Some(s) => write!(f, "{}", s), + None => write!(f, ""), + } + } +} + +impl DafnyPrint for Object<[T]> { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "") + } +} + +impl UpcastObject for String { + fn upcast(&self) -> Object { + // SAFETY: RC was just created + unsafe { Object::from_rc(Rc::new(self.clone()) as Rc) } + } +} + +impl PartialEq> for Object { + fn eq(&self, other: &Object) -> bool { + if let Some(p) = &self.0 { + if let Some(q) = &other.0 { + // To compare addresses, we need to ensure we only compare thin pointers + // https://users.rust-lang.org/t/comparing-addresses-between-fat-and-thin-pointers/89008 + ::std::ptr::eq(p.as_ref().get() as *const (), q.as_ref().get() as *const ()) + } else { + false + } + } else if let Some(_q) = &other.0 { + false + } else { + true + } + } +} + +impl std::hash::Hash for Object { + fn hash(&self, state: &mut H) { + if let Some(p) = &self.0 { + (p.as_ref().get() as *const ()).hash(state); + } else { + 0.hash(state); + } + } +} + +impl AsMut for Object { + fn as_mut(&mut self) -> &mut T { + unsafe { &mut *(&self.0).as_ref().unwrap_unchecked().as_ref().get() } + } +} +impl AsRef for Object { + fn as_ref(&self) -> &T { + unsafe { &*(&self.0).as_ref().unwrap_unchecked().as_ref().get() } + } +} + +// Never inline because, when compiling with cargo --release, sometimes it gets rid of this statement +#[inline(never)] +fn increment_strong_count(data: *const T) { + // SAFETY: This method is called only on values that were constructed from an Rc + unsafe { + // Black box avoids the compiler wrongly inferring that increment strong count does nothing since the data it was applied to can be traced to be borrowed + ::std::hint::black_box(Rc::increment_strong_count(data)); + } +} + +impl Object { + // SAFETY: This function needs to be called from a reference obtained by calling read!(o) on an object + // We never inline this function, otherwise the compiler might figure out a way to remove the increment_strong_count + #[inline(never)] + pub fn from_ref(r: &T) -> Object { + let pt = r as *const T as *const UnsafeCell; + // SAFETY: Not guaranteed unfortunately. But looking at the sources of from_raw as of today 10/24/2024 + // it will will correctly rebuilt the Rc + let rebuilt = ::std::hint::black_box(unsafe { Rc::from_raw(pt) }); + let previous_strong_count = ::std::hint::black_box(Rc::strong_count(&rebuilt)); + ::std::hint::black_box(crate::increment_strong_count(pt)); + let new_strong_count = ::std::hint::black_box(Rc::strong_count(&rebuilt)); + assert_eq!(new_strong_count, previous_strong_count + 1); // Will panic if not + Object(Some(rebuilt)) + } +} + +#[macro_export] +macro_rules! cast_object { + ($raw:expr, $id:ty) => { + unsafe { + let res: $crate::Object<$id> = + $crate::Object(Some(::std::rc::Rc::from_raw( + ::std::rc::Rc::into_raw($raw.0.unwrap()) as _))); + res + } + }; +} + +// Returns an object whose fields are yet initialized. Only use update_field_uninit_object and update_field_if_uninit_object to initialize fields. +pub fn allocate_object() -> Object { + unsafe { mem::transmute(object::new::>(MaybeUninit::uninit())) } +} + +pub struct AllocationTracker { + allocations: Vec> +} + +pub fn allocate_object_track(allocation_tracker: &mut AllocationTracker) -> Object { + let res = allocate_object::(); + allocation_tracker.allocations.push(Rc::>::downgrade(&res.0.clone().unwrap())); + res +} + +// Equivalent of update_field_nodrop but for rcmut +#[macro_export] +macro_rules! update_field_nodrop_object { + ($ptr:expr, $field: ident, $value:expr) => { + $crate::update_nodrop_object!(($crate::rcmut::borrow_mut(&mut $ptr.0.clone().unwrap())).$field, $value) + }; +} + +// Same but for mutable fields +#[macro_export] +macro_rules! update_field_mut_nodrop_object { + ($ptr:expr, $field: ident, $value:expr) => { + unsafe { ($crate::rcmut::borrow_mut(&mut $ptr.0.clone().unwrap())).$field.get().write($value) } + }; +} + +// Equivalent of update_nodrop but for rcmut +#[macro_export] +macro_rules! update_nodrop_object { + ($ptr:expr, $value:expr) => { + unsafe { ::std::ptr::addr_of_mut!($ptr).write($value) } + }; +} + +// Equivalent of update_field_if_uninit but for rcmut +#[macro_export] +macro_rules! update_field_if_uninit_object { + ($t:expr, $field:ident, $field_assigned:expr, $value:expr) => {{ + #[allow(unused_assignments)] + if !$field_assigned { + let computed_value = $value; + $crate::update_field_nodrop_object!($t, $field, computed_value); + $field_assigned = true; + } + }}; +} + +// Same for mutable fields +#[macro_export] +macro_rules! update_field_mut_if_uninit_object { + ($t:expr, $field:ident, $field_assigned:expr, $value:expr) => {{ + #[allow(unused_assignments)] + if !$field_assigned { + let computed_value = $value; + $crate::update_field_mut_nodrop_object!($t, $field, computed_value); + $field_assigned = true; + } + }}; +} + +// Equivalent of update_field_uninit but for rcmut +#[macro_export] +macro_rules! update_field_uninit_object { + ($t:expr, $field:ident, $field_assigned:expr, $value:expr) => {{ + let computed_value = $value; + #[allow(unused_assignments)] + if $field_assigned { + $crate::md!($t).$field = computed_value; + } else { + $crate::update_field_nodrop_object!($t, $field, computed_value); + $field_assigned = true; + } + }}; +} + +// Same but for mutable fields +#[macro_export] +macro_rules! update_field_mut_uninit_object { + ($t:expr, $field:ident, $field_assigned:expr, $value:expr) => {{ + let computed_value = $value; + #[allow(unused_assignments)] + if $field_assigned { + $crate::modify_field!($crate::rd!($t).$field, computed_value); + } else { + $crate::update_field_mut_nodrop_object!($t, $field, computed_value); + $field_assigned = true; + } + }}; +} + + +// Equivalent of modify but for rcmut +#[macro_export] +macro_rules! md { + ($x:expr) => { + $x.clone().as_mut() + }; +} + +// Equivalent of read but for rcmut +#[macro_export] +macro_rules! rd { + ($x:expr) => { + $x.as_ref() + }; +} + +// To use when modifying a mutable field that is wrapped with UnsafeCell +#[macro_export] +macro_rules! modify_field { + ($pointer:expr, $rhs:expr) => { + { + let lhs = $pointer.get(); + let rhs = $rhs; + unsafe {*lhs = rhs} + } + }; +} + +// To use when reading a mutable field that is wrapped with UnsafeCell +#[macro_export] +macro_rules! read_field { + ($pointer:expr) => { + { + let lhs = $pointer.get(); + unsafe {(*lhs).clone()} + } + }; +} + +pub type Field = UnsafeCell; +pub fn new_field(t: T) -> Field { + UnsafeCell::new(t) +} + +// Count the number of references to the given object +#[macro_export] +macro_rules! refcount { + ($x:expr) => { + ::std::rc::Rc::strong_count(unsafe { $crate::rcmut::as_rc($x.0.as_ref().unwrap()) }) + }; +} + +pub mod object { + use std::any::Any; + + pub fn new(val: T) -> crate::Object { + crate::Object(Some(crate::rcmut::new(val))) + } + pub fn downcast(_self: crate::Object) -> crate::Object { + unsafe { + crate::Object(Some(crate::rcmut::downcast::(_self.0.unwrap()).unwrap())) // Use unwrap_unchecked? + } + } + #[inline] + pub fn is(_self: crate::Object) -> bool { + is_object!(_self, T) + } +} + +// Inspired from https://crates.io/crates/rcmut +pub mod rcmut { + use std::cell::UnsafeCell; + use std::mem::{self, MaybeUninit}; + use std::rc::Rc; + use std::sync::Arc; + + pub fn array_object_from_rc(data: Rc<[T]>) -> crate::Object<[T]> { + crate::Object(Some(unsafe { crate::rcmut::from_rc(data) })) + } + pub fn array_object_from_box(data: Box<[T]>) -> crate::Object<[T]> { + let data: Rc<[T]> = data.into(); + crate::Object(Some(unsafe { crate::rcmut::from_rc(data) })) + } + pub struct Array { + pub data: Box<[T]>, + } + impl Array { + pub fn new(data: Box<[T]>) -> crate::Object> { + crate::Object(Some(crate::rcmut::new(Array { data }))) + } + + pub fn placebos_usize_object(length: usize) -> crate::Object>> { + let x = crate::array::placebos_box_usize::(length); + crate::rcmut::Array::>::new(x) + } + } + /// A reference counted smart pointer with unrestricted mutability. + pub type RcMut = Rc>; + + /// Create a new RcMut for a value. + pub fn new(val: T) -> RcMut { + Rc::new(UnsafeCell::new(val)) + } + /// Retrieve the inner Rc as a reference. + pub unsafe fn from(value: Box) -> RcMut { + mem::transmute(Rc::new(*value)) + } + + pub unsafe fn from_rc(value: Rc) -> RcMut { + mem::transmute(value) + } + + pub unsafe fn as_rc(this: &RcMut) -> &Rc { + mem::transmute(this) + } + pub unsafe fn to_rc(this: RcMut) -> Rc { + mem::transmute(this) + } + + /// Retrieve the inner Rc as a mutable reference. + pub unsafe fn as_rc_mut(this: &mut RcMut) -> &mut Rc { + mem::transmute(this) + } + + /// Get a reference to the value. + #[inline] + pub unsafe fn borrow(this: &RcMut) -> &T { + mem::transmute(this.get()) + } + + /// Get a mutable reference to the value. + #[inline] + pub unsafe fn borrow_mut(this: &mut RcMut) -> &mut T { + mem::transmute(this.get()) + } + + pub unsafe fn downcast(this: RcMut) -> Option> { + let t: Rc = to_rc(this); + let t: Rc = Rc::downcast::(t).ok()?; + mem::transmute(t) + } + + /// A reference counted smart pointer with unrestricted mutability. + pub struct ArcMut { + inner: Arc>, + } + + impl Clone for ArcMut { + fn clone(&self) -> ArcMut { + ArcMut { + inner: self.inner.clone(), + } + } + } + + impl ArcMut { + /// Create a new ArcMut for a value. + pub fn new(val: T) -> ArcMut { + ArcMut { + inner: Arc::new(UnsafeCell::new(val)), + } + } + } + + impl ArcMut { + /// Retrieve the inner Rc as a reference. + pub unsafe fn as_arc(&self) -> &Arc { + mem::transmute(&self.inner) + } + + /// Retrieve the inner Rc as a mutable reference. + pub unsafe fn as_arc_mut(&mut self) -> &mut Arc { + mem::transmute(&mut self.inner) + } + + /// Get a reference to the value. + pub unsafe fn borrow(&self) -> &T { + mem::transmute(self.inner.get()) + } + + /// Get a mutable reference to the value. + pub unsafe fn borrow_mut(&mut self) -> &mut T { + mem::transmute(self.inner.get()) + } + } +} + +///////////////// +// Method helpers +///////////////// + +// A MaybePlacebo is a value that is either a placebo or a real value. +// It is a wrapper around a MaybeUninit value, but knowing whether the value is a placebo or not. +// That way, when it is dropped, the underlying value is only dropped if it is not a placebo. + +#[derive(Clone)] +pub struct MaybePlacebo(Option); +impl MaybePlacebo { + #[inline] + pub fn read(&self) -> T { + // safety: Dafny will guarantee we will never read a placebo value + unsafe { self.0.clone().unwrap_unchecked() } + } +} + +impl MaybePlacebo { + #[inline] + pub fn new() -> Self { + MaybePlacebo(None) + } + #[inline] + pub fn from(v: T) -> Self { + MaybePlacebo(Some(v)) + } +} + +#[macro_export] +macro_rules! tuple_extract_index { + ($x:expr, $i:expr) => { + $x.$i + }; +} + +// A macro that maps tuple (a, b, c...) to produce (MaybePlacebo::from(a), MaybePlacebo::from(b), MaybePlacebo::from(c)) +// maybe_placebos_from!(expr, 0, 1, 2, 3) +// = let x = expr; +// (MaybePlacebo::from(x.0), MaybePlacebo::from(x.1), MaybePlacebo::from(x.2), MaybePlacebo::from(x.3)) +#[macro_export] +macro_rules! maybe_placebos_from { + ($x:expr, $($i:tt), *) => { + { + let x = $x; + ( + $( $crate::MaybePlacebo::from(x.$i), )* + ) + } + } +} + +//////////////// +// Coercion +//////////////// + +pub fn upcast_object() -> Rc) -> Object> + where A : UpcastObject +{ + Rc::new(|x: Object| x.as_ref().upcast()) +} + +pub fn upcast() -> Rc) -> Ptr> + where A: Upcast +{ + Rc::new(|x: Ptr| read!(x).upcast()) +} + +pub fn upcast_box() -> Rc Box> + where A: UpcastBox +{ + Rc::new(|x: A| UpcastBox::upcast(&x)) +} +pub fn upcast_box_box() -> Rc) -> Box> + where Box: UpcastBox +{ + Rc::new(|x: Box| UpcastBox::upcast(&x)) +} + +pub fn upcast_id() -> Rc A> +{ + Rc::new(|x: A| x) +} + +pub fn rc_coerce(f: Rc U>) -> Rc) -> Rc> { + Rc::new(move |x: Rc| Rc::new(f.as_ref()(x.as_ref().clone()))) +} +pub fn box_coerce(f: Box U>) -> Box) -> Box> { + Box::new(move |x: Box| Box::new(f.as_ref()(x.as_ref().clone()))) +} + +pub fn fn1_coerce( + a_to_r: Rc R + 'static>) -> + Rc A>) -> Rc R> + 'static> { + Rc::new(move |t_to_a: Rc A>| { + let a_to_r = a_to_r.clone(); + let t_to_a = t_to_a.clone(); + let r: Rc R + 'static> = Rc::new(move |t: &T| a_to_r(t_to_a(t))); + r + }) +} + +// For pointers +pub trait Upcast { + fn upcast(&self) -> Ptr; +} +pub trait UpcastObject { + fn upcast(&self) -> Object; +} +impl Upcast for T { + fn upcast(&self) -> Ptr { + Ptr::from_raw_nonnull(self as *const T as *mut T) + } +} +impl UpcastObject for T { + fn upcast(&self) -> Object { + Object::from_ref(self) + } +} + +// For general traits +pub trait UpcastBox { + fn upcast(&self) -> Box; +} + + +#[macro_export] +macro_rules! Extends { + ($traitType: tt) => { + $traitType + ::dafny_runtime::Upcast + } +} + +#[macro_export] +macro_rules! UpcastFn { + ($B:ty) => { + fn upcast(&self) -> $crate::Ptr<$B> { + $crate::Ptr::from_raw_nonnull(self as *const Self as *mut Self as *mut $B) + } + }; +} + +#[macro_export] +macro_rules! UpcastObjectFn { + ($B:ty) => { + fn upcast(&self) -> $crate::Object<$B> { + $crate::Object::from_ref(self as &$B) + } + }; +} + +// It works only when there is no type parameters for $A... +#[macro_export] +macro_rules! UpcastDef { + ($A:ty, $B:ty) => { + impl $crate::Upcast<$B> for $A { + $crate::UpcastFn!($B); + } + }; + + ($A:ty, $B:ty, $($C: ty),*) => { + $crate::UpcastDef!($A, $B); + $crate::UpcastDef!($A, $($C),*); + } +} + +#[macro_export] +macro_rules! UpcastDefObject { + ($A:ty, $B:ty) => { + impl $crate::UpcastObject<$B> for $A { + $crate::UpcastObjectFn!($B); + } + }; + + ($A:ty, $B:ty, $($C: ty),*) => { + $crate::UpcastDefObject!($A, $B); + $crate::UpcastDefObject!($A, $($C),*); + } +} + +// Coercions for sets +impl Set +{ + pub fn coerce(f: Rc V>) -> Rc) -> Set> { + Rc::new(move |x: Set| { + // We need to upcast individual elements + let f2 = f.clone(); + let mut new_set: HashSet = HashSet::::default(); + for value in x.data.iter() { + new_set.insert(f2(value.clone())); + } + Set::from_hashset_owned(new_set) + }) + } +} + +// Coercions for sequences +impl Sequence +{ + pub fn coerce(f: Rc V>) -> Rc) -> Sequence> { + // We need to upcast individual elements + Rc::new(move |x: Sequence| { + let mut new_seq: Vec = Vec::::default(); + let f2 = f.clone(); + for value in x.to_array().iter() { + new_seq.push(f2(value.clone())); + } + Sequence::from_array_owned(new_seq) + }) + } +} + +// Coercions for multisets +impl Multiset +{ + pub fn coerce(f: Rc V>) -> Rc) -> Multiset> { + // We need to upcast individual elements + Rc::new(move |x: Multiset| { + let f2 = f.clone(); + // We need to upcast individual elements + let mut new_multiset: HashMap = HashMap::::default(); + for (value, count) in x.data.into_iter() { + new_multiset.insert(f2(value), count.clone()); + } + Multiset::from_hashmap_owned(new_multiset) + }) + } +} + +// Coercions for Maps +impl Map +{ + pub fn coerce(f: Rc V>) -> Rc) -> Map> { + // We need to upcast individual elements + Rc::new(move |x: Map| { + let f2 = f.clone(); + let mut new_map: HashMap = HashMap::::default(); + for (key, value) in x.data.iter() { + new_map.insert(key.clone(), f2(value.clone())); + } + Map::from_hashmap_owned(new_map) + }) + } +} \ No newline at end of file diff --git a/releases/rust/db_esdk/dafny_runtime_rust/src/system/mod.rs b/releases/rust/db_esdk/dafny_runtime_rust/src/system/mod.rs new file mode 100644 index 000000000..c530be0a5 --- /dev/null +++ b/releases/rust/db_esdk/dafny_runtime_rust/src/system/mod.rs @@ -0,0 +1,3771 @@ +#![allow(warnings, unconditional_panic)] +#![allow(nonstandard_style)] + +pub mod _System { + pub use crate::DafnyInt; + pub use crate::DafnyType; + pub use ::std::fmt::Debug; + pub use ::std::fmt::Formatter; + pub use ::std::fmt::Result; + pub use crate::DafnyPrint; + pub use ::std::rc::Rc; + 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 crate::SequenceIter; + pub use crate::seq; + + pub type nat = DafnyInt; + + #[derive(PartialEq, Clone)] + pub enum Tuple2 { + _T2 { + _0: T0, + _1: T1 + } + } + + impl Tuple2 { + pub fn _0(&self) -> &T0 { + match self { + Tuple2::_T2{_0, _1, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple2::_T2{_0, _1, } => _1, + } + } + } + + impl Debug + for Tuple2 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple2 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple2::_T2{_0, _1, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple2 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>) -> Rc) -> Tuple2> { + Rc::new(move |this: Self| -> Tuple2{ + match this { + Tuple2::_T2{_0, _1, } => { + Tuple2::_T2 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1) + } + }, + } + }) + } + } + + impl Eq + for Tuple2 {} + + impl Hash + for Tuple2 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple2::_T2{_0, _1, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state) + }, + } + } + } + + impl Default + for Tuple2 { + fn default() -> Tuple2 { + Tuple2::_T2 { + _0: Default::default(), + _1: Default::default() + } + } + } + + impl AsRef> + for Tuple2 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple0 { + _T0 {} + } + + impl Tuple0 {} + + impl Debug + for Tuple0 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple0 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple0::_T0{} => { + write!(_formatter, "")?; + Ok(()) + }, + } + } + } + + impl Tuple0 { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(Tuple0::_T0 {})].iter() + } + } + + impl Eq + for Tuple0 {} + + impl Hash + for Tuple0 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple0::_T0{} => { + + }, + } + } + } + + impl Default + for Tuple0 { + fn default() -> Tuple0 { + Tuple0::_T0 {} + } + } + + impl AsRef + for Tuple0 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple1 { + _T1 { + _0: T0 + } + } + + impl Tuple1 { + pub fn _0(&self) -> &T0 { + match self { + Tuple1::_T1{_0, } => _0, + } + } + } + + impl Debug + for Tuple1 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple1 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple1::_T1{_0, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple1 { + pub fn coerce(f_0: Rc r#__T0 + 'static>) -> Rc) -> Tuple1> { + Rc::new(move |this: Self| -> Tuple1{ + match this { + Tuple1::_T1{_0, } => { + Tuple1::_T1 { + _0: f_0.clone()(_0) + } + }, + } + }) + } + } + + impl Eq + for Tuple1 {} + + impl Hash + for Tuple1 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple1::_T1{_0, } => { + Hash::hash(_0, _state) + }, + } + } + } + + impl Default + for Tuple1 { + fn default() -> Tuple1 { + Tuple1::_T1 { + _0: Default::default() + } + } + } + + impl AsRef> + for Tuple1 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple3 { + _T3 { + _0: T0, + _1: T1, + _2: T2 + } + } + + impl Tuple3 { + pub fn _0(&self) -> &T0 { + match self { + Tuple3::_T3{_0, _1, _2, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple3::_T3{_0, _1, _2, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple3::_T3{_0, _1, _2, } => _2, + } + } + } + + impl Debug + for Tuple3 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple3 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple3::_T3{_0, _1, _2, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple3 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>) -> Rc) -> Tuple3> { + Rc::new(move |this: Self| -> Tuple3{ + match this { + Tuple3::_T3{_0, _1, _2, } => { + Tuple3::_T3 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2) + } + }, + } + }) + } + } + + impl Eq + for Tuple3 {} + + impl Hash + for Tuple3 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple3::_T3{_0, _1, _2, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state) + }, + } + } + } + + impl Default + for Tuple3 { + fn default() -> Tuple3 { + Tuple3::_T3 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default() + } + } + } + + impl AsRef> + for Tuple3 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple4 { + _T4 { + _0: T0, + _1: T1, + _2: T2, + _3: T3 + } + } + + impl Tuple4 { + pub fn _0(&self) -> &T0 { + match self { + Tuple4::_T4{_0, _1, _2, _3, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple4::_T4{_0, _1, _2, _3, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple4::_T4{_0, _1, _2, _3, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple4::_T4{_0, _1, _2, _3, } => _3, + } + } + } + + impl Debug + for Tuple4 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple4 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple4::_T4{_0, _1, _2, _3, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple4 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>) -> Rc) -> Tuple4> { + Rc::new(move |this: Self| -> Tuple4{ + match this { + Tuple4::_T4{_0, _1, _2, _3, } => { + Tuple4::_T4 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3) + } + }, + } + }) + } + } + + impl Eq + for Tuple4 {} + + impl Hash + for Tuple4 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple4::_T4{_0, _1, _2, _3, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state) + }, + } + } + } + + impl Default + for Tuple4 { + fn default() -> Tuple4 { + Tuple4::_T4 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default() + } + } + } + + impl AsRef> + for Tuple4 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple5 { + _T5 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4 + } + } + + impl Tuple5 { + pub fn _0(&self) -> &T0 { + match self { + Tuple5::_T5{_0, _1, _2, _3, _4, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple5::_T5{_0, _1, _2, _3, _4, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple5::_T5{_0, _1, _2, _3, _4, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple5::_T5{_0, _1, _2, _3, _4, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple5::_T5{_0, _1, _2, _3, _4, } => _4, + } + } + } + + impl Debug + for Tuple5 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple5 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple5::_T5{_0, _1, _2, _3, _4, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple5 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>) -> Rc) -> Tuple5> { + Rc::new(move |this: Self| -> Tuple5{ + match this { + Tuple5::_T5{_0, _1, _2, _3, _4, } => { + Tuple5::_T5 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4) + } + }, + } + }) + } + } + + impl Eq + for Tuple5 {} + + impl Hash + for Tuple5 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple5::_T5{_0, _1, _2, _3, _4, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state) + }, + } + } + } + + impl Default + for Tuple5 { + fn default() -> Tuple5 { + Tuple5::_T5 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default() + } + } + } + + impl AsRef> + for Tuple5 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple6 { + _T6 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5 + } + } + + impl Tuple6 { + pub fn _0(&self) -> &T0 { + match self { + Tuple6::_T6{_0, _1, _2, _3, _4, _5, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple6::_T6{_0, _1, _2, _3, _4, _5, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple6::_T6{_0, _1, _2, _3, _4, _5, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple6::_T6{_0, _1, _2, _3, _4, _5, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple6::_T6{_0, _1, _2, _3, _4, _5, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple6::_T6{_0, _1, _2, _3, _4, _5, } => _5, + } + } + } + + impl Debug + for Tuple6 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple6 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple6::_T6{_0, _1, _2, _3, _4, _5, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple6 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>) -> Rc) -> Tuple6> { + Rc::new(move |this: Self| -> Tuple6{ + match this { + Tuple6::_T6{_0, _1, _2, _3, _4, _5, } => { + Tuple6::_T6 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5) + } + }, + } + }) + } + } + + impl Eq + for Tuple6 {} + + impl Hash + for Tuple6 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple6::_T6{_0, _1, _2, _3, _4, _5, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state) + }, + } + } + } + + impl Default + for Tuple6 { + fn default() -> Tuple6 { + Tuple6::_T6 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default() + } + } + } + + impl AsRef> + for Tuple6 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple7 { + _T7 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6 + } + } + + impl Tuple7 { + pub fn _0(&self) -> &T0 { + match self { + Tuple7::_T7{_0, _1, _2, _3, _4, _5, _6, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple7::_T7{_0, _1, _2, _3, _4, _5, _6, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple7::_T7{_0, _1, _2, _3, _4, _5, _6, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple7::_T7{_0, _1, _2, _3, _4, _5, _6, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple7::_T7{_0, _1, _2, _3, _4, _5, _6, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple7::_T7{_0, _1, _2, _3, _4, _5, _6, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple7::_T7{_0, _1, _2, _3, _4, _5, _6, } => _6, + } + } + } + + impl Debug + for Tuple7 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple7 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple7::_T7{_0, _1, _2, _3, _4, _5, _6, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple7 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>) -> Rc) -> Tuple7> { + Rc::new(move |this: Self| -> Tuple7{ + match this { + Tuple7::_T7{_0, _1, _2, _3, _4, _5, _6, } => { + Tuple7::_T7 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6) + } + }, + } + }) + } + } + + impl Eq + for Tuple7 {} + + impl Hash + for Tuple7 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple7::_T7{_0, _1, _2, _3, _4, _5, _6, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state) + }, + } + } + } + + impl Default + for Tuple7 { + fn default() -> Tuple7 { + Tuple7::_T7 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default() + } + } + } + + impl AsRef> + for Tuple7 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple8 { + _T8 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7 + } + } + + impl Tuple8 { + pub fn _0(&self) -> &T0 { + match self { + Tuple8::_T8{_0, _1, _2, _3, _4, _5, _6, _7, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple8::_T8{_0, _1, _2, _3, _4, _5, _6, _7, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple8::_T8{_0, _1, _2, _3, _4, _5, _6, _7, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple8::_T8{_0, _1, _2, _3, _4, _5, _6, _7, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple8::_T8{_0, _1, _2, _3, _4, _5, _6, _7, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple8::_T8{_0, _1, _2, _3, _4, _5, _6, _7, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple8::_T8{_0, _1, _2, _3, _4, _5, _6, _7, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple8::_T8{_0, _1, _2, _3, _4, _5, _6, _7, } => _7, + } + } + } + + impl Debug + for Tuple8 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple8 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple8::_T8{_0, _1, _2, _3, _4, _5, _6, _7, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple8 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>) -> Rc) -> Tuple8> { + Rc::new(move |this: Self| -> Tuple8{ + match this { + Tuple8::_T8{_0, _1, _2, _3, _4, _5, _6, _7, } => { + Tuple8::_T8 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7) + } + }, + } + }) + } + } + + impl Eq + for Tuple8 {} + + impl Hash + for Tuple8 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple8::_T8{_0, _1, _2, _3, _4, _5, _6, _7, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state) + }, + } + } + } + + impl Default + for Tuple8 { + fn default() -> Tuple8 { + Tuple8::_T8 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default() + } + } + } + + impl AsRef> + for Tuple8 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple9 { + _T9 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8 + } + } + + impl Tuple9 { + pub fn _0(&self) -> &T0 { + match self { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => _8, + } + } + } + + impl Debug + for Tuple9 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple9 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple9 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>) -> Rc) -> Tuple9> { + Rc::new(move |this: Self| -> Tuple9{ + match this { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => { + Tuple9::_T9 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8) + } + }, + } + }) + } + } + + impl Eq + for Tuple9 {} + + impl Hash + for Tuple9 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple9::_T9{_0, _1, _2, _3, _4, _5, _6, _7, _8, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state) + }, + } + } + } + + impl Default + for Tuple9 { + fn default() -> Tuple9 { + Tuple9::_T9 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default() + } + } + } + + impl AsRef> + for Tuple9 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple10 { + _T10 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8, + _9: T9 + } + } + + impl Tuple10 { + pub fn _0(&self) -> &T0 { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => _8, + } + } + pub fn _9(&self) -> &T9 { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => _9, + } + } + } + + impl Debug + for Tuple10 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple10 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_9, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple10 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>, f_9: Rc r#__T9 + 'static>) -> Rc) -> Tuple10> { + Rc::new(move |this: Self| -> Tuple10{ + match this { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => { + Tuple10::_T10 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8), + _9: f_9.clone()(_9) + } + }, + } + }) + } + } + + impl Eq + for Tuple10 {} + + impl Hash + for Tuple10 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple10::_T10{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state); + Hash::hash(_9, _state) + }, + } + } + } + + impl Default + for Tuple10 { + fn default() -> Tuple10 { + Tuple10::_T10 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default(), + _9: Default::default() + } + } + } + + impl AsRef> + for Tuple10 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple11 { + _T11 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8, + _9: T9, + _10: T10 + } + } + + impl Tuple11 { + pub fn _0(&self) -> &T0 { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => _8, + } + } + pub fn _9(&self) -> &T9 { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => _9, + } + } + pub fn _10(&self) -> &T10 { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => _10, + } + } + } + + impl Debug + for Tuple11 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple11 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_9, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_10, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple11 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>, f_9: Rc r#__T9 + 'static>, f_10: Rc r#__T10 + 'static>) -> Rc) -> Tuple11> { + Rc::new(move |this: Self| -> Tuple11{ + match this { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => { + Tuple11::_T11 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8), + _9: f_9.clone()(_9), + _10: f_10.clone()(_10) + } + }, + } + }) + } + } + + impl Eq + for Tuple11 {} + + impl Hash + for Tuple11 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple11::_T11{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state); + Hash::hash(_9, _state); + Hash::hash(_10, _state) + }, + } + } + } + + impl Default + for Tuple11 { + fn default() -> Tuple11 { + Tuple11::_T11 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default(), + _9: Default::default(), + _10: Default::default() + } + } + } + + impl AsRef> + for Tuple11 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple12 { + _T12 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8, + _9: T9, + _10: T10, + _11: T11 + } + } + + impl Tuple12 { + pub fn _0(&self) -> &T0 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _8, + } + } + pub fn _9(&self) -> &T9 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _9, + } + } + pub fn _10(&self) -> &T10 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _10, + } + } + pub fn _11(&self) -> &T11 { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => _11, + } + } + } + + impl Debug + for Tuple12 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple12 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_9, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_10, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_11, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple12 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>, f_9: Rc r#__T9 + 'static>, f_10: Rc r#__T10 + 'static>, f_11: Rc r#__T11 + 'static>) -> Rc) -> Tuple12> { + Rc::new(move |this: Self| -> Tuple12{ + match this { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => { + Tuple12::_T12 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8), + _9: f_9.clone()(_9), + _10: f_10.clone()(_10), + _11: f_11.clone()(_11) + } + }, + } + }) + } + } + + impl Eq + for Tuple12 {} + + impl Hash + for Tuple12 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple12::_T12{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state); + Hash::hash(_9, _state); + Hash::hash(_10, _state); + Hash::hash(_11, _state) + }, + } + } + } + + impl Default + for Tuple12 { + fn default() -> Tuple12 { + Tuple12::_T12 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default(), + _9: Default::default(), + _10: Default::default(), + _11: Default::default() + } + } + } + + impl AsRef> + for Tuple12 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple13 { + _T13 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8, + _9: T9, + _10: T10, + _11: T11, + _12: T12 + } + } + + impl Tuple13 { + pub fn _0(&self) -> &T0 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _8, + } + } + pub fn _9(&self) -> &T9 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _9, + } + } + pub fn _10(&self) -> &T10 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _10, + } + } + pub fn _11(&self) -> &T11 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _11, + } + } + pub fn _12(&self) -> &T12 { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => _12, + } + } + } + + impl Debug + for Tuple13 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple13 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_9, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_10, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_11, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_12, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple13 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>, f_9: Rc r#__T9 + 'static>, f_10: Rc r#__T10 + 'static>, f_11: Rc r#__T11 + 'static>, f_12: Rc r#__T12 + 'static>) -> Rc) -> Tuple13> { + Rc::new(move |this: Self| -> Tuple13{ + match this { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => { + Tuple13::_T13 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8), + _9: f_9.clone()(_9), + _10: f_10.clone()(_10), + _11: f_11.clone()(_11), + _12: f_12.clone()(_12) + } + }, + } + }) + } + } + + impl Eq + for Tuple13 {} + + impl Hash + for Tuple13 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple13::_T13{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state); + Hash::hash(_9, _state); + Hash::hash(_10, _state); + Hash::hash(_11, _state); + Hash::hash(_12, _state) + }, + } + } + } + + impl Default + for Tuple13 { + fn default() -> Tuple13 { + Tuple13::_T13 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default(), + _9: Default::default(), + _10: Default::default(), + _11: Default::default(), + _12: Default::default() + } + } + } + + impl AsRef> + for Tuple13 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple14 { + _T14 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8, + _9: T9, + _10: T10, + _11: T11, + _12: T12, + _13: T13 + } + } + + impl Tuple14 { + pub fn _0(&self) -> &T0 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _8, + } + } + pub fn _9(&self) -> &T9 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _9, + } + } + pub fn _10(&self) -> &T10 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _10, + } + } + pub fn _11(&self) -> &T11 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _11, + } + } + pub fn _12(&self) -> &T12 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _12, + } + } + pub fn _13(&self) -> &T13 { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => _13, + } + } + } + + impl Debug + for Tuple14 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple14 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_9, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_10, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_11, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_12, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_13, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple14 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>, f_9: Rc r#__T9 + 'static>, f_10: Rc r#__T10 + 'static>, f_11: Rc r#__T11 + 'static>, f_12: Rc r#__T12 + 'static>, f_13: Rc r#__T13 + 'static>) -> Rc) -> Tuple14> { + Rc::new(move |this: Self| -> Tuple14{ + match this { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => { + Tuple14::_T14 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8), + _9: f_9.clone()(_9), + _10: f_10.clone()(_10), + _11: f_11.clone()(_11), + _12: f_12.clone()(_12), + _13: f_13.clone()(_13) + } + }, + } + }) + } + } + + impl Eq + for Tuple14 {} + + impl Hash + for Tuple14 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple14::_T14{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state); + Hash::hash(_9, _state); + Hash::hash(_10, _state); + Hash::hash(_11, _state); + Hash::hash(_12, _state); + Hash::hash(_13, _state) + }, + } + } + } + + impl Default + for Tuple14 { + fn default() -> Tuple14 { + Tuple14::_T14 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default(), + _9: Default::default(), + _10: Default::default(), + _11: Default::default(), + _12: Default::default(), + _13: Default::default() + } + } + } + + impl AsRef> + for Tuple14 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple15 { + _T15 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8, + _9: T9, + _10: T10, + _11: T11, + _12: T12, + _13: T13, + _14: T14 + } + } + + impl Tuple15 { + pub fn _0(&self) -> &T0 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _8, + } + } + pub fn _9(&self) -> &T9 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _9, + } + } + pub fn _10(&self) -> &T10 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _10, + } + } + pub fn _11(&self) -> &T11 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _11, + } + } + pub fn _12(&self) -> &T12 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _12, + } + } + pub fn _13(&self) -> &T13 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _13, + } + } + pub fn _14(&self) -> &T14 { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => _14, + } + } + } + + impl Debug + for Tuple15 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple15 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_9, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_10, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_11, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_12, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_13, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_14, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple15 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>, f_9: Rc r#__T9 + 'static>, f_10: Rc r#__T10 + 'static>, f_11: Rc r#__T11 + 'static>, f_12: Rc r#__T12 + 'static>, f_13: Rc r#__T13 + 'static>, f_14: Rc r#__T14 + 'static>) -> Rc) -> Tuple15> { + Rc::new(move |this: Self| -> Tuple15{ + match this { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => { + Tuple15::_T15 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8), + _9: f_9.clone()(_9), + _10: f_10.clone()(_10), + _11: f_11.clone()(_11), + _12: f_12.clone()(_12), + _13: f_13.clone()(_13), + _14: f_14.clone()(_14) + } + }, + } + }) + } + } + + impl Eq + for Tuple15 {} + + impl Hash + for Tuple15 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple15::_T15{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state); + Hash::hash(_9, _state); + Hash::hash(_10, _state); + Hash::hash(_11, _state); + Hash::hash(_12, _state); + Hash::hash(_13, _state); + Hash::hash(_14, _state) + }, + } + } + } + + impl Default + for Tuple15 { + fn default() -> Tuple15 { + Tuple15::_T15 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default(), + _9: Default::default(), + _10: Default::default(), + _11: Default::default(), + _12: Default::default(), + _13: Default::default(), + _14: Default::default() + } + } + } + + impl AsRef> + for Tuple15 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple16 { + _T16 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8, + _9: T9, + _10: T10, + _11: T11, + _12: T12, + _13: T13, + _14: T14, + _15: T15 + } + } + + impl Tuple16 { + pub fn _0(&self) -> &T0 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _8, + } + } + pub fn _9(&self) -> &T9 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _9, + } + } + pub fn _10(&self) -> &T10 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _10, + } + } + pub fn _11(&self) -> &T11 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _11, + } + } + pub fn _12(&self) -> &T12 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _12, + } + } + pub fn _13(&self) -> &T13 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _13, + } + } + pub fn _14(&self) -> &T14 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _14, + } + } + pub fn _15(&self) -> &T15 { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => _15, + } + } + } + + impl Debug + for Tuple16 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple16 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_9, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_10, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_11, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_12, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_13, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_14, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_15, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple16 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>, f_9: Rc r#__T9 + 'static>, f_10: Rc r#__T10 + 'static>, f_11: Rc r#__T11 + 'static>, f_12: Rc r#__T12 + 'static>, f_13: Rc r#__T13 + 'static>, f_14: Rc r#__T14 + 'static>, f_15: Rc r#__T15 + 'static>) -> Rc) -> Tuple16> { + Rc::new(move |this: Self| -> Tuple16{ + match this { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => { + Tuple16::_T16 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8), + _9: f_9.clone()(_9), + _10: f_10.clone()(_10), + _11: f_11.clone()(_11), + _12: f_12.clone()(_12), + _13: f_13.clone()(_13), + _14: f_14.clone()(_14), + _15: f_15.clone()(_15) + } + }, + } + }) + } + } + + impl Eq + for Tuple16 {} + + impl Hash + for Tuple16 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple16::_T16{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state); + Hash::hash(_9, _state); + Hash::hash(_10, _state); + Hash::hash(_11, _state); + Hash::hash(_12, _state); + Hash::hash(_13, _state); + Hash::hash(_14, _state); + Hash::hash(_15, _state) + }, + } + } + } + + impl Default + for Tuple16 { + fn default() -> Tuple16 { + Tuple16::_T16 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default(), + _9: Default::default(), + _10: Default::default(), + _11: Default::default(), + _12: Default::default(), + _13: Default::default(), + _14: Default::default(), + _15: Default::default() + } + } + } + + impl AsRef> + for Tuple16 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple17 { + _T17 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8, + _9: T9, + _10: T10, + _11: T11, + _12: T12, + _13: T13, + _14: T14, + _15: T15, + _16: T16 + } + } + + impl Tuple17 { + pub fn _0(&self) -> &T0 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _8, + } + } + pub fn _9(&self) -> &T9 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _9, + } + } + pub fn _10(&self) -> &T10 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _10, + } + } + pub fn _11(&self) -> &T11 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _11, + } + } + pub fn _12(&self) -> &T12 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _12, + } + } + pub fn _13(&self) -> &T13 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _13, + } + } + pub fn _14(&self) -> &T14 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _14, + } + } + pub fn _15(&self) -> &T15 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _15, + } + } + pub fn _16(&self) -> &T16 { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => _16, + } + } + } + + impl Debug + for Tuple17 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple17 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_9, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_10, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_11, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_12, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_13, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_14, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_15, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_16, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple17 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>, f_9: Rc r#__T9 + 'static>, f_10: Rc r#__T10 + 'static>, f_11: Rc r#__T11 + 'static>, f_12: Rc r#__T12 + 'static>, f_13: Rc r#__T13 + 'static>, f_14: Rc r#__T14 + 'static>, f_15: Rc r#__T15 + 'static>, f_16: Rc r#__T16 + 'static>) -> Rc) -> Tuple17> { + Rc::new(move |this: Self| -> Tuple17{ + match this { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => { + Tuple17::_T17 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8), + _9: f_9.clone()(_9), + _10: f_10.clone()(_10), + _11: f_11.clone()(_11), + _12: f_12.clone()(_12), + _13: f_13.clone()(_13), + _14: f_14.clone()(_14), + _15: f_15.clone()(_15), + _16: f_16.clone()(_16) + } + }, + } + }) + } + } + + impl Eq + for Tuple17 {} + + impl Hash + for Tuple17 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple17::_T17{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state); + Hash::hash(_9, _state); + Hash::hash(_10, _state); + Hash::hash(_11, _state); + Hash::hash(_12, _state); + Hash::hash(_13, _state); + Hash::hash(_14, _state); + Hash::hash(_15, _state); + Hash::hash(_16, _state) + }, + } + } + } + + impl Default + for Tuple17 { + fn default() -> Tuple17 { + Tuple17::_T17 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default(), + _9: Default::default(), + _10: Default::default(), + _11: Default::default(), + _12: Default::default(), + _13: Default::default(), + _14: Default::default(), + _15: Default::default(), + _16: Default::default() + } + } + } + + impl AsRef> + for Tuple17 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple18 { + _T18 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8, + _9: T9, + _10: T10, + _11: T11, + _12: T12, + _13: T13, + _14: T14, + _15: T15, + _16: T16, + _17: T17 + } + } + + impl Tuple18 { + pub fn _0(&self) -> &T0 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _8, + } + } + pub fn _9(&self) -> &T9 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _9, + } + } + pub fn _10(&self) -> &T10 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _10, + } + } + pub fn _11(&self) -> &T11 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _11, + } + } + pub fn _12(&self) -> &T12 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _12, + } + } + pub fn _13(&self) -> &T13 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _13, + } + } + pub fn _14(&self) -> &T14 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _14, + } + } + pub fn _15(&self) -> &T15 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _15, + } + } + pub fn _16(&self) -> &T16 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _16, + } + } + pub fn _17(&self) -> &T17 { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => _17, + } + } + } + + impl Debug + for Tuple18 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple18 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_9, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_10, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_11, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_12, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_13, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_14, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_15, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_16, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_17, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple18 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>, f_9: Rc r#__T9 + 'static>, f_10: Rc r#__T10 + 'static>, f_11: Rc r#__T11 + 'static>, f_12: Rc r#__T12 + 'static>, f_13: Rc r#__T13 + 'static>, f_14: Rc r#__T14 + 'static>, f_15: Rc r#__T15 + 'static>, f_16: Rc r#__T16 + 'static>, f_17: Rc r#__T17 + 'static>) -> Rc) -> Tuple18> { + Rc::new(move |this: Self| -> Tuple18{ + match this { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => { + Tuple18::_T18 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8), + _9: f_9.clone()(_9), + _10: f_10.clone()(_10), + _11: f_11.clone()(_11), + _12: f_12.clone()(_12), + _13: f_13.clone()(_13), + _14: f_14.clone()(_14), + _15: f_15.clone()(_15), + _16: f_16.clone()(_16), + _17: f_17.clone()(_17) + } + }, + } + }) + } + } + + impl Eq + for Tuple18 {} + + impl Hash + for Tuple18 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple18::_T18{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state); + Hash::hash(_9, _state); + Hash::hash(_10, _state); + Hash::hash(_11, _state); + Hash::hash(_12, _state); + Hash::hash(_13, _state); + Hash::hash(_14, _state); + Hash::hash(_15, _state); + Hash::hash(_16, _state); + Hash::hash(_17, _state) + }, + } + } + } + + impl Default + for Tuple18 { + fn default() -> Tuple18 { + Tuple18::_T18 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default(), + _9: Default::default(), + _10: Default::default(), + _11: Default::default(), + _12: Default::default(), + _13: Default::default(), + _14: Default::default(), + _15: Default::default(), + _16: Default::default(), + _17: Default::default() + } + } + } + + impl AsRef> + for Tuple18 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple19 { + _T19 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8, + _9: T9, + _10: T10, + _11: T11, + _12: T12, + _13: T13, + _14: T14, + _15: T15, + _16: T16, + _17: T17, + _18: T18 + } + } + + impl Tuple19 { + pub fn _0(&self) -> &T0 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _8, + } + } + pub fn _9(&self) -> &T9 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _9, + } + } + pub fn _10(&self) -> &T10 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _10, + } + } + pub fn _11(&self) -> &T11 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _11, + } + } + pub fn _12(&self) -> &T12 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _12, + } + } + pub fn _13(&self) -> &T13 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _13, + } + } + pub fn _14(&self) -> &T14 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _14, + } + } + pub fn _15(&self) -> &T15 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _15, + } + } + pub fn _16(&self) -> &T16 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _16, + } + } + pub fn _17(&self) -> &T17 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _17, + } + } + pub fn _18(&self) -> &T18 { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => _18, + } + } + } + + impl Debug + for Tuple19 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple19 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_9, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_10, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_11, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_12, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_13, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_14, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_15, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_16, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_17, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_18, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple19 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>, f_9: Rc r#__T9 + 'static>, f_10: Rc r#__T10 + 'static>, f_11: Rc r#__T11 + 'static>, f_12: Rc r#__T12 + 'static>, f_13: Rc r#__T13 + 'static>, f_14: Rc r#__T14 + 'static>, f_15: Rc r#__T15 + 'static>, f_16: Rc r#__T16 + 'static>, f_17: Rc r#__T17 + 'static>, f_18: Rc r#__T18 + 'static>) -> Rc) -> Tuple19> { + Rc::new(move |this: Self| -> Tuple19{ + match this { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => { + Tuple19::_T19 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8), + _9: f_9.clone()(_9), + _10: f_10.clone()(_10), + _11: f_11.clone()(_11), + _12: f_12.clone()(_12), + _13: f_13.clone()(_13), + _14: f_14.clone()(_14), + _15: f_15.clone()(_15), + _16: f_16.clone()(_16), + _17: f_17.clone()(_17), + _18: f_18.clone()(_18) + } + }, + } + }) + } + } + + impl Eq + for Tuple19 {} + + impl Hash + for Tuple19 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple19::_T19{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state); + Hash::hash(_9, _state); + Hash::hash(_10, _state); + Hash::hash(_11, _state); + Hash::hash(_12, _state); + Hash::hash(_13, _state); + Hash::hash(_14, _state); + Hash::hash(_15, _state); + Hash::hash(_16, _state); + Hash::hash(_17, _state); + Hash::hash(_18, _state) + }, + } + } + } + + impl Default + for Tuple19 { + fn default() -> Tuple19 { + Tuple19::_T19 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default(), + _9: Default::default(), + _10: Default::default(), + _11: Default::default(), + _12: Default::default(), + _13: Default::default(), + _14: Default::default(), + _15: Default::default(), + _16: Default::default(), + _17: Default::default(), + _18: Default::default() + } + } + } + + impl AsRef> + for Tuple19 { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Tuple20 { + _T20 { + _0: T0, + _1: T1, + _2: T2, + _3: T3, + _4: T4, + _5: T5, + _6: T6, + _7: T7, + _8: T8, + _9: T9, + _10: T10, + _11: T11, + _12: T12, + _13: T13, + _14: T14, + _15: T15, + _16: T16, + _17: T17, + _18: T18, + _19: T19 + } + } + + impl Tuple20 { + pub fn _0(&self) -> &T0 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _0, + } + } + pub fn _1(&self) -> &T1 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _1, + } + } + pub fn _2(&self) -> &T2 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _2, + } + } + pub fn _3(&self) -> &T3 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _3, + } + } + pub fn _4(&self) -> &T4 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _4, + } + } + pub fn _5(&self) -> &T5 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _5, + } + } + pub fn _6(&self) -> &T6 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _6, + } + } + pub fn _7(&self) -> &T7 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _7, + } + } + pub fn _8(&self) -> &T8 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _8, + } + } + pub fn _9(&self) -> &T9 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _9, + } + } + pub fn _10(&self) -> &T10 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _10, + } + } + pub fn _11(&self) -> &T11 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _11, + } + } + pub fn _12(&self) -> &T12 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _12, + } + } + pub fn _13(&self) -> &T13 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _13, + } + } + pub fn _14(&self) -> &T14 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _14, + } + } + pub fn _15(&self) -> &T15 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _15, + } + } + pub fn _16(&self) -> &T16 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _16, + } + } + pub fn _17(&self) -> &T17 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _17, + } + } + pub fn _18(&self) -> &T18 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _18, + } + } + pub fn _19(&self) -> &T19 { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => _19, + } + } + } + + impl Debug + for Tuple20 { + fn fmt(&self, f: &mut Formatter) -> Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Tuple20 { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => { + write!(_formatter, "(")?; + DafnyPrint::fmt_print(_0, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_1, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_2, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_3, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_4, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_5, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_6, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_7, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_8, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_9, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_10, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_11, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_12, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_13, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_14, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_15, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_16, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_17, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_18, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(_19, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Tuple20 { + pub fn coerce(f_0: Rc r#__T0 + 'static>, f_1: Rc r#__T1 + 'static>, f_2: Rc r#__T2 + 'static>, f_3: Rc r#__T3 + 'static>, f_4: Rc r#__T4 + 'static>, f_5: Rc r#__T5 + 'static>, f_6: Rc r#__T6 + 'static>, f_7: Rc r#__T7 + 'static>, f_8: Rc r#__T8 + 'static>, f_9: Rc r#__T9 + 'static>, f_10: Rc r#__T10 + 'static>, f_11: Rc r#__T11 + 'static>, f_12: Rc r#__T12 + 'static>, f_13: Rc r#__T13 + 'static>, f_14: Rc r#__T14 + 'static>, f_15: Rc r#__T15 + 'static>, f_16: Rc r#__T16 + 'static>, f_17: Rc r#__T17 + 'static>, f_18: Rc r#__T18 + 'static>, f_19: Rc r#__T19 + 'static>) -> Rc) -> Tuple20> { + Rc::new(move |this: Self| -> Tuple20{ + match this { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => { + Tuple20::_T20 { + _0: f_0.clone()(_0), + _1: f_1.clone()(_1), + _2: f_2.clone()(_2), + _3: f_3.clone()(_3), + _4: f_4.clone()(_4), + _5: f_5.clone()(_5), + _6: f_6.clone()(_6), + _7: f_7.clone()(_7), + _8: f_8.clone()(_8), + _9: f_9.clone()(_9), + _10: f_10.clone()(_10), + _11: f_11.clone()(_11), + _12: f_12.clone()(_12), + _13: f_13.clone()(_13), + _14: f_14.clone()(_14), + _15: f_15.clone()(_15), + _16: f_16.clone()(_16), + _17: f_17.clone()(_17), + _18: f_18.clone()(_18), + _19: f_19.clone()(_19) + } + }, + } + }) + } + } + + impl Eq + for Tuple20 {} + + impl Hash + for Tuple20 { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Tuple20::_T20{_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, } => { + Hash::hash(_0, _state); + Hash::hash(_1, _state); + Hash::hash(_2, _state); + Hash::hash(_3, _state); + Hash::hash(_4, _state); + Hash::hash(_5, _state); + Hash::hash(_6, _state); + Hash::hash(_7, _state); + Hash::hash(_8, _state); + Hash::hash(_9, _state); + Hash::hash(_10, _state); + Hash::hash(_11, _state); + Hash::hash(_12, _state); + Hash::hash(_13, _state); + Hash::hash(_14, _state); + Hash::hash(_15, _state); + Hash::hash(_16, _state); + Hash::hash(_17, _state); + Hash::hash(_18, _state); + Hash::hash(_19, _state) + }, + } + } + } + + impl Default + for Tuple20 { + fn default() -> Tuple20 { + Tuple20::_T20 { + _0: Default::default(), + _1: Default::default(), + _2: Default::default(), + _3: Default::default(), + _4: Default::default(), + _5: Default::default(), + _6: Default::default(), + _7: Default::default(), + _8: Default::default(), + _9: Default::default(), + _10: Default::default(), + _11: Default::default(), + _12: Default::default(), + _13: Default::default(), + _14: Default::default(), + _15: Default::default(), + _16: Default::default(), + _17: Default::default(), + _18: Default::default(), + _19: Default::default() + } + } + } + + impl AsRef> + for Tuple20 { + fn as_ref(&self) -> &Self { + self + } + } +} \ No newline at end of file diff --git a/releases/rust/db_esdk/dafny_runtime_rust/src/tests/mod.rs b/releases/rust/db_esdk/dafny_runtime_rust/src/tests/mod.rs new file mode 100644 index 000000000..6f04042bd --- /dev/null +++ b/releases/rust/db_esdk/dafny_runtime_rust/src/tests/mod.rs @@ -0,0 +1,1032 @@ +#![allow(nonstandard_style)] + +// Test module +#[cfg(test)] +mod tests { + use crate::*; + + #[test] + fn test_int() { + let x = int!(37); + assert_eq!(x.to_u8().unwrap(), truncate!(x.clone(), u8)); + assert_eq!(x.to_u16().unwrap(), truncate!(x.clone(), u16)); + assert_eq!(x.to_u32().unwrap(), truncate!(x.clone(), u32)); + assert_eq!(x.to_u64().unwrap(), truncate!(x.clone(), u64)); + assert_eq!(x.to_u128().unwrap(), truncate!(x.clone(), u128)); + assert_eq!(x.to_i8().unwrap(), truncate!(x.clone(), i8)); + assert_eq!(x.to_i16().unwrap(), truncate!(x.clone(), i16)); + assert_eq!(x.to_i32().unwrap(), truncate!(x.clone(), i32)); + assert_eq!(x.to_i64().unwrap(), truncate!(x.clone(), i64)); + assert_eq!(x.to_i128().unwrap(), truncate!(x.clone(), i128)); + } + + #[test] + fn test_sequence() { + let values = vec![1, 2, 3]; + let seq = Sequence::::from_array_owned(values.clone()); + assert_eq!(seq.cardinality_usize(), 3); + assert_eq!(seq.to_array(), values.into()); + + // Create a concat array, wrap it into a lazy one, get the i-th element, + // and verify that this operation flattened the array + let left = Sequence::::from_array_owned(vec![1, 2, 3]); + let right = Sequence::::from_array_owned(vec![4, 5, 6]); + let concat = Sequence::::new_concat_sequence(&left, &right); + + assert_eq!(concat.cardinality_usize(), 6); + match &concat { + Sequence::ConcatSequence { + boxed, + length, + left, + .. + } => { + assert_eq!(*length, 6); + assert_eq!(unsafe { &*left.get() }.cardinality_usize(), 3); + // Test that boxed is None + assert!(boxed.as_ref().clone().borrow().as_ref().is_none()); + } + _ => panic!("This should never happen"), + } + let value = concat.get_usize(0); + assert_eq!(value, 1); + match &concat { + crate::Sequence::ConcatSequence { boxed, .. } => { + assert_eq!( + *boxed.as_ref().clone().borrow().as_ref().unwrap().as_ref(), + vec![1, 2, 3, 4, 5, 6] + ); + } + _ => panic!("This should never happen"), + } + } + + #[test] + fn test_dafny_int() { + assert_eq!(int!(0).to_usize(), Some(0)); + assert_eq!(int!(42).to_usize(), Some(42)); + } + + #[test] + fn test_dafny_sequence_print() { + let hello: DafnyString = seq![ + DafnyChar('H'), + DafnyChar('e'), + DafnyChar('l'), + DafnyChar('l'), + DafnyChar('o') + ]; + assert_eq!(DafnyPrintWrapper(&hello).to_string(), "Hello"); + let hello: DafnyStringUTF16 = seq![ + DafnyCharUTF16(0x0048), + DafnyCharUTF16(0x0065), + DafnyCharUTF16(0x006c), + DafnyCharUTF16(0x006c), + DafnyCharUTF16(0x006f) + ]; + assert_eq!(DafnyPrintWrapper(&hello).to_string(), "Hello"); + assert_eq!(DafnyPrintWrapper(&string_of("Hello")).to_string(), "Hello"); + let hello = seq![1, 2, 3]; + assert_eq!(DafnyPrintWrapper(&hello).to_string(), "[1, 2, 3]"); + } + #[test] + fn test_dafny_sequence() { + let s = seq![55, 56, 57]; + assert_eq!(seq![55, 56] != s, true); + assert_eq!(s.cardinality_usize(), 3); + assert_eq!(s.cardinality(), int!(3)); + assert_eq!(s.get(&int!(1)), 56); + assert_eq!(s.slice(&int!(1), &int!(2)), seq![56]); + assert_eq!(s.take(&int!(2)), seq![55, 56]); + assert_eq!(s.drop(&int!(1)), seq![56, 57]); + assert_eq!(s.update_index(&int!(1), &8), seq![55, 8, 57]); + assert_eq!(s.concat(&seq![58, 59]), seq!(55, 56, 57, 58, 59)); + } + + #[test] + fn test_dafny_set() { + let s = set! {55, 56, 57, 56, 58}; + let t = set! {59, 58, 57}; + assert_eq!(s.cardinality_usize(), 4); + assert_eq!(s.cardinality(), int!(4)); + assert_eq!(s.contains(&55), true); + assert_eq!(s.contains(&54), false); + assert_eq!(s.merge(&set! {}), s); + assert_eq!(set! {}.merge(&s), s); + assert_eq!(s.merge(&t), set! {59, 58, 57, 56, 55}); + assert_eq!(s.intersect(&t), set! {57, 58}); + assert_eq!(s.subtract(&set! {}), s); + assert_eq!(set! {}.subtract(&s), set! {}); + let smt = s.subtract(&t); + assert_eq!(smt, set! {55, 56}); + assert_eq!(t.subtract(&s), set! {59}); + assert_eq!(s.disjoint(&set! {}), true); + assert_eq!(set! {}.disjoint(&s), true); + assert_eq!(s.disjoint(&t), false); + assert_eq!(t.disjoint(&s), false); + assert_eq!(smt.disjoint(&t), true); + assert_eq!(t.disjoint(&smt), true); + assert_eq!(s.elements(), s); + assert_eq!( + s.as_dafny_multiset(), + Multiset::from_array(&vec!(55, 56, 57, 58)) + ); + } + + #[test] + fn test_dafny_multisubset() { + let s = multiset! {55, 56, 57, 58, 59}; + let t = multiset! {55, 56, 57, 58}; + assert!(t < s); + assert!(t <= s); + assert!(s > t); + assert!(s >= t); + assert!(s != t); + assert!(t != s); + + assert!(!(t > s)); + assert!(!(t >= s)); + assert!(!(s < t)); + assert!(!(s <= t)); + assert!(!(s == t)); + assert!(!(t == s)); + + let s = multiset! {55, 56, 57, 58, 58}; + let t = multiset! {55, 56, 57, 58}; + assert!(t < s); + assert!(t <= s); + assert!(s > t); + assert!(s >= t); + assert!(s != t); + assert!(t != s); + + assert!(!(t > s)); + assert!(!(t >= s)); + assert!(!(s < t)); + assert!(!(s <= t)); + assert!(!(s == t)); + assert!(!(t == s)); + + let s = multiset! {55, 56, 57, 58, 59}; + let t = multiset! {55, 56, 57, 58, 59}; + assert!(t <= s); + assert!(s <= t); + assert!(s >= t); + assert!(t >= s); + assert!(s == t); + assert!(t == s); + + assert!(!(t < s)); + assert!(!(t > s)); + assert!(!(s > t)); + assert!(!(s < t)); + assert!(!(s != t)); + assert!(!(t != s)); + + let s = multiset! {55, 56, 57, 58, 59}; + let t = multiset! {55, 56, 57, 58, 58}; + assert!(s != t); + assert!(t != s); + + assert!(!(t < s)); + assert!(!(t <= s)); + assert!(!(t > s)); + assert!(!(t >= s)); + assert!(!(s < t)); + assert!(!(s <= t)); + assert!(!(s > t)); + assert!(!(s >= t)); + assert!(!(s == t)); + assert!(!(t == s)); + } + + #[test] + fn test_dafny_multiset() { + let s = multiset! {55, 56, 57, 56, 58}; + let t = multiset! {59, 58, 57, 56}; + assert_eq!(s.cardinality_usize(), 5); + assert_eq!(s.cardinality(), int!(5)); + assert_eq!(s.contains(&55), true); + assert_eq!(s.contains(&54), false); + assert_eq!(s.get(&54), int!(0)); + assert_eq!(s.get(&55), int!(1)); + assert_eq!(s.get(&56), int!(2)); + assert_eq!(s.get(&57), int!(1)); + assert_eq!(s.merge(&multiset! {}), s); + assert_eq!(multiset! {}.merge(&s), s); + let merged = multiset! {59, 58, 58, 57, 57, 56, 56, 56, 55}; + assert_eq!(s.merge(&t), merged); + assert_eq!(merged.cardinality_usize(), 9); + assert_eq!(s.intersect(&t), multiset! {57, 58, 56}); + assert_eq!(s.subtract(&multiset! {}), s); + assert_eq!(multiset! {}.subtract(&s), multiset! {}); + let smt = s.subtract(&t); + assert_eq!(smt, multiset! {55, 56}); + let tms = t.subtract(&s); + assert_eq!(tms, multiset! {59}); + assert_eq!(s.disjoint(&multiset! {}), true); + assert_eq!(multiset! {}.disjoint(&s), true); + assert_eq!(s.disjoint(&t), false); + assert_eq!(t.disjoint(&s), false); + assert_eq!(smt.disjoint(&t), false); + assert_eq!(t.disjoint(&smt), false); + assert_eq!(tms.disjoint(&s), true); + assert_eq!(s.disjoint(&tms), true); + assert_eq!(s.as_dafny_multiset(), s); + } + + #[test] + fn test_dafny_map() { + let m_empty: Map = map![]; + let m_3 = map![1 => 2, 3 => 6, 5 => 10]; + let k_3 = set! {1, 3, 5}; + let v_3 = set! {2, 6, 10}; + assert_eq!(m_empty.cardinality_usize(), 0); + assert_eq!(m_empty.cardinality(), int!(0)); + assert_eq!(m_3.cardinality_usize(), 3); + assert_eq!(m_3.cardinality(), int!(3)); + assert_eq!(m_3.contains(&1), true); + assert_eq!(m_3.contains(&0), false); + assert_eq!(m_3.keys(), k_3); + assert_eq!(m_3.values(), v_3); + assert_eq!(m_3.get(&1), 2); + assert_eq!(m_3.get_or_none(&1), Some(2)); + assert_eq!(m_3.get_or_none(&0), None); + let mut m_4 = m_3.update_index(&0, &2); + assert_eq!(m_3.contains(&0), false); + assert_eq!(m_4.contains(&0), true); + m_4 = m_4.update_index_owned(0, 7); + assert_eq!(m_4.contains(&0), true); + + assert_eq!(m_4.get(&0), 7); + assert_eq!(m_4.cardinality_usize(), 4); + assert_eq!(m_4.merge(&map![]), m_4); + assert_eq!(map![].merge(&m_4), m_4); + let m_5 = m_4.merge(&map![3 => 9, 6 => 12]); + assert_eq!(m_5.cardinality_usize(), 5); + println!("m_4 is {:?}", m_4); + assert_eq!(m_4.get(&3), 6); + assert_eq!(m_5.get(&3), 9); + assert_eq!(m_5.subtract(&set! {}), m_5); + let m_4b = m_5.subtract(&set! {3}); + assert_eq!(m_4b.cardinality_usize(), 4); + assert_eq!(m_4b.contains(&3), false) + } + + #[test] + fn test_dafny_array() { + let a = array![1, 2, 3]; + assert_eq!(crate::array::length_usize(a), 3); + assert_eq!(crate::array::length(a), int!(3)); + assert_eq!(array::get_usize(a, 0), 1); + assert_eq!(array::get_usize(a, 1), 2); + assert_eq!(array::get_usize(a, 2), 3); + array::update_usize(a, 0, 4); + array::update_usize(a, 1, 5); + array::update_usize(a, 2, 6); + assert_eq!(array::get_usize(a, 0), 4); + assert_eq!(array::get_usize(a, 1), 5); + assert_eq!(array::get_usize(a, 2), 6); + deallocate(a); + } + + #[test] + fn test_dafny_array_init() { + // test from_vec, and initialize + let mut v = Vec::new(); + v.push(1); + v.push(2); + v.push(3); + let a = array::from_vec(v); + assert_eq!(array::length_usize(a), 3); + assert_eq!(array::get_usize(a, 0), 1); + let v2 = array::initialize_usize(3, Rc::new(|i| i + 1)); + assert_eq!(array::length_usize(v2), 3); + assert_eq!(array::get_usize(v2, 0), 1); + assert_eq!(array::get_usize(v2, 1), 2); + assert_eq!(array::get_usize(v2, 2), 3); + array::update_usize(v2, 1, 10); + assert_eq!(array::get_usize(v2, 1), 10); + + + let v3 = array::initialize(&int!(3), Rc::new(|i| i.clone() + int!(1))); + assert_eq!(array::length_usize(v3), 3); + assert_eq!(array::get_usize(v3, 0), int!(1)); + assert_eq!(array::get_usize(v3, 1), int!(2)); + assert_eq!(array::get_usize(v3, 2), int!(3)); + array::update(v3, &int!(1), int!(10)); + assert_eq!(array::get_usize(v3, 1), int!(10)); + + deallocate(a); + deallocate(v2); + deallocate(v3); + } + + #[test] + fn test_array2() { + let p = Array2::::placebos(&int!(3), &int!(4)); + for i in 0..3 { + for j in 0..4 { + modify!(p).data[i][j] = MaybeUninit::new(int!(i + j)); + } + } + let p = Array2::construct(p); + assert_eq!(read!(p).length0_usize(), 3); + assert_eq!(read!(p).length1_usize(), 4); + let v = read!(p).to_vec(); + assert_eq!(v.len(), 3); + assert_eq!(v, vec![ + vec![int!(0), int!(1), int!(2), int!(3)], + vec![int!(1), int!(2), int!(3), int!(4)], + vec![int!(2), int!(3), int!(4), int!(5)]]); + + deallocate(p); + // Allocate an array whose first dimension is zero + let p = Array2::::placebos(&int!(0), &int!(4)); + let p = Array2::construct(p); + assert_eq!(read!(p).length0_usize(), 0); + assert_eq!(read!(p).length1_usize(), 4); + deallocate(p); + } + + #[test] + fn test_array3() { + let a = Array3::::placebos(&int!(3), &int!(2), &int!(4)); + for i in 0..3 { + for j in 0..2 { + for k in 0..4 { + modify!(a).data[i][j][k] = MaybeUninit::new(DafnyInt::from(i * j + k)); + } + } + } + let a = Array3::construct(a); + assert_eq!(read!(a).length0(), int!(3)); + assert_eq!(read!(a).length1(), int!(2)); + assert_eq!(read!(a).length2(), int!(4)); + let v = read!(a).to_vec(); + assert_eq!(v.len(), 3); + for i in 0..3 { + for j in 0..2 { + for k in 0..4 { + assert_eq!(read!(a).data[i][j][k], DafnyInt::from(i * j + k)); + assert_eq!(v[i][j][k], DafnyInt::from(i * j + k)); + } + } + } + deallocate(a); + // Even if the first two dimensions are zero, the third dimension should not be zero + let a = Array3::::placebos(&int!(0), &int!(0), &int!(4)); + let a = Array3::construct(a); + assert_eq!(read!(a).length0(), int!(0)); + assert_eq!(read!(a).length1(), int!(0)); + assert_eq!(read!(a).length2(), int!(4)); + deallocate(a); + } + + struct ClassWrapper { + /*var*/ t: Field, + /*var*/ x: Field, + /*const*/ next: Ptr>, + /*const*/ constant: crate::DafnyInt, + } + impl ClassWrapper { + fn constant_plus_x(&self) -> crate::DafnyInt { + self.constant.clone() + read_field!(self.x) + } + fn increment_x(&mut self) { + modify_field!(self.x, read_field!(self.x) + int!(1)); + } + } + + impl ClassWrapper { + fn constructor(t: T) -> Ptr> { + let this = crate::allocate::>(); + update_field_mut_nodrop!(this, t, t); + update_field_nodrop!(this, next, this); + // If x is assigned twice, we need to keep track of whether it's assigned + // like in methods. + let mut x_assigned = false; + update_field_mut_uninit!(this, x, x_assigned, int!(2)); + update_field_mut_uninit!(this, x, x_assigned, int!(1)); + // If we can prove that x is assigned, we can even write this + modify_field!(read!(this).x,int!(0)); + update_field_nodrop!(this, constant, int!(42)); + update_field_mut_if_uninit!(this, x, x_assigned, int!(0)); + assert_eq!(x_assigned, true); + let mut next_assigned = true; + update_field_if_uninit!(this, next, next_assigned, this); + assert_eq!(next_assigned, true); + this + } + + fn constructor_object(t: T) -> Object> { + let mut this = crate::allocate_object::>(); + update_field_mut_nodrop_object!(this, t, t); + update_field_nodrop_object!(this, next, Ptr::from_raw_nonnull(this.as_mut())); + // If x is assigned twice, we need to keep track of whether it's assigned + // like in methods. + let mut x_assigned = false; + update_field_mut_uninit_object!(this, x, x_assigned, int!(2)); + update_field_mut_uninit_object!(this, x, x_assigned, int!(1)); + // If we can prove that x is assigned, we can even write this + modify_field!(rd!(this).x,int!(0)); + update_field_nodrop_object!(this, constant, int!(42)); + update_field_mut_if_uninit_object!(this, x, x_assigned, int!(0)); + assert_eq!(x_assigned, true); + let mut next_assigned = true; + update_field_if_uninit_object!(this, next, next_assigned, Ptr::from_raw_nonnull(this.as_mut())); + assert_eq!(next_assigned, true); + this + } + } + + impl Upcast for ClassWrapper { + UpcastFn!(dyn Any); + } + impl UpcastObject for ClassWrapper { + UpcastObjectFn!(dyn Any); + } + + #[test] + #[allow(unused_unsafe)] + fn test_class_wrapper() { + let c: Ptr> = ClassWrapper::constructor(53); + assert_eq!(read!(c).constant, int!(42)); + assert_eq!(read_field!(read!(c).t), 53); + assert_eq!(read_field!(read!(c).x), int!(0)); + assert_eq!(read_field!(read!(read!(c).next).t), 53); + assert_eq!(read!(c).constant_plus_x(), int!(42)); + modify!(c).increment_x(); + assert_eq!(read!(c).constant_plus_x(), int!(43)); + modify_field!(read!(c).x,int!(40)); + assert_eq!(read!(c).constant_plus_x(), int!(82)); + modify_field!(read!(c).t,54); + assert_eq!(read_field!(read!(c).t), 54); + let x_copy = read_field!(read!(c).x); + assert_eq!(Rc::strong_count(&x_copy.data), 2); + deallocate(c); + assert_eq!(Rc::strong_count(&x_copy.data), 1); + } + + + #[test] + #[allow(unused_unsafe)] + fn test_class_wrapper_object() { + let c: Object> = ClassWrapper::constructor_object(53); + assert_eq!(rd!(c).constant, int!(42)); + assert_eq!(read_field!(rd!(c).t), 53); + assert_eq!(read_field!(rd!(c).x), int!(0)); + assert_eq!(read_field!(rd!(rd!(c).next).t), 53); + assert_eq!(rd!(c).constant_plus_x(), int!(42)); + md!(c).increment_x(); + assert_eq!(rd!(c).constant_plus_x(), int!(43)); + if true { + modify_field!(rd!(c).x,int!(40)) + } + assert_eq!(rd!(c).constant_plus_x(), int!(82)); + modify_field!(rd!(c).t,54); + assert_eq!(read_field!(rd!(c).t), 54); + } + + // Requires test1 || test2 + // We will not do that as it enables the compiler to assume that t contains a valid Rc when it does not. + // Prefer MaybePlacebo + fn assign_lazy_in_method(test1: bool, test2: bool) -> Rc { + let mut t = MaybePlacebo::>::new(); + if test1 { + t = MaybePlacebo::from(Rc::new(5 as i32)); + } + if test2 { + t = MaybePlacebo::from(Rc::new( + 7 as i32 + if test1 { *MaybePlacebo::read(&t) } else { 0 }, + )); + } + println!("{}", MaybePlacebo::read(&t)); + MaybePlacebo::read(&t) + } + + #[test] + fn assign_lazy_in_method_test() { + let mut t = assign_lazy_in_method(true, false); + assert_eq!(*t, 5); + t = assign_lazy_in_method(false, true); + assert_eq!(*t, 7); + t = assign_lazy_in_method(true, true); + assert_eq!(*t, 12); + } + + fn override_placebo(o: T, do_override: bool) { + let mut _x: MaybePlacebo = MaybePlacebo::::new(); + if do_override { + _x = MaybePlacebo::from(o.clone()); + } + } + + #[test] + fn test_placebo() { + override_placebo::>(Rc::new(BigInt::from(1)), false); + override_placebo::>(Rc::new(BigInt::from(1)), true); + override_placebo::(int!(1), false); + override_placebo::(int!(1), true); + let _x: MaybePlacebo>> = + MaybePlacebo::>>::new(); + //let mut f: Rc Class> = Class> as Placebo>::new(); + } + + #[test] + fn test_maybe_placebos_from() { + let x = (1, 2, 3, 4); + let (a, b, c, d) = maybe_placebos_from!(x, 0, 1, 2, 3); + assert_eq!(a.read(), 1); + assert_eq!(b.read(), 2); + assert_eq!(c.read(), 3); + assert_eq!(d.read(), 4); + } + + #[test] + fn test_coercion_immutable() { + let o = ClassWrapper::::constructor(1); + let a: Ptr = Upcast::::upcast(read!(o)); + assert_eq!(cast!(a, ClassWrapper), o); + let seq_o = seq![o]; + let seq_a = Sequence::>>::coerce(upcast::, dyn Any>())(seq_o); + assert_eq!(cast!(seq_a.get_usize(0), ClassWrapper), o); + let set_o = set! {o}; + let set_a = Set::>>::coerce(upcast::, dyn Any>())(set_o); + assert_eq!(cast!(set_a.peek(), ClassWrapper), o); + let multiset_o = multiset! {o, o}; + let multiset_a = Multiset::>>::coerce(upcast::, dyn Any>())(multiset_o); + assert_eq!(cast!(multiset_a.peek(), ClassWrapper), o); + let map_o = map![1 => o, 2 => o]; + let map_a = Map::>>::coerce(upcast::, dyn Any>())(map_o); + assert_eq!(cast!(map_a.get(&1), ClassWrapper), o); + deallocate(o); + } + + #[test] + fn test_defaults() { + let set_i32 = as Default>::default(); + let seq_i32 = as Default>::default(); + let map_i32 = as Default>::default(); + let multiset_i32 = as Default>::default(); + assert_eq!(set_i32.cardinality_usize(), 0); + assert_eq!(seq_i32.cardinality_usize(), 0); + assert_eq!(map_i32.cardinality_usize(), 0); + assert_eq!(multiset_i32.cardinality_usize(), 0); + } + + #[test] + fn test_nontrivial_defaults() { + let set_i32 = as NontrivialDefault>::nontrivial_default(); + let seq_i32 = as NontrivialDefault>::nontrivial_default(); + let map_i32 = as NontrivialDefault>::nontrivial_default(); + let multiset_i32 = as NontrivialDefault>::nontrivial_default(); + assert_eq!(set_i32.cardinality_usize(), 0); + assert_eq!(seq_i32.cardinality_usize(), 0); + assert_eq!(map_i32.cardinality_usize(), 0); + assert_eq!(multiset_i32.cardinality_usize(), 0); + let ptr_i32 = as NontrivialDefault>::nontrivial_default(); + assert_eq!(ptr_i32, Ptr::::null()); + } + + #[test] + fn test_function_wrappers() { + let f: Rc i32> = Rc::new(|i: i32| i + 1); + let g = f.clone(); + let _h = seq![g]; + } + + #[test] + fn test_forall_exists() { + assert!(integer_range(int!(0), int!(10)) + .all(Rc::new(|i: DafnyInt| i.clone() < int!(10)).as_ref())); + assert!(!integer_range(int!(0), int!(11)) + .all(Rc::new(|i: DafnyInt| i.clone() < int!(10)).as_ref())); + assert!(!integer_range(int!(0), int!(10)) + .any(Rc::new(|i: DafnyInt| i.clone() >= int!(10)).as_ref())); + assert!(integer_range(int!(0), int!(11)) + .any(Rc::new(|i: DafnyInt| i.clone() >= int!(10)).as_ref())); + + assert!(integer_range(int!(0), int!(10)).all( + Rc::new(|i: DafnyInt| !(i.clone() % int!(4) == int!(0)) + || i.clone() < int!(10) && i.clone() % int!(2) == int!(0)) + .as_ref() + )); + assert!(integer_range(int!(0), int!(11)).all( + Rc::new(|i: DafnyInt| !(i.clone() % int!(4) == int!(0)) + || i.clone() < int!(10) && i.clone() % int!(2) == int!(0)) + .as_ref() + )); + assert!(!integer_range(int!(0), int!(10)).any( + Rc::new(|i: DafnyInt| i.clone() % int!(4) == int!(0) + && i.clone() >= int!(10) + && i.clone() % int!(2) == int!(0)) + .as_ref() + )); + assert!(!integer_range(int!(0), int!(11)).any( + Rc::new(|i: DafnyInt| i.clone() % int!(4) == int!(0) + && i.clone() >= int!(10) + && i.clone() % int!(2) == int!(0)) + .as_ref() + )); + + assert!(exact_range(10).all(Rc::new(|i: i32| i == 10).as_ref())); + assert!(exact_range(10).any(Rc::new(|i: i32| i == 10).as_ref())); + assert!(!exact_range(10).all(Rc::new(|i: i32| i != 10).as_ref())); + assert!(!exact_range(10).any(Rc::new(|i: i32| i != 10).as_ref())); + + assert!(seq![1, 3, 5, 7] + .iter() + .all(Rc::new(|i: u32| i % 2 == 1).as_ref())); + assert!(!seq![1, 3, 5, 7] + .iter() + .any(Rc::new(|i: u32| i % 2 == 0).as_ref())); + assert!(!seq![1, 3, 5, 7, 8] + .iter() + .all(Rc::new(|i: u32| i % 2 == 1).as_ref())); + assert!(seq![1, 3, 5, 7, 8] + .iter() + .any(Rc::new(|i: u32| i % 2 == 0).as_ref())); + + assert!(set! {1, 3, 5, 7} + .iter() + .cloned() + .all(Rc::new(|i: u32| i % 2 == 1).as_ref())); + assert!(!set! {1, 3, 5, 7} + .iter() + .cloned() + .any(Rc::new(|i: u32| i % 2 == 0).as_ref())); + assert!(!set! {1, 3, 5, 7, 8} + .iter() + .cloned() + .all(Rc::new(|i: u32| i % 2 == 1).as_ref())); + assert!(set! {1, 3, 5, 7, 8} + .iter() + .cloned() + .any(Rc::new(|i: u32| i % 2 == 0).as_ref())); + + for i in set! {1, 3, 5, 7}.iter() { + println!("{}", i); + } + + assert!(multiset! {1, 1, 5, 7} + .iter() + .all(Rc::new(|i: u32| i % 2 == 1).as_ref())); + assert!(!multiset! {1, 1, 5, 7} + .iter() + .any(Rc::new(|i: u32| i % 2 == 0).as_ref())); + assert!(!multiset! {1, 1, 5, 7, 8} + .iter() + .all(Rc::new(|i: u32| i % 2 == 1).as_ref())); + assert!(multiset! {1, 1, 5, 7, 8} + .iter() + .any(Rc::new(|i: u32| i % 2 == 0).as_ref())); + let count = Rc::new(RefCell::new(0)); + let count_inner = count.clone(); + multiset!{1, 1, 5, 7, 8} + .iter().for_each(move |_i: u32| { + let c: i32 = *count_inner.as_ref().borrow(); + *count_inner.borrow_mut() = c + 1; + }); + assert_eq!(*count.as_ref().borrow(), 5); + + let m = map![1 => 4, 3 => 6, 5 => 8]; + let m2 = m.clone(); + let m3 = m.clone(); + assert!(m + .clone() + .iter() + .all(Rc::new(move |i: u32| i + 3 == m2.get(&i)).as_ref())); + assert!(!m + .iter() + .any(Rc::new(move |i: u32| i + 2 == m3.get(&i)).as_ref())); + let m = map![1 => 4, 3 => 7, 5 => 7]; + let m2 = m.clone(); + let m3 = m.clone(); + assert!(!m + .clone() + .iter() + .all(Rc::new(move |i: u32| i + 3 == m2.get(&i)).as_ref())); + assert!(m + .iter() + .any(Rc::new(move |i: u32| i + 2 == m3.get(&i)).as_ref())); + } + + #[test] + fn test_for_loops() { + let mut sum: i32 = 0; + for i in integer_range(1, 11) { + sum += i; + } + assert_eq!(sum, 55); + + let mut sum: i32 = 0; + for i in integer_range_down(11, 1) { + sum += i; + } + assert_eq!(sum, 55); + + let mut sum: i32 = 0; + for i in integer_range_unbounded(1) { + sum += i; + if i == 10 { + break; + } + } + assert_eq!(sum, 55); + + let mut sum: i32 = 0; + for i in integer_range_down_unbounded(11) { + sum += i; + if i == 1 { + break; + } + } + assert_eq!(sum, 55); + } + + trait SuperTrait: Upcast + UpcastObject { + } + + trait NodeRcMutTrait: SuperTrait + Upcast + UpcastObject{ + } + + pub struct NodeRcMut { + val: DafnyInt, + next: Object, + } + impl NodeRcMut { + fn _ctor(this: Object, val: DafnyInt) { + let mut val_assign = false; + let mut next_assign = false; + update_field_uninit_object!(this.clone(), val, val_assign, val); + update_field_if_uninit_object!(this.clone(), next, next_assign, Object(None)); + } + } + impl SuperTrait for NodeRcMut {} + impl UpcastObject for NodeRcMut { + UpcastObjectFn!(dyn Any); + } + impl Upcast for NodeRcMut { + UpcastFn!(dyn Any); + } + impl UpcastObject for NodeRcMut { + UpcastObjectFn!(dyn NodeRcMutTrait); + } + impl Upcast for NodeRcMut { + UpcastFn!(dyn NodeRcMutTrait); + } + impl UpcastObject for NodeRcMut { + UpcastObjectFn!(dyn SuperTrait); + } + impl Upcast for NodeRcMut { + UpcastFn!(dyn SuperTrait); + } + impl NodeRcMutTrait for NodeRcMut {} + + #[test] + fn test_object() { + let mut x: Object = allocate_object::(); + NodeRcMut::_ctor(x.clone(), int!(42)); + assert_eq!(refcount!(x), 1); + assert_eq!(x.as_ref().val, int!(42)); + x.as_mut().next = x.clone(); + assert_eq!(refcount!(x), 2); + assert_eq!(x.as_ref().next.as_ref().val, int!(42)); + md!(rd!(x).next).next = Object(None); + assert_eq!(refcount!(x), 1); + let y: Object = upcast_object::<_, _>()(x.clone()); + assert_eq!(refcount!(x), 2); + let z: Object = upcast_object::<_, _>()(x.clone()); + assert_eq!(refcount!(x), 3); + let a2: Object = cast_object!(y.clone(), NodeRcMut); + assert_eq!(refcount!(x), 4); + assert_eq!(rd!(a2).val, int!(42)); + let a3: Object = cast_object!(z.clone(), NodeRcMut); + assert_eq!(refcount!(x), 5); + assert_eq!(rd!(a3).val, int!(42)); + + // Other way to create objects + let direct: Object = Object::::new(NodeRcMut {val: int!(1), next: Object::::null()}); + assert_eq!(rd!(direct).val, int!(1)); + let tail: Object = Object::::null(); + assert_eq!(tail, rd!(direct).next); + assert!(tail.is_null()); + assert!(!direct.is_null()); + + let a: Object<[i32]> = rcmut::array_object_from_rc(Rc::new([42, 43, 44])); + assert_eq!(rd!(a).len(), 3); + assert_eq!(rd!(a)[0], 42); + assert_eq!(rd!(a)[1], 43); + assert_eq!(rd!(a)[2], 44); + let b: Object<[i32]> = a.clone(); + md!(b)[0] = 45; + assert_eq!(rd!(a)[0], 45); + + let previous_count = refcount!(x); + { + let z = Object::::from_ref(x.as_ref()); + assert_eq!(refcount!(z), previous_count + 1); + assert_eq!(refcount!(x), previous_count + 1); + } + assert_eq!(refcount!(x), previous_count); + + let objects: Set> = crate::set!{y.clone(), cast_any_object!(x.clone())}; + assert_eq!(objects.cardinality_usize(), 1); + test_dafny_type(a.clone()); + } + + pub struct NodeRawMut { + val: DafnyInt, + next: Ptr, + } + impl NodeRawMut { + fn _ctor(this: Ptr, val: DafnyInt) { + let mut val_assign = false; + update_field_uninit!(this, val, val_assign, val); + } + } + impl NodeRcMutTrait for NodeRawMut {} + UpcastDefObject!(NodeRawMut, dyn NodeRcMutTrait, dyn SuperTrait, dyn Any); + UpcastDef!(NodeRawMut, dyn NodeRcMutTrait, dyn SuperTrait, dyn Any); + + impl SuperTrait for NodeRawMut {} + + #[test] + fn test_rawmut() { + let x: Ptr = allocate::(); + NodeRawMut::_ctor(x.clone(), int!(42)); + assert_eq!(read!(x.clone()).val, int!(42)); + modify!(x.clone()).next = x.clone(); + assert_eq!(read!(read!(x.clone()).next.clone()).val, int!(42)); + modify!(read!(x.clone()).next.clone()).next = Ptr::null(); + let y: Ptr = upcast::<_, _>()(x); + assert!(y.is_instance_of::()); + assert!(!y.is_instance_of::()); + let z: Ptr = upcast::<_, _>()(x); + let _a2: Ptr = cast!(y, NodeRawMut); + let _a3: Ptr = cast!(z, NodeRawMut); + deallocate(x); + + let a = array::from_native(Box::new([42, 43, 44])); + assert_eq!(read!(a.clone()).len(), 3); + assert_eq!(read!(a.clone())[0], 42); + assert_eq!(read!(a.clone())[1], 43); + assert_eq!(read!(a.clone())[2], 44); + let b = a.clone(); + modify!(b.clone())[0] = 45; + assert_eq!(read!(a.clone())[0], 45); + + deallocate(a); + } + + // Conversion of any usize-compatible value into usize + #[test] + fn test_usize() { + let a: u128 = 1; + let b: i8 = 1; + let u: usize = 1; + assert_eq!(DafnyUsize::into_usize(int!(a)), u); + assert_eq!(DafnyUsize::into_usize(a), u); + assert_eq!(DafnyUsize::into_usize(b), u); + assert_eq!(DafnyUsize::into_usize(int!(b)), u); + } + + // Tests that we can compose Dafny types, like a sequence of maps + fn _test(_input: Sequence>) { + } + // Tests that the input type is a DafnyType + fn test_dafny_type(_input: X) { + } + + #[derive(Clone)] + pub struct InternalOpaqueError { + pub message: String, + } + + crate::UpcastDefObject!(InternalOpaqueError, dyn Any); + + #[test] + fn test_native_string_upcast() { + let s = InternalOpaqueError { message: "Hello, World!".to_string() }; + let o: Object = Object::new(s); + let n: Object = upcast_object::()(o); + let x = cast_object!(n, InternalOpaqueError); + let s2 = crate::dafny_runtime_conversions::object::dafny_class_to_struct(x); + assert_eq!(s2.message, "Hello, World!"); + } + + #[test] + fn test_native_string_upcast_raw() { + let message = "Hello, World!".to_string(); + let object = Object::new(message.clone()); + let object_any: Object = UpcastObject::::upcast(object.as_ref()); + let resulting_message = format!("{:?}", object_any); + assert_eq!(resulting_message, message); + } + + // Every general trait must declare how to clone a Box of itself + trait GeneralTraitSuper { + fn _clone(&self) -> Box>; + fn _is_GeneralTrait(&self) -> bool; + fn _as_GeneralTrait(&self) -> Box; + fn _is_Datatype(&self) -> bool; + fn _as_Datatype(&self) -> ADatatype; + } + impl Clone for Box> { + fn clone(&self) -> Self { + GeneralTraitSuper::_clone(self.as_ref()) + } + } + impl DafnyPrint for Box> { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "GeneralTraitSuper") + } + } + // Traits extending other traits also implement a direct way to upcast their Box of themselves + trait GeneralTrait: GeneralTraitSuper + UpcastBox> { + fn _clone(&self) -> Box; + } + impl UpcastBox> for Box { + fn upcast(&self) -> ::std::boxed::Box> { + crate::tests::tests::GeneralTraitSuper::::_clone(self.as_ref()) + } + } + impl Clone for Box { + fn clone(&self) -> Self { + GeneralTrait::_clone(self.as_ref()) + } + } + impl DafnyPrint for Box { + fn fmt_print(&self, f: &mut Formatter<'_>, _in_seq: bool) -> std::fmt::Result { + write!(f, "GeneralTrait") + } + } + + #[derive(Clone, PartialEq, Debug)] + struct ADatatype{i: i32} + impl GeneralTrait for ADatatype { + fn _clone(&self) -> Box { + Box::new(self.clone()) as Box + } + } + impl GeneralTraitSuper for ADatatype { + fn _clone(&self) -> Box> { + Box::new(self.clone()) + } + + fn _is_GeneralTrait(&self) -> bool { + true + } + + fn _as_GeneralTrait(&self) -> Box { + GeneralTrait::_clone(self) + } + + fn _is_Datatype(&self) -> bool { + true + } + + fn _as_Datatype(&self) -> ADatatype { + self.clone() + } + } + impl UpcastBox for ADatatype { + fn upcast(&self) -> ::std::boxed::Box { + GeneralTrait::_clone(self) + } + } + impl UpcastBox> for ADatatype { + fn upcast(&self) -> ::std::boxed::Box> { + GeneralTraitSuper::::_clone(self) + } + } + #[test] + fn test_general_traits() { + let x = ADatatype{i: 3}; + let gt = upcast_box::()(x.clone()); + let gts = upcast_box::>()(x.clone()); + let gtgts = upcast_box_box::>()(gt.clone()); + assert!(gt._is_Datatype()); + assert!(gts._is_Datatype()); + assert!(gtgts._is_Datatype()); + assert!(gts._is_GeneralTrait()); + assert!(gtgts._is_GeneralTrait()); + assert_eq!(gt._as_Datatype(), x); + assert_eq!(gts._as_Datatype(), x); + assert_eq!(gtgts._as_Datatype(), x); + let gtsgt = gts._as_GeneralTrait(); + let gtgtsgt = gtgts._as_GeneralTrait(); + assert!(gtsgt._is_Datatype()); + assert!(gtgtsgt._is_Datatype()); + assert_eq!(gtsgt._as_Datatype(), x); + assert_eq!(gtsgt._as_Datatype(), x); + } + /*impl GeneralTrait for Rc { + fn _clone(&self) -> Box { + Box::new(self.as_ref().clone()) + } + }*/ + + +} diff --git a/releases/rust/db_esdk/examples/README.md b/releases/rust/db_esdk/examples/README.md new file mode 100644 index 000000000..d35fa840a --- /dev/null +++ b/releases/rust/db_esdk/examples/README.md @@ -0,0 +1,38 @@ +# AWS Database Encryption SDK for DynamoDb Java Examples + +This project contains examples for using the AWS Database Encryption SDK for DynamoDb in Rust. + +Overview: + +``` +├── .. +├── examples: Examples source +│ ├── basic_get_put_example.rs: Example using AWS DB ESDK to Put and Get an encrypted item from DynamoDB +│ ├── create_keystore_key.rs: Example creating a branch key in a Keystore DynamoDB table +│ ├── clientsupplier/: Examples using a custom KMS ClientSupplier +│ ├── itemencryptor/: Examples using the DynamoDbItemEncryptor +│ ├── keyring/: Examples creating and using different keyrings +│ └── searchableencryption/: Examples demonstrating searchable encryption configuration and usage +└── src: Source code including tests +``` + +## Getting Started + +### Development Requirements + +- A Rust 1.80 or newer development environment + +### Building and Running + +All of the examples are called from the `main` method. +To run a given example, inspect its particular setup requirements, +create and/or grant access to any required AWS resources, +and run the example. + +## Security + +See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information. + +## License + +This project is licensed under the Apache-2.0 License. diff --git a/releases/rust/db_esdk/examples/basic_get_put_example.rs b/releases/rust/db_esdk/examples/basic_get_put_example.rs new file mode 100644 index 000000000..c3e68e6b5 --- /dev/null +++ b/releases/rust/db_esdk/examples/basic_get_put_example.rs @@ -0,0 +1,179 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_materialProviders::client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; + +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig; + +/* + This example sets up DynamoDb Encryption for the AWS SDK client + and uses the low level PutItem and GetItem DDB APIs to demonstrate + putting a client-side encrypted item into DynamoDb + and then retrieving and decrypting that item from DynamoDb. + + Running this example requires access to the DDB Table whose name + is provided in CLI arguments. + 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 (N) +*/ + +pub async fn put_item_get_item() -> Result<(), crate::BoxError> { + let kms_key_id = test_utils::TEST_KMS_KEY_ID; + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + + // 1. Create a Keyring. This Keyring will be responsible for protecting the data keys that protect your data. + // For this example, we will create a AWS KMS Keyring with the AWS KMS Key we want to use. + // We will use the `CreateMrkMultiKeyring` method to create this keyring, + // as it will correctly handle both single region and Multi-Region KMS Keys. + let provider_config = MaterialProvidersConfig::builder().build()?; + let mat_prov = client::Client::from_conf(provider_config)?; + let kms_keyring = mat_prov + .create_aws_kms_mrk_multi_keyring() + .generator(kms_key_id) + .send() + .await?; + + // 2. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + let attribute_actions_on_encrypt = HashMap::from([ + ("partition_key".to_string(), CryptoAction::SignOnly), + ("sort_key".to_string(), CryptoAction::SignOnly), + ("attribute1".to_string(), CryptoAction::EncryptAndSign), + ("attribute2".to_string(), CryptoAction::SignOnly), + (":attribute3".to_string(), CryptoAction::DoNothing), + ]); + + // 3. Configure which attributes we expect to be included in the signature + // when reading items. There are two options for configuring this: + // + // - (Recommended) Configure `allowedUnsignedAttributesPrefix`: + // When defining your DynamoDb schema and deciding on attribute names, + // choose a distinguishing prefix (such as ":") for all attributes that + // you do not want to include in the signature. + // This has two main benefits: + // - It is easier to reason about the security and authenticity of data within your item + // when all unauthenticated data is easily distinguishable by their attribute name. + // - If you need to add new unauthenticated attributes in the future, + // you can easily make the corresponding update to your `attributeActionsOnEncrypt` + // and immediately start writing to that new attribute, without + // any other configuration update needed. + // Once you configure this field, it is not safe to update it. + // + // - Configure `allowedUnsignedAttributes`: You may also explicitly list + // a set of attributes that should be considered unauthenticated when encountered + // on read. Be careful if you use this configuration. Do not remove an attribute + // name from this configuration, even if you are no longer writing with that attribute, + // as old items may still include this attribute, and our configuration needs to know + // to continue to exclude this attribute from the signature scope. + // If you add new attribute names to this field, you must first deploy the update to this + // field to all readers in your host fleet before deploying the update to start writing + // with that new attribute. + // + // For this example, we have designed our DynamoDb table such that any attribute name with + // the ":" prefix should be considered unauthenticated. + const UNSIGNED_ATTR_PREFIX: &str = ":"; + + // 4. Create the DynamoDb Encryption configuration for the table we will be writing to. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(kms_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + // Specifying an algorithm suite is not required, + // but is done here to demonstrate how to do so. + // We suggest using the + // `ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384` suite, + // which includes AES-GCM with key derivation, signing, and key commitment. + // This is also the default algorithm suite if one is not specified in this config. + // For more information on supported algorithm suites, see: + // https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/supported-algorithms.html + .algorithm_suite_id( + DbeAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeyEcdsaP384SymsigHmacSha384, + ) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 5. Create a new AWS SDK DynamoDb client using the TableEncryptionConfigs + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 6. Put an item into our table using the above client. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side, according to our configuration. + let item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("BasicPutGetExample".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "attribute1".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ( + "attribute2".to_string(), + AttributeValue::S("sign me!".to_string()), + ), + ( + ":attribute3".to_string(), + AttributeValue::S("ignore me!".to_string()), + ), + ]); + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item.clone())) + .send() + .await?; + + // 7. Get the item back from our table using the same client. + // The client will decrypt the item client-side, and return + // back the original item. + let key_to_get = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("BasicPutGetExample".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + + let resp = ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get)) + // In this example we configure a strongly consistent read + // because we perform a read immediately after a write (for demonstrative purposes). + // By default, reads are only eventually consistent. + // Read our docs to determine which read consistency to use for your application: + // https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html + .consistent_read(true) + .send() + .await?; + + assert_eq!(resp.item, Some(item)); + println!("put_item_get_item successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/clientsupplier/client_supplier_example.rs b/releases/rust/db_esdk/examples/clientsupplier/client_supplier_example.rs new file mode 100644 index 000000000..0dbae3b73 --- /dev/null +++ b/releases/rust/db_esdk/examples/clientsupplier/client_supplier_example.rs @@ -0,0 +1,246 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use super::regional_role_client_supplier::RegionalRoleClientSupplier; +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +/* + 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 puts an encrypted item to the + table. Then, it creates a MRK discovery multi-keyring to decrypt the item + and retrieves the item from the table. + + Running this example requires access to the DDB Table whose name + is provided in CLI arguments. + 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) +*/ +pub async fn put_item_get_item() -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + // Note that we pass in an MRK in us-east-1... + let key_arn = test_utils::TEST_MRK_REPLICA_KEY_ID_US_EAST_1.to_string(); + let account_ids = vec![test_utils::TEST_AWS_ACCOUNT_ID.to_string()]; + // ...and access its replica in eu-west-1 + let regions = vec!["eu-west-1".to_string()]; + + // 1. 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(key_arn) + .send() + .await?; + + // 2. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute is not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + let attribute_actions_on_encrypt = HashMap::from([ + ("partition_key".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("sort_key".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ("sensitive_data".to_string(), CryptoAction::EncryptAndSign), + ]); + + // 3. Configure which attributes we expect to be included in the signature + // when reading items. There are two options for configuring this: + // + // - (Recommended) Configure `allowedUnsignedAttributesPrefix`: + // When defining your DynamoDb schema and deciding on attribute names, + // choose a distinguishing prefix (such as ":") for all attributes that + // you do not want to include in the signature. + // This has two main benefits: + // - It is easier to reason about the security and authenticity of data within your item + // when all unauthenticated data is easily distinguishable by their attribute name. + // - If you need to add new unauthenticated attributes in the future, + // you can easily make the corresponding update to your `attributeActionsOnEncrypt` + // and immediately start writing to that new attribute, without + // any other configuration update needed. + // Once you configure this field, it is not safe to update it. + // + // - Configure `allowedUnsignedAttributes`: You may also explicitly list + // a set of attributes that should be considered unauthenticated when encountered + // on read. Be careful if you use this configuration. Do not remove an attribute + // name from this configuration, even if you are no longer writing with that attribute, + // as old items may still include this attribute, and our configuration needs to know + // to continue to exclude this attribute from the signature scope. + // If you add new attribute names to this field, you must first deploy the update to this + // field to all readers in your host fleet before deploying the update to start writing + // with that new attribute. + // + // For this example, we currently authenticate all attributes. To make it easier to + // add unauthenticated attributes in the future, we define a prefix ":" for such attributes. + const UNSIGNED_ATTR_PREFIX: &str = ":"; + + // 4. Create the DynamoDb Encryption configuration for the table we will be writing to. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt.clone()) + .keyring(mrk_keyring_with_client_supplier) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 5. Create a new AWS SDK DynamoDb client using the DynamoDb Config above + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 6. Put an item into our table using the above client. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side using the MRK multi-keyring. + // The data key protecting this item will be encrypted + // with all the KMS Keys in this keyring, so that it can be + // decrypted with any one of those KMS Keys. + let item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("clientSupplierItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "sensitive_data".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ]); + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item.clone())) + .send() + .await?; + + // 7. Get the item back from our table using the same keyring. + // The client will decrypt the item client-side using the MRK + // and return the original item. + let key_to_get = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("clientSupplierItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + + let resp = ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get.clone())) + .consistent_read(true) + .send() + .await?; + + assert_eq!( + resp.item.unwrap()["sensitive_data"], + AttributeValue::S("encrypt and sign me!".to_string()) + ); + + // 8. 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 `key_arn` an MRK with a replica, and + // provide only the replica region in our discovery filter. + let discovery_filter = DiscoveryFilter::builder() + .partition("aws") + .account_ids(account_ids) + .build()?; + + let mrk_discovery_client_supplier_keyring = mpl + .create_aws_kms_mrk_discovery_multi_keyring() + .client_supplier(RegionalRoleClientSupplier {}) + .discovery_filter(discovery_filter) + .regions(regions) + .send() + .await?; + + // 9. Create a new config and client using the discovery keyring. + // This is the same setup as above, except we provide the discovery keyring to the config. + let only_replica_table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(mrk_discovery_client_supplier_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let only_replica_table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([( + ddb_table_name.to_string(), + only_replica_table_config, + )])) + .build()?; + + let only_replica_dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(only_replica_table_configs)) + .build(); + let only_replica_ddb = aws_sdk_dynamodb::Client::from_conf(only_replica_dynamo_config); + + // 10. Get the item back from our table using the discovery keyring client. + // The client will decrypt the item client-side using the keyring, + // and return the original item. + // The discovery keyring will only use KMS keys in the provided regions and + // AWS accounts. Since we have provided it with a custom client supplier + // which uses different IAM roles based on the key region, + // the discovery keyring will use a particular IAM role to decrypt + // based on the region of the KMS key it uses to decrypt. + + let resp = only_replica_ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get)) + .consistent_read(true) + .send() + .await?; + + assert_eq!( + resp.item.unwrap()["sensitive_data"], + AttributeValue::S("encrypt and sign me!".to_string()) + ); + + println!("client_supplier_example successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/clientsupplier/mod.rs b/releases/rust/db_esdk/examples/clientsupplier/mod.rs new file mode 100644 index 000000000..7b31bc5e5 --- /dev/null +++ b/releases/rust/db_esdk/examples/clientsupplier/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/db_esdk/examples/clientsupplier/regional_role_client_supplier.rs b/releases/rust/db_esdk/examples/clientsupplier/regional_role_client_supplier.rs new file mode 100644 index 000000000..f8ea8cc6a --- /dev/null +++ b/releases/rust/db_esdk/examples/clientsupplier/regional_role_client_supplier.rs @@ -0,0 +1,51 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use aws_config::Region; +use aws_db_esdk::aws_cryptography_materialProviders::operation::get_client::GetClientInput; +use aws_db_esdk::aws_cryptography_materialProviders::types::error::Error; +use aws_db_esdk::aws_cryptography_materialProviders::types::ClientSupplier; +use aws_db_esdk::deps::com_amazonaws_kms::client::Client as kms_client; + +/* + 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 arn = + super::regional_role_client_supplier_config::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-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(aws_db_esdk::deps::com_amazonaws_kms::client::Client { + inner: inner_client, + }) + } +} diff --git a/releases/rust/db_esdk/examples/clientsupplier/regional_role_client_supplier_config.rs b/releases/rust/db_esdk/examples/clientsupplier/regional_role_client_supplier_config.rs new file mode 100644 index 000000000..356cbf91a --- /dev/null +++ b/releases/rust/db_esdk/examples/clientsupplier/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-DDBEC-Dafny-Role-only-us-east-1-KMS-keys"; + +const EU_WEST_1_IAM_ROLE: &str = + "arn:aws:iam::370957321024:role/GitHub-CI-DDBEC-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/db_esdk/examples/create_keystore_key.rs b/releases/rust/db_esdk/examples/create_keystore_key.rs new file mode 100644 index 000000000..cf4b20fdd --- /dev/null +++ b/releases/rust/db_esdk/examples/create_keystore_key.rs @@ -0,0 +1,50 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; +use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; + +/* + The Hierarchical Keyring Example and Searchable Encryption Examples + rely on the existence of a DDB-backed key store with pre-existing + branch key material or beacon key material. + + See the "Create KeyStore Table Example" for how to first set up + the DDB Table that will back this KeyStore. + + This example demonstrates configuring a KeyStore and then + using a helper method to create a branch key and beacon key + that share the same Id, then return that Id. + We will always create a new beacon key alongside a new branch key, + even if you are not using searchable encryption. + + This key creation should occur within your control plane. +*/ +pub async fn keystore_create_key() -> Result { + let key_store_table_name = test_utils::TEST_KEYSTORE_NAME; + let logical_key_store_name = test_utils::TEST_LOGICAL_KEYSTORE_NAME; + let kms_key_arn = test_utils::TEST_KEYSTORE_KMS_KEY_ID; + + // 1. Configure your KeyStore resource. + // This SHOULD be the same configuration that was used to create the DDB table + // in the "Create KeyStore Table Example". + 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)?; + + // 2. Create a new branch key and beacon key in our KeyStore. + // Both the branch key and the beacon key will share an Id. + // This creation is eventually consistent. + + let new_key = keystore.create_key().send().await?; + Ok(new_key.branch_key_identifier.unwrap()) +} diff --git a/releases/rust/db_esdk/examples/get_encrypted_data_key_description.rs b/releases/rust/db_esdk/examples/get_encrypted_data_key_description.rs new file mode 100644 index 000000000..234a2df55 --- /dev/null +++ b/releases/rust/db_esdk/examples/get_encrypted_data_key_description.rs @@ -0,0 +1,64 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::client as dbesdk_client; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +pub async fn get_encrypted_data_key_description() -> Result<(), crate::BoxError> { + let kms_key_id = test_utils::TEST_KMS_KEY_ID; + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + let config = DynamoDbEncryptionConfig::builder().build()?; + let ddb_enc = dbesdk_client::Client::from_conf(config)?; + + // 1. Define keys that will be used to retrieve item from the DynamoDB table. + let key_to_get = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("BasicPutGetExample".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + + // 2. Create a Amazon DynamoDB Client and retrieve item from DynamoDB table + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let ddb = aws_sdk_dynamodb::Client::new(&sdk_config); + let get_item_response = ddb + .get_item() + .set_key(Some(key_to_get)) + .table_name(ddb_table_name) + .send() + .await?; + + // 3. Extract the item from the dynamoDB table and prepare input for the GetEncryptedDataKeyDescription method. + // Here, we are sending dynamodb item but you can also input the header itself by extracting the header from + // "aws_dbe_head" attribute in the dynamoDB item. The part of the code where we send input as the header is commented. + let returned_item = get_item_response.item.unwrap(); + let input_union = GetEncryptedDataKeyDescriptionUnion::Item(returned_item); + let output = ddb_enc + .get_encrypted_data_key_description() + .input(input_union) + .send() + .await?; + + // The code below shows how we can send header as the input to the DynamoDB. This code is written to demo the + // alternative approach. So, it is commented. + // let input_union = GetEncryptedDataKeyDescriptionUnion::Header(returned_item["aws_dbe_head"].as_b().unwrap().clone()); + + // 4. Get encrypted DataKey Descriptions from GetEncryptedDataKeyDescription method output and assert if its true. + let encrypted_data_key_descriptions = output.encrypted_data_key_description_output.unwrap(); + assert_eq!( + encrypted_data_key_descriptions[0].key_provider_id, + Some("aws-kms".to_string()) + ); + assert_eq!( + encrypted_data_key_descriptions[0].key_provider_info, + Some(kms_key_id.to_string()) + ); + + println!("get_encrypted_data_key_description successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/itemencryptor/item_encrypt_decrypt.rs b/releases/rust/db_esdk/examples/itemencryptor/item_encrypt_decrypt.rs new file mode 100644 index 000000000..12928c29c --- /dev/null +++ b/releases/rust/db_esdk/examples/itemencryptor/item_encrypt_decrypt.rs @@ -0,0 +1,172 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; + +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client as enc_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId; + +/* + This example sets up a DynamoDb Item Encryptor and uses + the EncryptItem and DecryptItem APIs to directly encrypt and + decrypt an existing DynamoDb item. + You should use the DynamoDb Item Encryptor + if you already have a DynamoDb Item to encrypt or decrypt, + and do not need to make a Put or Get call to DynamoDb. + For example, if you are using DynamoDb Streams, + you may already be working with an encrypted item obtained from + DynamoDb, and want to directly decrypt the item. + + Running this example requires access to the DDB Table whose name + is provided in CLI arguments. + 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) +*/ +pub async fn encrypt_decrypt() -> Result<(), crate::BoxError> { + let kms_key_id = test_utils::TEST_KMS_KEY_ID; + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + + // 1. Create a Keyring. This Keyring will be responsible for protecting the data keys that protect your data. + // For this example, we will create a AWS KMS Keyring with the AWS KMS Key we want to use. + // We will use the `CreateMrkMultiKeyring` method to create this keyring, + // as it will correctly handle both single region and Multi-Region KMS Keys. + let provider_config = MaterialProvidersConfig::builder().build()?; + let mat_prov = mpl_client::Client::from_conf(provider_config)?; + let kms_keyring = mat_prov + .create_aws_kms_mrk_multi_keyring() + .generator(kms_key_id) + .send() + .await?; + + // 2. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + let attribute_actions_on_encrypt = HashMap::from([ + ("partition_key".to_string(), CryptoAction::SignOnly), + ("sort_key".to_string(), CryptoAction::SignOnly), + ("attribute1".to_string(), CryptoAction::EncryptAndSign), + ("attribute2".to_string(), CryptoAction::SignOnly), + (":attribute3".to_string(), CryptoAction::DoNothing), + ]); + + // 3. Configure which attributes we expect to be included in the signature + // when reading items. There are two options for configuring this: + // + // - (Recommended) Configure `allowedUnsignedAttributesPrefix`: + // When defining your DynamoDb schema and deciding on attribute names, + // choose a distinguishing prefix (such as ":") for all attributes that + // you do not want to include in the signature. + // This has two main benefits: + // - It is easier to reason about the security and authenticity of data within your item + // when all unauthenticated data is easily distinguishable by their attribute name. + // - If you need to add new unauthenticated attributes in the future, + // you can easily make the corresponding update to your `attributeActionsOnEncrypt` + // and immediately start writing to that new attribute, without + // any other configuration update needed. + // Once you configure this field, it is not safe to update it. + // + // - Configure `allowedUnsignedAttributes`: You may also explicitly list + // a set of attributes that should be considered unauthenticated when encountered + // on read. Be careful if you use this configuration. Do not remove an attribute + // name from this configuration, even if you are no longer writing with that attribute, + // as old items may still include this attribute, and our configuration needs to know + // to continue to exclude this attribute from the signature scope. + // If you add new attribute names to this field, you must first deploy the update to this + // field to all readers in your host fleet before deploying the update to start writing + // with that new attribute. + // + // For this example, we have designed our DynamoDb table such that any attribute name with + // the ":" prefix should be considered unauthenticated. + const UNSIGNED_ATTR_PREFIX: &str = ":"; + + // 4. Create the configuration for the DynamoDb Item Encryptor + let config = DynamoDbItemEncryptorConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(kms_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + // Specifying an algorithm suite is not required, + // but is done here to demonstrate how to do so. + // We suggest using the + // `ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384` suite, + // which includes AES-GCM with key derivation, signing, and key commitment. + // This is also the default algorithm suite if one is not specified in this config. + // For more information on supported algorithm suites, see: + // https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/supported-algorithms.html + .algorithm_suite_id( + DbeAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeyEcdsaP384SymsigHmacSha384, + ) + .build()?; + + // 5. Create the DynamoDb Item Encryptor + let item_encryptor = enc_client::Client::from_conf(config)?; + + // 6. Directly encrypt a DynamoDb item using the DynamoDb Item Encryptor + let original_item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("ItemEncryptDecryptExample".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "attribute1".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ( + "attribute2".to_string(), + AttributeValue::S("sign me!".to_string()), + ), + ( + ":attribute3".to_string(), + AttributeValue::S("ignore me!".to_string()), + ), + ]); + + let encrypted_item = item_encryptor + .encrypt_item() + .plaintext_item(original_item.clone()) + .send() + .await? + .encrypted_item + .unwrap(); + + // Demonstrate that the item has been encrypted + assert_eq!( + encrypted_item["partition_key"], + AttributeValue::S("ItemEncryptDecryptExample".to_string()) + ); + assert_eq!( + encrypted_item["sort_key"], + AttributeValue::N("0".to_string()) + ); + assert!(encrypted_item["attribute1"].is_b()); + assert!(!encrypted_item["attribute1"].is_s()); + + // 7. Directly decrypt the encrypted item using the DynamoDb Item Encryptor + let decrypted_item = item_encryptor + .decrypt_item() + .encrypted_item(encrypted_item) + .send() + .await? + .plaintext_item + .unwrap(); + + // Demonstrate that GetItem succeeded and returned the decrypted item + assert_eq!(decrypted_item, original_item); + println!("encrypt_decrypt successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/itemencryptor/mod.rs b/releases/rust/db_esdk/examples/itemencryptor/mod.rs new file mode 100644 index 000000000..54e8634c1 --- /dev/null +++ b/releases/rust/db_esdk/examples/itemencryptor/mod.rs @@ -0,0 +1,4 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod item_encrypt_decrypt; diff --git a/releases/rust/db_esdk/examples/keyring/branch_key_id_supplier.rs b/releases/rust/db_esdk/examples/keyring/branch_key_id_supplier.rs new file mode 100644 index 000000000..dbd7958d9 --- /dev/null +++ b/releases/rust/db_esdk/examples/keyring/branch_key_id_supplier.rs @@ -0,0 +1,62 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbKeyBranchKeyIdSupplier; + +// Used in the 'HierarchicalKeyringExample'. +// In that example, we have a table where we distinguish multiple tenants +// by a tenant ID that is stored in our partition attribute. +// The expectation is that this does not produce a confused deputy +// because the tenants are separated by partition. +// In order to create a Hierarchical Keyring that is capable of encrypting or +// decrypting data for either tenant, we implement this interface +// to map the correct branch key ID to the correct tenant ID. +pub struct ExampleBranchKeyIdSupplier { + branch_key_id_for_tenant1: String, + branch_key_id_for_tenant2: String, +} + +impl ExampleBranchKeyIdSupplier { + pub fn new(tenant1_id: &str, tenant2_id: &str) -> Self { + Self { + branch_key_id_for_tenant1: tenant1_id.to_string(), + branch_key_id_for_tenant2: tenant2_id.to_string(), + } + } +} + +impl DynamoDbKeyBranchKeyIdSupplier for ExampleBranchKeyIdSupplier { + fn get_branch_key_id_from_ddb_key( + &self, + input: GetBranchKeyIdFromDdbKeyInput, + ) -> Result { + let key = input.ddb_key.unwrap(); + + if !key.contains_key("partition_key") { + return Err(Error::DynamoDbEncryptionException { + message: "Item invalid, does not contain expected partition key attribute." + .to_string(), + }); + } + let tenant_key_id = key["partition_key"].as_s().unwrap(); + + if tenant_key_id == "tenant1Id" { + Ok(GetBranchKeyIdFromDdbKeyOutput::builder() + .branch_key_id(self.branch_key_id_for_tenant1.clone()) + .build() + .unwrap()) + } else if tenant_key_id == "tenant2Id" { + Ok(GetBranchKeyIdFromDdbKeyOutput::builder() + .branch_key_id(self.branch_key_id_for_tenant2.clone()) + .build() + .unwrap()) + } else { + Err(Error::DynamoDbEncryptionException { + message: "Item does not contain valid tenant ID.".to_string(), + }) + } + } +} diff --git a/releases/rust/db_esdk/examples/keyring/hierarchical_keyring.rs b/releases/rust/db_esdk/examples/keyring/hierarchical_keyring.rs new file mode 100644 index 000000000..90f350f69 --- /dev/null +++ b/releases/rust/db_esdk/examples/keyring/hierarchical_keyring.rs @@ -0,0 +1,237 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use super::branch_key_id_supplier::ExampleBranchKeyIdSupplier; +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::client as dbesdk_client; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig; +use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; +use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +/* + This example sets up DynamoDb Encryption for the AWS SDK client + using 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 root KMS Key. + + Establishing a key hierarchy like this has two benefits: + + First, by caching the branch key material, and only calling back + to KMS to re-establish authentication regularly according to your configured TTL, + you limit how often you need to call back to 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. + 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 makes it easy to hold multi-tenant data + that is isolated per branch key in a single DynamoDb table. + You can create a branch key for each tenant in your table, + and encrypt all that tenant's data under that distinct branch key. + On decrypt, you can either statically configure a single branch key + to ensure you are restricting decryption to a single tenant, + or you can implement an interface that lets you map the primary key on your items + to the branch key that should be responsible for decrypting that data. + + This example then demonstrates configuring a Hierarchical Keyring + with a Branch Key ID Supplier to encrypt and decrypt data for + two separate tenants. + + Running this example requires access to the DDB Table whose name + is provided in CLI arguments. + 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 whose ARN + is provided in CLI arguments. You need the following access + on this key: + - GenerateDataKeyWithoutPlaintext + - Decrypt +*/ +pub async fn put_item_get_item( + tenant1_branch_key_id: &str, + tenant2_branch_key_id: &str, +) -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + + let keystore_table_name = test_utils::TEST_KEYSTORE_NAME; + let logical_keystore_name = test_utils::TEST_LOGICAL_KEYSTORE_NAME; + let kms_key_id = test_utils::TEST_KEYSTORE_KMS_KEY_ID; + + // Initial KeyStore Setup: This example requires that you have already + // created your KeyStore, and have populated it with two new branch keys. + // See the "Create KeyStore Table Example" and "Create KeyStore Key Example" + // for an example of how to do this. + + // 1. Configure your KeyStore resource. + // This SHOULD be the same configuration that you used + // to initially create and populate your 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(keystore_table_name) + .logical_key_store_name(logical_keystore_name) + .kms_configuration(KmsConfiguration::KmsKeyArn(kms_key_id.to_string())) + .build()?; + + let key_store = keystore_client::Client::from_conf(key_store_config)?; + + // 2. Create a Branch Key ID Supplier. See ExampleBranchKeyIdSupplier in this directory. + let dbesdk_config = DynamoDbEncryptionConfig::builder().build()?; + let dbesdk = dbesdk_client::Client::from_conf(dbesdk_config)?; + let supplier = ExampleBranchKeyIdSupplier::new(tenant1_branch_key_id, tenant2_branch_key_id); + + let branch_key_id_supplier = dbesdk + .create_dynamo_db_encryption_branch_key_id_supplier() + .ddb_key_branch_key_id_supplier(supplier) + .send() + .await? + .branch_key_id_supplier + .unwrap(); + + // 3. Create the Hierarchical Keyring, using the Branch Key ID Supplier above. + // With this configuration, the AWS SDK Client ultimately configured will be capable + // of encrypting or decrypting items for either tenant (assuming correct KMS access). + // If you want to restrict the client to only encrypt or decrypt for a single tenant, + // configure this Hierarchical Keyring using `.branchKeyId(tenant1BranchKeyId)` instead + // of `.branchKeyIdSupplier(branchKeyIdSupplier)`. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + + let hierarchical_keyring = mpl + .create_aws_kms_hierarchical_keyring() + .branch_key_id_supplier(branch_key_id_supplier) + .key_store(key_store) + .ttl_seconds(600) + .send() + .await?; + + // 4. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + let attribute_actions_on_encrypt = HashMap::from([ + ("partition_key".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("sort_key".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ( + "tenant_sensitive_data".to_string(), + CryptoAction::EncryptAndSign, + ), + ]); + + // 5. Configure which attributes we expect to be included in the signature + // when reading items. There are two options for configuring this: + // + // - (Recommended) Configure `allowedUnsignedAttributesPrefix`: + // When defining your DynamoDb schema and deciding on attribute names, + // choose a distinguishing prefix (such as ":") for all attributes that + // you do not want to include in the signature. + // This has two main benefits: + // - It is easier to reason about the security and authenticity of data within your item + // when all unauthenticated data is easily distinguishable by their attribute name. + // - If you need to add new unauthenticated attributes in the future, + // you can easily make the corresponding update to your `attributeActionsOnEncrypt` + // and immediately start writing to that new attribute, without + // any other configuration update needed. + // Once you configure this field, it is not safe to update it. + // + // - Configure `allowedUnsignedAttributes`: You may also explicitly list + // a set of attributes that should be considered unauthenticated when encountered + // on read. Be careful if you use this configuration. Do not remove an attribute + // name from this configuration, even if you are no longer writing with that attribute, + // as old items may still include this attribute, and our configuration needs to know + // to continue to exclude this attribute from the signature scope. + // If you add new attribute names to this field, you must first deploy the update to this + // field to all readers in your host fleet before deploying the update to start writing + // with that new attribute. + // + // For this example, we currently authenticate all attributes. To make it easier to + // add unauthenticated attributes in the future, we define a prefix ":" for such attributes. + const UNSIGNED_ATTR_PREFIX: &str = ":"; + + // 6. Create the DynamoDb Encryption configuration for the table we will be writing to. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(hierarchical_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 7. Create a new AWS SDK DynamoDb client using the DynamoDb Encryption Interceptor above + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 8. Put an item into our table using the above client. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side, according to our configuration. + // Because the item we are writing uses "tenantId1" as our partition value, + // based on the code we wrote in the ExampleBranchKeySupplier, + // `tenant1BranchKeyId` will be used to encrypt this item. + let item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("tenant1Id".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "tenant_sensitive_data".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ]); + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item.clone())) + .send() + .await?; + + // 9. Get the item back from our table using the same client. + // The client will decrypt the item client-side, and return + // back the original item. + // Because the returned item's partition value is "tenantId1", + // based on the code we wrote in the ExampleBranchKeySupplier, + // `tenant1BranchKeyId` will be used to decrypt this item. + let key_to_get = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("tenant1Id".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + + let resp = ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get)) + .consistent_read(true) + .send() + .await?; + + assert_eq!(resp.item, Some(item)); + println!("hierarchical_keyring successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/keyring/kms_rsa_keyring.rs b/releases/rust/db_esdk/examples/keyring/kms_rsa_keyring.rs new file mode 100644 index 000000000..61468c27b --- /dev/null +++ b/releases/rust/db_esdk/examples/keyring/kms_rsa_keyring.rs @@ -0,0 +1,244 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; +use std::fs::File; +use std::io::Read; +use std::io::Write; +use std::path::Path; + +/* + This example sets up DynamoDb Encryption for the AWS SDK client + using the KMS RSA Keyring. This keyring uses a KMS RSA key pair to + encrypt and decrypt records. The client uses the downloaded public key + to encrypt items it adds to the table. + The keyring uses the private key to decrypt existing table items it retrieves, + by calling KMS' decrypt API. + + Running this example requires access to the DDB Table whose name + is provided in CLI arguments. + 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 access to a KMS RSA key. + Our tests provide a KMS RSA ARN that anyone can use, but you + can also provide your own KMS RSA key. + To use your own KMS RSA 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:Decrypt permissions on the KMS RSA key. +*/ + +const DEFAULT_EXAMPLE_RSA_PUBLIC_KEY_FILENAME: &str = "KmsRsaKeyringExamplePublicKey.pem"; + +pub async fn put_item_get_item() -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + let rsa_key_arn = test_utils::TEST_KMS_RSA_KEY_ID; + + // You may provide your own RSA public key at EXAMPLE_RSA_PUBLIC_KEY_FILENAME. + // This must be the public key for the RSA key represented at rsaKeyArn. + // If this file is not present, this will write a UTF-8 encoded PEM file for you. + if should_get_new_public_key(DEFAULT_EXAMPLE_RSA_PUBLIC_KEY_FILENAME) { + write_public_key_pem_for_rsa_key( + test_utils::TEST_KMS_RSA_KEY_ID, + DEFAULT_EXAMPLE_RSA_PUBLIC_KEY_FILENAME, + ) + .await?; + } + + // 1. Load UTF-8 encoded public key PEM file. + // You may have an RSA public key file already defined. + // If not, the main method in this class will call + // the KMS RSA key, retrieve its public key, and store it + // in a PEM file for example use. + let mut file = File::open(Path::new(DEFAULT_EXAMPLE_RSA_PUBLIC_KEY_FILENAME))?; + let mut public_key_utf8_bytes = Vec::new(); + file.read_to_end(&mut public_key_utf8_bytes)?; + + // 2. Create a KMS RSA keyring. + // This keyring takes in: + // - kmsClient + // - kmsKeyId: Must be an ARN representing a KMS RSA key + // - publicKey: A ByteBuffer of a UTF-8 encoded PEM file representing the public + // key for the key passed into kmsKeyId + // - encryptionAlgorithm: Must be either RSAES_OAEP_SHA_256 or RSAES_OAEP_SHA_1 + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let kms_rsa_keyring = mpl + .create_aws_kms_rsa_keyring() + .kms_key_id(rsa_key_arn) + .public_key(public_key_utf8_bytes) + .encryption_algorithm(aws_sdk_kms::types::EncryptionAlgorithmSpec::RsaesOaepSha256) + .kms_client(aws_sdk_kms::Client::new(&sdk_config)) + .send() + .await?; + + // 3. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + let attribute_actions_on_encrypt = HashMap::from([ + ("partition_key".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("sort_key".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ("sensitive_data".to_string(), CryptoAction::EncryptAndSign), + ]); + + // 4. Configure which attributes we expect to be included in the signature + // when reading items. There are two options for configuring this: + // + // - (Recommended) Configure `allowedUnsignedAttributesPrefix`: + // When defining your DynamoDb schema and deciding on attribute names, + // choose a distinguishing prefix (such as ":") for all attributes that + // you do not want to include in the signature. + // This has two main benefits: + // - It is easier to reason about the security and authenticity of data within your item + // when all unauthenticated data is easily distinguishable by their attribute name. + // - If you need to add new unauthenticated attributes in the future, + // you can easily make the corresponding update to your `attributeActions` + // and immediately start writing to that new attribute, without + // any other configuration update needed. + // Once you configure this field, it is not safe to update it. + // + // - Configure `allowedUnsignedAttributes`: You may also explicitly list + // a set of attributes that should be considered unauthenticated when encountered + // on read. Be careful if you use this configuration. Do not remove an attribute + // name from this configuration, even if you are no longer writing with that attribute, + // as old items may still include this attribute, and our configuration needs to know + // to continue to exclude this attribute from the signature scope. + // If you add new attribute names to this field, you must first deploy the update to this + // field to all readers in your host fleet before deploying the update to start writing + // with that new attribute. + // + // For this example, we currently authenticate all attributes. To make it easier to + // add unauthenticated attributes in the future, we define a prefix ":" for such attributes. + const UNSIGNED_ATTR_PREFIX: &str = ":"; + + // 5. Create the DynamoDb Encryption configuration for the table we will be writing to. + // Note: To use the KMS RSA keyring, your table config must specify an algorithmSuite + // that does not use asymmetric signing. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(kms_rsa_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + // Specify algorithmSuite without asymmetric signing here + // As of v3.0.0, the only supported algorithmSuite without asymmetric signing is + // ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384. + .algorithm_suite_id(DbeAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeySymsigHmacSha384) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 6. Create a new AWS SDK DynamoDb client using the DynamoDb Encryption Interceptor above + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 7. Put an item into our table using the above client. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side, according to our configuration. + let item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("awsKmsRsaKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "sensitive_data".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ]); + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item.clone())) + .send() + .await?; + + // 8. Get the item back from our table using the client. + // The client will decrypt the item client-side using the RSA keyring + // and return the original item. + let key_to_get = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("awsKmsRsaKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + + let resp = ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get)) + .consistent_read(true) + .send() + .await?; + + assert_eq!(resp.item, Some(item)); + println!("kms_rsa_keyring successful."); + Ok(()) +} + +fn should_get_new_public_key(rsa_public_key_filename: &str) -> bool { + // Check if a public key file already exists + !Path::new(rsa_public_key_filename).exists() +} + +async fn write_public_key_pem_for_rsa_key( + rsa_key_arn: &str, + rsa_public_key_filename: &str, +) -> Result<(), crate::BoxError> { + // Safety check: Validate file is not present + if Path::new(rsa_public_key_filename).exists() { + return Err(crate::BoxError( + "write_public_key_pem_for_rsa_key will not overwrite existing PEM files.".to_string(), + )); + } + + // This code will call KMS to get the public key for the KMS RSA key. + // You must have kms:GetPublicKey permissions on the key for this to succeed. + // The public key will be written to the file EXAMPLE_RSA_PUBLIC_KEY_FILENAME. + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let getter_for_public_key = aws_sdk_kms::Client::new(&sdk_config); + + let response = getter_for_public_key + .get_public_key() + .key_id(rsa_key_arn) + .send() + .await?; + + let public_key_bytes = response.public_key.unwrap().into_inner(); + + let public_key = pem::Pem::new("PUBLIC KEY", public_key_bytes); + let public_key = pem::encode(&public_key); + + std::fs::OpenOptions::new() + .write(true) + .create(true) + .truncate(true) + .open(Path::new(rsa_public_key_filename))? + .write_all(public_key.as_bytes())?; + + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/keyring/mod.rs b/releases/rust/db_esdk/examples/keyring/mod.rs new file mode 100644 index 000000000..a97e04fbe --- /dev/null +++ b/releases/rust/db_esdk/examples/keyring/mod.rs @@ -0,0 +1,11 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod branch_key_id_supplier; +pub mod hierarchical_keyring; +pub mod kms_rsa_keyring; +pub mod mrk_discovery_multi_keyring; +pub mod multi_keyring; +pub mod multi_mrk_keyring; +pub mod raw_aes_keyring; +pub mod raw_rsa_keyring; diff --git a/releases/rust/db_esdk/examples/keyring/mrk_discovery_multi_keyring.rs b/releases/rust/db_esdk/examples/keyring/mrk_discovery_multi_keyring.rs new file mode 100644 index 000000000..3cbb12e9e --- /dev/null +++ b/releases/rust/db_esdk/examples/keyring/mrk_discovery_multi_keyring.rs @@ -0,0 +1,216 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +/* + This example sets up a MRK discovery multi-keyring to decrypt data using + the DynamoDB encryption client. A discovery keyring is not provided with any wrapping + keys; instead, it recognizes the KMS key that was used to encrypt a data key, + and asks KMS to decrypt with that KMS key. Discovery keyrings cannot be used + to encrypt data. + + For more information on discovery keyrings, see + https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-keyring.html#kms-keyring-discovery + + This example encrypts an item using an MRK multi-keyring and puts the + encrypted item to the configured DynamoDb table. Then, it gets the item + from the table and decrypts it using the discovery keyring. + + Running this example requires access to the DDB Table whose name + is provided in CLI arguments. + 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) +*/ + +pub async fn put_item_get_item() -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + let key_arn = test_utils::TEST_MRK_KEY_ID; + let account_ids = vec![test_utils::TEST_AWS_ACCOUNT_ID.to_string()]; + let regions = vec![test_utils::TEST_AWS_REGION.to_string()]; + + // 1. Create a single MRK multi-keyring using the key arn. + // Although this example demonstrates use of the MRK discovery multi-keyring, + // a discovery keyring cannot be used to encrypt. So we will need to construct + // a non-discovery keyring for this example to encrypt. For more information on MRK + // multi-keyrings, see the MultiMrkKeyringExample in this directory. + // Though this is an "MRK multi-keyring", we do not need to provide multiple keys, + // and can use single-region KMS keys. We will provide a single key here; this + // can be either an MRK or a single-region key. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + let encrypt_keyring = mpl + .create_aws_kms_mrk_multi_keyring() + .generator(key_arn) + .send() + .await?; + + // 2. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and icncluded in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + let attribute_actions_on_encrypt = HashMap::from([ + ("partition_key".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("sort_key".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ("sensitive_data".to_string(), CryptoAction::EncryptAndSign), + ]); + + // 3. Configure which attributes we expect to be included in the signature + // when reading items. There are two options for configuring this: + // + // - (Recommended) Configure `allowedUnsignedAttributesPrefix`: + // When defining your DynamoDb schema and deciding on attribute names, + // choose a distinguishing prefix (such as ":") for all attributes that + // you do not want to include in the signature. + // This has two main benefits: + // - It is easier to reason about the security and authenticity of data within your item + // when all unauthenticated data is easily distinguishable by their attribute name. + // - If you need to add new unauthenticated attributes in the future, + // you can easily make the corresponding update to your `attributeActionsOnEncrypt` + // and immediately start writing to that new attribute, without + // any other configuration update needed. + // Once you configure this field, it is not safe to update it. + // + // - Configure `allowedUnsignedAttributes`: You may also explicitly list + // a set of attributes that should be considered unauthenticated when encountered + // on read. Be careful if you use this configuration. Do not remove an attribute + // name from this configuration, even if you are no longer writing with that attribute, + // as old items may still include this attribute, and our configuration needs to know + // to continue to exclude this attribute from the signature scope. + // If you add new attribute names to this field, you must first deploy the update to this + // field to all readers in your host fleet before deploying the update to start writing + // with that new attribute. + // + // For this example, we currently authenticate all attributes. To make it easier to + // add unauthenticated attributes in the future, we define a prefix ":" for such attributes. + const UNSIGNED_ATTR_PREFIX: &str = ":"; + + // 4. Create the DynamoDb Encryption configuration for the table we will be writing to. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt.clone()) + .keyring(encrypt_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 5. Create a new AWS SDK DynamoDb client using the config above + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 6. Put an item into our table using the above client. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side using the MRK multi-keyring. + let item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("awsKmsMrkDiscoveryMultiKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "sensitive_data".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ]); + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item.clone())) + .send() + .await?; + + // 7. Construct a discovery filter. + // A discovery filter limits the set of encrypted data keys + // the keyring can use to decrypt data. + // We will only let the keyring use keys in the selected AWS accounts + // and in the `aws` partition. + // This is the suggested config for most users; for more detailed config, see + // https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-keyring.html#kms-keyring-discovery + let discovery_filter = DiscoveryFilter::builder() + .partition("aws") + .account_ids(account_ids) + .build()?; + + // 8. Construct a discovery keyring. + // Note that we choose to use the MRK discovery multi-keyring, even though + // our original keyring used a single KMS key. + + let decrypt_keyring = mpl + .create_aws_kms_mrk_discovery_multi_keyring() + .discovery_filter(discovery_filter) + .regions(regions) + .send() + .await?; + + // 9. Create new DDB config and client using the decrypt discovery keyring. + // This is the same as the above config, except we pass in the decrypt keyring. + let table_config_for_decrypt = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(decrypt_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let table_configs_for_decrypt = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([( + ddb_table_name.to_string(), + table_config_for_decrypt, + )])) + .build()?; + + let dynamo_config_for_decrypt = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs_for_decrypt)) + .build(); + let ddb_for_decrypt = aws_sdk_dynamodb::Client::from_conf(dynamo_config_for_decrypt); + + // 10. Get the item back from our table using the client. + // The client will retrieve encrypted items from the DDB table, then + // detect the KMS key that was used to encrypt their data keys. + // The client will make a request to KMS to decrypt with the encrypting KMS key. + // If the client has permission to decrypt with the KMS key, + // the client will decrypt the item client-side using the keyring + // and return the original item. + let key_to_get = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("awsKmsMrkDiscoveryMultiKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + + let resp = ddb_for_decrypt + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get)) + .consistent_read(true) + .send() + .await?; + + assert_eq!(resp.item, Some(item)); + + println!("mrk_discovery_multi_keyring successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/keyring/multi_keyring.rs b/releases/rust/db_esdk/examples/keyring/multi_keyring.rs new file mode 100644 index 000000000..9ad1d8180 --- /dev/null +++ b/releases/rust/db_esdk/examples/keyring/multi_keyring.rs @@ -0,0 +1,251 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::aws_cryptography_materialProviders::types::AesWrappingAlg; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +/* + This example sets up DynamoDb Encryption for the AWS SDK client + using the multi-keyring. This keyring takes in multiple keyrings + and uses them to encrypt and decrypt data. Data encrypted with + a multi-keyring can be decrypted with any of its component keyrings. + + For more information on multi-keyrings, see + https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-multi-keyring.html + + This example creates a new multi-keyring consisting of an AWS KMS + keyring (labeled the "generator keyring") and a raw AES keyring + (labeled as the only "child keyring"). It encrypts a test item + using the multi-keyring and puts the encrypted item to the provided + DynamoDb table. Then, it gets the item from the table and decrypts it + using only the raw AES keyring. + + This example takes in an `aesKeyBytes` parameter. This parameter + should be a ByteBuffer representing a 256-bit AES key. If this example + is run through the class' main method, it will create a new key. + In practice, users of this library should not randomly generate a key, + and should instead retrieve an existing key from a secure key + management system (e.g. an HSM). + + Running this example requires access to the DDB Table whose name + is provided in CLI arguments. + 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) +*/ + +pub async fn put_item_get_item() -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + let key_arn = test_utils::TEST_KMS_KEY_ID; + let aes_key_bytes = generate_aes_key_bytes(); + + // 1. Create the 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("my-aes-key-name") + .key_namespace("my-key-namespace") + .wrapping_key(aes_key_bytes) + .wrapping_alg(AesWrappingAlg::AlgAes256GcmIv12Tag16) + .send() + .await?; + + // 2. Create the AWS KMS keyring. + // We create a MRK multi keyring, as this interface also supports + // single-region KMS keys (standard KMS keys), + // and creates the KMS client for us automatically. + let aws_kms_mrk_multi_keyring = mpl + .create_aws_kms_mrk_multi_keyring() + .generator(key_arn) + .send() + .await?; + + // 3. Create the multi-keyring. + // We will label the AWS KMS keyring as the generator and the raw AES keyring as the + // only child keyring. + // You must provide a generator keyring to encrypt data. + // You may provide additional child keyrings. Each child keyring will be able to + // decrypt data encrypted with the multi-keyring on its own. It does not need + // knowledge of any other child keyrings or the generator keyring to decrypt. + + let multi_keyring = mpl + .create_multi_keyring() + .generator(aws_kms_mrk_multi_keyring) + .child_keyrings(vec![raw_aes_keyring.clone()]) + .send() + .await?; + + // 4. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + let attribute_actions_on_encrypt = HashMap::from([ + ("partition_key".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("sort_key".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ("sensitive_data".to_string(), CryptoAction::EncryptAndSign), + ]); + + // 5. Configure which attributes we expect to be included in the signature + // when reading items. There are two options for configuring this: + // + // - (Recommended) Configure `allowedUnsignedAttributesPrefix`: + // When defining your DynamoDb schema and deciding on attribute names, + // choose a distinguishing prefix (such as ":") for all attributes that + // you do not want to include in the signature. + // This has two main benefits: + // - It is easier to reason about the security and authenticity of data within your item + // when all unauthenticated data is easily distinguishable by their attribute name. + // - If you need to add new unauthenticated attributes in the future, + // you can easily make the corresponding update to your `attributeActionsOnEncrypt` + // and immediately start writing to that new attribute, without + // any other configuration update needed. + // Once you configure this field, it is not safe to update it. + // + // - Configure `allowedUnsignedAttributes`: You may also explicitly list + // a set of attributes that should be considered unauthenticated when encountered + // on read. Be careful if you use this configuration. Do not remove an attribute + // name from this configuration, even if you are no longer writing with that attribute, + // as old items may still include this attribute, and our configuration needs to know + // to continue to exclude this attribute from the signature scope. + // If you add new attribute names to this field, you must first deploy the update to this + // field to all readers in your host fleet before deploying the update to start writing + // with that new attribute. + // + // For this example, we currently authenticate all attributes. To make it easier to + // add unauthenticated attributes in the future, we define a prefix ":" for such attributes. + const UNSIGNED_ATTR_PREFIX: &str = ":"; + + // 6. Create the DynamoDb Encryption configuration for the table we will be writing to. + // Note that this example creates one config/client combination for PUT, and another + // for GET. The PUT config uses the multi-keyring, while the GET config uses the + // raw AES keyring. This is solely done to demonstrate that a keyring included as + // a child of a multi-keyring can be used to decrypt data on its own. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt.clone()) + .keyring(multi_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 7. Create a new AWS SDK DynamoDb client using the config above + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 8. Put an item into our table using the above client. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side using the multi-keyring. + // The item will be encrypted with all wrapping keys in the keyring, + // so that it can be decrypted with any one of the keys. + let item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("multiKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "sensitive_data".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ]); + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item.clone())) + .send() + .await?; + + // 9. Get the item back from our table using the above client. + // The client will decrypt the item client-side using the AWS KMS + // keyring, and return back the original item. + // Since the generator key is the first available key in the keyring, + // that is the key that will be used to decrypt this item. + let key_to_get = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("multiKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + + let resp = ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get.clone())) + .consistent_read(true) + .send() + .await?; + + assert_eq!(resp.item, Some(item.clone())); + + // 10. Create a new config and client with only the raw AES keyring to GET the item + // This is the same setup as above, except the config uses the `rawAesKeyring`. + let only_aes_table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(raw_aes_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let only_aes_table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([( + ddb_table_name.to_string(), + only_aes_table_config, + )])) + .build()?; + + let only_aes_dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(only_aes_table_configs)) + .build(); + let only_aes_ddb = aws_sdk_dynamodb::Client::from_conf(only_aes_dynamo_config); + + // 11. Get the item back from our table using the client + // configured with only the raw AES keyring. + // The client will decrypt the item client-side using the raw + // AES keyring, and return back the original item. + let resp = only_aes_ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get.clone())) + .consistent_read(true) + .send() + .await?; + + assert_eq!(resp.item, Some(item.clone())); + + println!("multi_keyring successful."); + Ok(()) +} + +fn generate_aes_key_bytes() -> Vec { + // This example returns a static 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. + vec![ + 1u8, 2, 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, + ] +} diff --git a/releases/rust/db_esdk/examples/keyring/multi_mrk_keyring.rs b/releases/rust/db_esdk/examples/keyring/multi_mrk_keyring.rs new file mode 100644 index 000000000..20bd6c5e6 --- /dev/null +++ b/releases/rust/db_esdk/examples/keyring/multi_mrk_keyring.rs @@ -0,0 +1,289 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +/* + This example sets up DynamoDb Encryption for the AWS SDK client + using the MRK multi-keyring. This keyring takes in multiple AWS KMS + MRKs (multi-region keys) or regular AWS KMS keys (single-region keys) + and uses them to encrypt and decrypt data. Data encrypted using an MRK + multi-keyring can be decrypted using any of its component keys. If a component + key is an MRK with a replica in a second region, the replica key can also be + used to decrypt data. + + For more information on MRKs, see + https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html + + For more information on multi-keyrings, see + https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-multi-keyring.html + + This example creates a new MRK multi-keyring consisting of one MRK + (labeled as the "generator keyring") and one single-region key (labeled + as the only "child keyring"). The MRK also has a replica in a second region. + + This example encrypts a test item using the MRK multi-keyring and puts the + encrypted item to the provided DynamoDb table. Then, it gets the item + from the table and decrypts it using three different configs: + 1. The MRK multi-keyring, where the MRK key is used to decrypt + 2. Another MRK multi-keyring, where the replica MRK key is used to decrypt + 3. Another MRK multi-keyring, where the single-region key that was present + in the original MRK multi-keyring is used to decrypt + + Running this example requires access to the DDB Table whose name + is provided in CLI arguments. + 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 demonstrates multi-region use cases. As a result, + it requires that you have a default region set in your AWS client. + You can set a default region through the AWS CLI with + `aws configure set region [region-name]` + e.g. + `aws configure set region us-west-2` + For more information on using AWS CLI to set config, see + https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configure/set.html +*/ +pub async fn put_item_get_item() -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + let mrk_key_arn = test_utils::TEST_MRK_KEY_ID; + let key_arn = test_utils::TEST_KMS_KEY_ID; + let mrk_replica_key_arn = test_utils::TEST_MRK_REPLICA_KEY_ID_US_EAST_1; + + // 1. Create a single MRK multi-keyring using the MRK arn and the single-region key arn. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + // Create the multi-keyring, using the MRK as the generator key, + // and the single-region key as a child key. + // Note that the generator key will generate and encrypt a plaintext data key + // and all child keys will only encrypt that same plaintext data key. + // As such, you must have permission to call KMS:GenerateDataKey on your generator key + // and permission to call KMS:Encrypt on all child keys. + // For more information, see the AWS docs on multi-keyrings above. + let aws_kms_mrk_multi_keyring = mpl + .create_aws_kms_mrk_multi_keyring() + .generator(mrk_key_arn) + .kms_key_ids(vec![key_arn.to_string()]) + .send() + .await?; + + // 2. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + let attribute_actions_on_encrypt = HashMap::from([ + ("partition_key".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("sort_key".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ("sensitive_data".to_string(), CryptoAction::EncryptAndSign), + ]); + + // 3. Configure which attributes we expect to be included in the signature + // when reading items. There are two options for configuring this: + // + // - (Recommended) Configure `allowedUnsignedAttributesPrefix`: + // When defining your DynamoDb schema and deciding on attribute names, + // choose a distinguishing prefix (such as ":") for all attributes that + // you do not want to include in the signature. + // This has two main benefits: + // - It is easier to reason about the security and authenticity of data within your item + // when all unauthenticated data is easily distinguishable by their attribute name. + // - If you need to add new unauthenticated attributes in the future, + // you can easily make the corresponding update to your `attributeActionsOnEncrypt` + // and immediately start writing to that new attribute, without + // any other configuration update needed. + // Once you configure this field, it is not safe to update it. + // + // - Configure `allowedUnsignedAttributes`: You may also explicitly list + // a set of attributes that should be considered unauthenticated when encountered + // on read. Be careful if you use this configuration. Do not remove an attribute + // name from this configuration, even if you are no longer writing with that attribute, + // as old items may still include this attribute, and our configuration needs to know + // to continue to exclude this attribute from the signature scope. + // If you add new attribute names to this field, you must first deploy the update to this + // field to all readers in your host fleet before deploying the update to start writing + // with that new attribute. + // + // For this example, we currently authenticate all attributes. To make it easier to + // add unauthenticated attributes in the future, we define a prefix ":" for such attributes. + const UNSIGNED_ATTR_PREFIX: &str = ":"; + + // 4. Create the DynamoDb Encryption configuration for the table we will be writing to. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt.clone()) + .keyring(aws_kms_mrk_multi_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 5. Create the DynamoDb Encryption Interceptor + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 6. Put an item into our table using the above client. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side using the MRK multi-keyring. + // The data key protecting this item will be encrypted + // with all the KMS Keys in this keyring, so that it can be + // decrypted with any one of those KMS Keys. + let item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("awsKmsMrkMultiKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "sensitive_data".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ]); + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item.clone())) + .send() + .await?; + + // 7. Get the item back from our table using the client. + // The client will decrypt the item client-side using the MRK + // and return back the original item. + // Since the generator key is the first available key in the keyring, + // that is the KMS Key that will be used to decrypt this item. + let key_to_get = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("awsKmsMrkMultiKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + + let resp = ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get.clone())) + .consistent_read(true) + .send() + .await?; + + assert_eq!(resp.item, Some(item.clone())); + + // 8. Create a MRK keyring using the replica MRK arn. + // We will use this to demonstrate that the replica MRK + // can decrypt data created with the original MRK, + // even when the replica MRK was not present in the + // encrypting multi-keyring. + let only_replica_key_mrk_multi_keyring = mpl + .create_aws_kms_mrk_multi_keyring() + .kms_key_ids(vec![mrk_replica_key_arn.to_string()]) + .send() + .await?; + + // 9. Create a new config and client using the MRK keyring. + // This is the same setup as above, except we provide the MRK keyring to the config. + let only_replica_table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt.clone()) + // Only replica keyring added here + .keyring(only_replica_key_mrk_multi_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let only_replica_table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([( + ddb_table_name.to_string(), + only_replica_table_config, + )])) + .build()?; + + let only_replica_dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(only_replica_table_configs)) + .build(); + let only_replica_ddb = aws_sdk_dynamodb::Client::from_conf(only_replica_dynamo_config); + + // 10. Get the item back from our table using the client configured with the replica. + // The client will decrypt the item client-side using the replica MRK + // and return back the original item. + + let only_replica_resp = only_replica_ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get.clone())) + .consistent_read(true) + .send() + .await?; + + assert_eq!(only_replica_resp.item, Some(item.clone())); + + // 11. Create an AWS KMS keyring using the single-region key ARN. + // We will use this to demonstrate that the single-region key + // can decrypt data created with the MRK multi-keyring, + // since it is present in the keyring used to encrypt. + let only_srk_key_mrk_multi_keyring = mpl + .create_aws_kms_mrk_multi_keyring() + .kms_key_ids(vec![key_arn.to_string()]) + .send() + .await?; + + // 12. Create a new config and client using the AWS KMS keyring. + // This is the same setup as above, except we provide the AWS KMS keyring to the config. + let only_srk_table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + // Only srk keyring added here + .keyring(only_srk_key_mrk_multi_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let only_srk_table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([( + ddb_table_name.to_string(), + only_srk_table_config, + )])) + .build()?; + + let only_srk_dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(only_srk_table_configs)) + .build(); + let only_srk_ddb = aws_sdk_dynamodb::Client::from_conf(only_srk_dynamo_config); + + // 13. Get the item back from our table using the client configured with the AWS KMS keyring. + // The client will decrypt the item client-side using the single-region key + // and return back the original item. + + let only_srk_resp = only_srk_ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get)) + .consistent_read(true) + .send() + .await?; + + assert_eq!(only_srk_resp.item, Some(item)); + + println!("multi_mrk_keyring successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/keyring/raw_aes_keyring.rs b/releases/rust/db_esdk/examples/keyring/raw_aes_keyring.rs new file mode 100644 index 000000000..ecf8d7d03 --- /dev/null +++ b/releases/rust/db_esdk/examples/keyring/raw_aes_keyring.rs @@ -0,0 +1,180 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::aws_cryptography_materialProviders::types::AesWrappingAlg; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +/* + This example sets up DynamoDb Encryption for the AWS SDK client + using the raw AES Keyring. This keyring takes in an AES key + and uses that key to protect the data keys that encrypt and + decrypt DynamoDb table items. + + This example takes in an `aesKeyBytes` parameter. This parameter + should be a ByteBuffer representing a 256-bit AES key. If this example + is run through the class' main method, it will create a new key. + In practice, users of this library should not randomly generate a key, + and should instead retrieve an existing key from a secure key + management system (e.g. an HSM). + + This example encrypts a test item using the provided AES key and puts the + encrypted item to the provided DynamoDb table. Then, it gets the + item from the table and decrypts it. + + Running this example requires access to the DDB Table whose name + is provided in CLI arguments. + 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) +*/ + +pub async fn put_item_get_item() -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + let aes_key_bytes = generate_aes_key_bytes(); + + // 1. Create the keyring. + // The DynamoDb encryption client uses this to encrypt and decrypt items. + 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("my-aes-key-name") + .key_namespace("my-key-namespace") + .wrapping_key(aes_key_bytes) + .wrapping_alg(AesWrappingAlg::AlgAes256GcmIv12Tag16) + .send() + .await?; + + // 2. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + let attribute_actions_on_encrypt = HashMap::from([ + ("partition_key".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("sort_key".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ("sensitive_data".to_string(), CryptoAction::EncryptAndSign), + ]); + + // 3. Configure which attributes we expect to be included in the signature + // when reading items. There are two options for configuring this: + // + // - (Recommended) Configure `allowedUnsignedAttributesPrefix`: + // When defining your DynamoDb schema and deciding on attribute names, + // choose a distinguishing prefix (such as ":") for all attributes that + // you do not want to include in the signature. + // This has two main benefits: + // - It is easier to reason about the security and authenticity of data within your item + // when all unauthenticated data is easily distinguishable by their attribute name. + // - If you need to add new unauthenticated attributes in the future, + // you can easily make the corresponding update to your `attributeActionsOnEncrypt` + // and immediately start writing to that new attribute, without + // any other configuration update needed. + // Once you configure this field, it is not safe to update it. + // + // - Configure `allowedUnsignedAttributes`: You may also explicitly list + // a set of attributes that should be considered unauthenticated when encountered + // on read. Be careful if you use this configuration. Do not remove an attribute + // name from this configuration, even if you are no longer writing with that attribute, + // as old items may still include this attribute, and our configuration needs to know + // to continue to exclude this attribute from the signature scope. + // If you add new attribute names to this field, you must first deploy the update to this + // field to all readers in your host fleet before deploying the update to start writing + // with that new attribute. + // + // For this example, we currently authenticate all attributes. To make it easier to + // add unauthenticated attributes in the future, we define a prefix ":" for such attributes. + const UNSIGNED_ATTR_PREFIX: &str = ":"; + + // 4. Create the DynamoDb Encryption configuration for the table we will be writing to. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(raw_aes_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 5. Create a new AWS SDK DynamoDb client using the Config above + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 6. Put an item into our table using the above client. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side, according to our configuration. + let item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("rawAesKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "sensitive_data".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ]); + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item.clone())) + .send() + .await?; + + // 7. Get the item back from our table using the same client. + // The client will decrypt the item client-side, and return + // back the original item. + let key_to_get = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("rawAesKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + + let resp = ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get)) + // In this example we configure a strongly consistent read + // because we perform a read immediately after a write (for demonstrative purposes). + // By default, reads are only eventually consistent. + // Read our docs to determine which read consistency to use for your application: + // https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html + .consistent_read(true) + .send() + .await?; + + assert_eq!(resp.item, Some(item)); + + println!("raw_aes_keyring successful."); + Ok(()) +} + +fn generate_aes_key_bytes() -> Vec { + // This example returns a static 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. + vec![ + 1u8, 2, 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, + ] +} diff --git a/releases/rust/db_esdk/examples/keyring/raw_rsa_keyring.rs b/releases/rust/db_esdk/examples/keyring/raw_rsa_keyring.rs new file mode 100644 index 000000000..88f32ac60 --- /dev/null +++ b/releases/rust/db_esdk/examples/keyring/raw_rsa_keyring.rs @@ -0,0 +1,280 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::aws_cryptography_materialProviders::types::PaddingScheme; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; +use std::fs::File; +use std::io::Read; +use std::io::Write; +use std::path::Path; + +/* + This example sets up DynamoDb Encryption for the AWS SDK client + using the raw RSA Keyring. This keyring uses an RSA key pair to + encrypt and decrypt records. This keyring accepts PEM encodings of + the key pair as UTF-8 interpreted bytes. The client uses the public key + to encrypt items it adds to the table and uses the private key to decrypt + existing table items it retrieves. + + 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 loads a key pair from disk, encrypts a test item, and puts the + encrypted item to the provided DynamoDb table. Then, it gets the + item from the table and decrypts it. + + Running this example requires access to the DDB Table whose name + is provided in CLI arguments. + 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) +*/ + +const EXAMPLE_RSA_PRIVATE_KEY_FILENAME: &str = "RawRsaKeyringExamplePrivateKey.pem"; +const EXAMPLE_RSA_PUBLIC_KEY_FILENAME: &str = "RawRsaKeyringExamplePublicKey.pem"; + +pub async fn put_item_get_item() -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + + // 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()?; + } + + // 1. 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)?; + + // 2. Create the keyring. + // The DynamoDb encryption client uses this to encrypt and decrypt items. + 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("my-rsa-key-name") + .key_namespace("my-key-namespace") + .padding_scheme(PaddingScheme::OaepSha256Mgf1) + .public_key(public_key_utf8_bytes) + .private_key(private_key_utf8_bytes) + .send() + .await?; + + // 3. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + let attribute_actions_on_encrypt = HashMap::from([ + ("partition_key".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("sort_key".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ("sensitive_data".to_string(), CryptoAction::EncryptAndSign), + ]); + + // 4. Configure which attributes we expect to be included in the signature + // when reading items. There are two options for configuring this: + // + // - (Recommended) Configure `allowedUnsignedAttributesPrefix`: + // When defining your DynamoDb schema and deciding on attribute names, + // choose a distinguishing prefix (such as ":") for all attributes that + // you do not want to include in the signature. + // This has two main benefits: + // - It is easier to reason about the security and authenticity of data within your item + // when all unauthenticated data is easily distinguishable by their attribute name. + // - If you need to add new unauthenticated attributes in the future, + // you can easily make the corresponding update to your `attributeActionsOnEncrypt` + // and immediately start writing to that new attribute, without + // any other configuration update needed. + // Once you configure this field, it is not safe to update it. + // + // - Configure `allowedUnsignedAttributes`: You may also explicitly list + // a set of attributes that should be considered unauthenticated when encountered + // on read. Be careful if you use this configuration. Do not remove an attribute + // name from this configuration, even if you are no longer writing with that attribute, + // as old items may still include this attribute, and our configuration needs to know + // to continue to exclude this attribute from the signature scope. + // If you add new attribute names to this field, you must first deploy the update to this + // field to all readers in your host fleet before deploying the update to start writing + // with that new attribute. + // + // For this example, we currently authenticate all attributes. To make it easier to + // add unauthenticated attributes in the future, we define a prefix ":" for such attributes. + const UNSIGNED_ATTR_PREFIX: &str = ":"; + + // 5. Create the DynamoDb Encryption configuration for the table we will be writing to. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(raw_rsa_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 6. Create a new AWS SDK DynamoDb client using the config above + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 7. Put an item into our table using the above client. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side, according to our configuration. + let item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("rawRsaKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "sensitive_data".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ]); + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item.clone())) + .send() + .await?; + + // 8. Get the item back from our table using the same client. + // The client will decrypt the item client-side, and return + // back the original item. + + let key_to_get = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("rawRsaKeyringItem".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + + let resp = ddb + .get_item() + .table_name(ddb_table_name) + .set_key(Some(key_to_get)) + // In this example we configure a strongly consistent read + // because we perform a read immediately after a write (for demonstrative purposes). + // By default, reads are only eventually consistent. + // Read our docs to determine which read consistency to use for your application: + // https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html + .consistent_read(true) + .send() + .await?; + + assert_eq!(resp.item, Some(item)); + println!("raw_rsa_keyring successful."); + 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) + } + // If a key pair already exists: do not overwrite existing key pair + 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(()) +} diff --git a/releases/rust/db_esdk/examples/main.rs b/releases/rust/db_esdk/examples/main.rs new file mode 100644 index 000000000..f82979bcb --- /dev/null +++ b/releases/rust/db_esdk/examples/main.rs @@ -0,0 +1,85 @@ +// 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 basic_get_put_example; +pub mod clientsupplier; +pub mod create_keystore_key; +pub mod get_encrypted_data_key_description; +pub mod itemencryptor; +pub mod keyring; +pub mod multi_get_put_example; +pub mod searchableencryption; +pub mod test_utils; + +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> { + basic_get_put_example::put_item_get_item().await?; + itemencryptor::item_encrypt_decrypt::encrypt_decrypt().await?; + get_encrypted_data_key_description::get_encrypted_data_key_description().await?; + multi_get_put_example::multi_put_get().await?; + keyring::raw_rsa_keyring::put_item_get_item().await?; + keyring::kms_rsa_keyring::put_item_get_item().await?; + keyring::multi_mrk_keyring::put_item_get_item().await?; + keyring::raw_aes_keyring::put_item_get_item().await?; + keyring::multi_keyring::put_item_get_item().await?; + keyring::mrk_discovery_multi_keyring::put_item_get_item().await?; + clientsupplier::client_supplier_example::put_item_get_item().await?; + + let key_id = create_keystore_key::keystore_create_key().await?; + let key_id2 = create_keystore_key::keystore_create_key().await?; + // Key creation is eventually consistent, so wait 5 seconds to decrease the likelihood + // our test fails due to eventual consistency issues. + println!("Key Store Keys created. Waiting 5 seconds for consistency."); + std::thread::sleep(std::time::Duration::from_secs(5)); + + keyring::hierarchical_keyring::put_item_get_item(&key_id, &key_id2).await?; + + searchableencryption::basic_searchable_encryption::put_and_query_with_beacon(&key_id).await?; + searchableencryption::beacon_styles_searchable_encryption::put_and_query_with_beacon(&key_id) + .await?; + searchableencryption::compound_beacon_searchable_encryption::put_and_query_with_beacon(&key_id) + .await?; + searchableencryption::virtual_beacon_searchable_encryption::put_and_query_with_beacon(&key_id) + .await?; + searchableencryption::complexexample::complex_searchable_encryption::run_example(&key_id) + .await?; + + // ScanError will have to wait until we have a reasonable error message strategy + + println!("All examples completed successfully.\n"); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/multi_get_put_example.rs b/releases/rust/db_esdk/examples/multi_get_put_example.rs new file mode 100644 index 000000000..b5b5e11ca --- /dev/null +++ b/releases/rust/db_esdk/examples/multi_get_put_example.rs @@ -0,0 +1,251 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_materialProviders::client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; + +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig; + +/* + This example sets up DynamoDb Encryption for the AWS SDK client + and uses the low level PutItem and GetItem DDB APIs to demonstrate + putting a client-side encrypted item into DynamoDb + and then retrieving and decrypting that item from DynamoDb. + + Running this example requires access to the DDB Table whose name + is provided in CLI arguments. + 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 (N) +*/ + +pub async fn multi_put_get() -> Result<(), crate::BoxError> { + let kms_key_id = test_utils::TEST_KMS_KEY_ID; + let ddb_table_name = test_utils::TEST_DDB_TABLE_NAME; + + // 1. Create a Keyring. This Keyring will be responsible for protecting the data keys that protect your data. + // For this example, we will create a AWS KMS Keyring with the AWS KMS Key we want to use. + // We will use the `CreateMrkMultiKeyring` method to create this keyring, + // as it will correctly handle both single region and Multi-Region KMS Keys. + let provider_config = MaterialProvidersConfig::builder().build()?; + let mat_prov = client::Client::from_conf(provider_config)?; + let kms_keyring = mat_prov + .create_aws_kms_mrk_multi_keyring() + .generator(kms_key_id) + .send() + .await?; + + // 2. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + let attribute_actions_on_encrypt = HashMap::from([ + ("partition_key".to_string(), CryptoAction::SignOnly), + ("sort_key".to_string(), CryptoAction::SignOnly), + ("attribute1".to_string(), CryptoAction::EncryptAndSign), + ("attribute2".to_string(), CryptoAction::SignOnly), + (":attribute3".to_string(), CryptoAction::DoNothing), + ]); + + // 3. Configure which attributes we expect to be included in the signature + // when reading items. There are two options for configuring this: + // + // - (Recommended) Configure `allowedUnsignedAttributesPrefix`: + // When defining your DynamoDb schema and deciding on attribute names, + // choose a distinguishing prefix (such as ":") for all attributes that + // you do not want to include in the signature. + // This has two main benefits: + // - It is easier to reason about the security and authenticity of data within your item + // when all unauthenticated data is easily distinguishable by their attribute name. + // - If you need to add new unauthenticated attributes in the future, + // you can easily make the corresponding update to your `attributeActionsOnEncrypt` + // and immediately start writing to that new attribute, without + // any other configuration update needed. + // Once you configure this field, it is not safe to update it. + // + // - Configure `allowedUnsignedAttributes`: You may also explicitly list + // a set of attributes that should be considered unauthenticated when encountered + // on read. Be careful if you use this configuration. Do not remove an attribute + // name from this configuration, even if you are no longer writing with that attribute, + // as old items may still include this attribute, and our configuration needs to know + // to continue to exclude this attribute from the signature scope. + // If you add new attribute names to this field, you must first deploy the update to this + // field to all readers in your host fleet before deploying the update to start writing + // with that new attribute. + // + // For this example, we have designed our DynamoDb table such that any attribute name with + // the ":" prefix should be considered unauthenticated. + const UNSIGNED_ATTR_PREFIX: &str = ":"; + + // 4. Create the DynamoDb Encryption configuration for the table we will be writing to. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .sort_key_name("sort_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(kms_keyring) + .allowed_unsigned_attribute_prefix(UNSIGNED_ATTR_PREFIX) + // Specifying an algorithm suite is not required, + // but is done here to demonstrate how to do so. + // We suggest using the + // `ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384` suite, + // which includes AES-GCM with key derivation, signing, and key commitment. + // This is also the default algorithm suite if one is not specified in this config. + // For more information on supported algorithm suites, see: + // https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/supported-algorithms.html + .algorithm_suite_id( + DbeAlgorithmSuiteId::AlgAes256GcmHkdfSha512CommitKeyEcdsaP384SymsigHmacSha384, + ) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 5. Create a new AWS SDK DynamoDb client using the TableEncryptionConfigs + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 6. Put an item into our table using the above client. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side, according to our configuration. + let batch_write_item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("BatchWriteItemExample".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "attribute1".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ( + "attribute2".to_string(), + AttributeValue::S("sign me!".to_string()), + ), + ( + ":attribute3".to_string(), + AttributeValue::S("ignore me!".to_string()), + ), + ]); + let put_request = aws_sdk_dynamodb::types::PutRequest::builder() + .set_item(Some(batch_write_item)) + .build()?; + + let batch_write_request = aws_sdk_dynamodb::types::WriteRequest::builder() + .put_request(put_request) + .build(); + + let transact_write_item = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("TransactWriteItemExample".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ( + "attribute1".to_string(), + AttributeValue::S("encrypt and sign me!".to_string()), + ), + ( + "attribute2".to_string(), + AttributeValue::S("sign me!".to_string()), + ), + ( + ":attribute3".to_string(), + AttributeValue::S("ignore me!".to_string()), + ), + ]); + let transact_put = aws_sdk_dynamodb::types::Put::builder() + .table_name(ddb_table_name) + .set_item(Some(transact_write_item)) + .build()?; + + let transact_item = aws_sdk_dynamodb::types::TransactWriteItem::builder() + .put(transact_put) + .build(); + + ddb.batch_write_item() + .request_items(ddb_table_name, vec![batch_write_request]) + .send() + .await?; + + ddb.transact_write_items() + .transact_items(transact_item) + .send() + .await?; + + // 7. Get the item back from our table using the same client. + // The client will decrypt the item client-side, and return + // back the original item. + let batch_get_keys = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("BatchWriteItemExample".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + let keys_and_attr = aws_sdk_dynamodb::types::KeysAndAttributes::builder() + .keys(batch_get_keys) + .consistent_read(true) + .build()?; + + let batch_get_response = ddb + .batch_get_item() + .request_items(ddb_table_name, keys_and_attr) + .send() + .await?; + + let returned_item = &batch_get_response.responses.unwrap()[ddb_table_name][0]; + assert_eq!( + returned_item["attribute1"], + AttributeValue::S("encrypt and sign me!".to_string()) + ); + + let transact_get_keys = HashMap::from([ + ( + "partition_key".to_string(), + AttributeValue::S("TransactWriteItemExample".to_string()), + ), + ("sort_key".to_string(), AttributeValue::N("0".to_string())), + ]); + let transact_get = aws_sdk_dynamodb::types::Get::builder() + .table_name(ddb_table_name) + .set_key(Some(transact_get_keys)) + .build()?; + + let transact_get_item = aws_sdk_dynamodb::types::TransactGetItem::builder() + .get(transact_get) + .build(); + + let transact_get_response = ddb + .transact_get_items() + .transact_items(transact_get_item) + .send() + .await?; + + let the_item = transact_get_response.responses.as_ref().unwrap()[0] + .item + .as_ref() + .unwrap(); + assert_eq!( + the_item["attribute1"], + AttributeValue::S("encrypt and sign me!".to_string()) + ); + + println!("multi_put_get successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/searchableencryption/basic_searchable_encryption.rs b/releases/rust/db_esdk/examples/searchableencryption/basic_searchable_encryption.rs new file mode 100644 index 000000000..55d0fd05d --- /dev/null +++ b/releases/rust/db_esdk/examples/searchableencryption/basic_searchable_encryption.rs @@ -0,0 +1,356 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_materialProviders::client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; + +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon; +use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; +use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig; + +/* + This example demonstrates how to set up a beacon on an encrypted attribute, + put an item with the beacon, and query against that beacon. + This example follows a use case of a database that stores unit inspection information. + + Running this example requires access to a DDB table with the + following key configuration: + - Partition key is named "work_id" with type (S) + - Sort key is named "inspection_date" with type (S) + This table must have a Global Secondary Index (GSI) configured named "last4-unit-index": + - Partition key is named "aws_dbe_b_inspector_id_last4" with type (S) + - Sort key is named "aws_dbe_b_unit" with type (S) + + In this example for storing unit inspection information, this schema is utilized for the data: + - "work_id" stores a unique identifier for a unit inspection work order (v4 UUID) + - "inspection_date" stores an ISO 8601 date for the inspection (YYYY-MM-DD) + - "inspector_id_last4" stores the last 4 digits of the ID of the inspector performing the work + - "unit" stores a 12-digit serial number for the unit being inspected + + The example requires the following ordered input command line parameters: + 1. DDB table name for table to put/query data from + 2. Branch key ID for a branch key that was previously created in your key store. See the + CreateKeyStoreKeyExample. + 3. Branch key wrapping KMS key ARN for the KMS key used to create the branch key with ID + provided in arg 2 + 4. Branch key DDB table name for the DDB table representing the branch key store +*/ + +const GSI_NAME: &str = "last4-unit-index"; + +pub async fn put_and_query_with_beacon(branch_key_id: &str) -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::UNIT_INSPECTION_TEST_DDB_TABLE_NAME; + let branch_key_wrapping_kms_key_arn = test_utils::TEST_BRANCH_KEY_WRAPPING_KMS_KEY_ARN; + let branch_key_ddb_table_name = test_utils::TEST_BRANCH_KEYSTORE_DDB_TABLE_NAME; + + // 1. Configure Beacons. + // The beacon name must be the name of a table attribute that will be encrypted. + // The `length` parameter dictates how many bits are in the beacon attribute value. + // The following link provides guidance on choosing a beacon length: + // https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/choosing-beacon-length.html + + // The configured DDB table has a GSI on the `aws_dbe_b_inspector_id_last4` AttributeName. + // This field holds the last 4 digits of an inspector ID. + // For our example, this field may range from 0 to 9,999 (10,000 possible values). + // For our example, we assume a full inspector ID is an integer + // ranging from 0 to 99,999,999. We do not assume that the full inspector ID's + // values are uniformly distributed across its range of possible values. + // In many use cases, the prefix of an identifier encodes some information + // about that identifier (e.g. zipcode and SSN prefixes encode geographic + // information), while the suffix does not and is more uniformly distributed. + // We will assume that the inspector ID field matches a similar use case. + // So for this example, we only store and use the last + // 4 digits of the inspector ID, which we assume is uniformly distributed. + // Since the full ID's range is divisible by the range of the last 4 digits, + // then the last 4 digits of the inspector ID are uniformly distributed + // over the range from 0 to 9,999. + // See our documentation for why you should avoid creating beacons over non-uniform distributions + // https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/searchable-encryption.html#are-beacons-right-for-me + // A single inspector ID suffix may be assigned to multiple `work_id`s. + // + // This link provides guidance for choosing a beacon length: + // https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/choosing-beacon-length.html + // We follow the guidance in the link above to determine reasonable bounds + // for the length of a beacon on the last 4 digits of an inspector ID: + // - min: log(sqrt(10,000))/log(2) ~= 6.6, round up to 7 + // - max: log((10,000/2))/log(2) ~= 12.3, round down to 12 + // You will somehow need to round results to a nearby integer. + // We choose to round to the nearest integer; you might consider a different rounding approach. + // Rounding up will return fewer expected "false positives" in queries, + // leading to fewer decrypt calls and better performance, + // but it is easier to identify which beacon values encode distinct plaintexts. + // Rounding down will return more expected "false positives" in queries, + // leading to more decrypt calls and worse performance, + // but it is harder to identify which beacon values encode distinct plaintexts. + // We can choose a beacon length between 7 and 12: + // - Closer to 7, we expect more "false positives" to be returned, + // making it harder to identify which beacon values encode distinct plaintexts, + // but leading to more decrypt calls and worse performance + // - Closer to 12, we expect fewer "false positives" returned in queries, + // leading to fewer decrypt calls and better performance, + // but it is easier to identify which beacon values encode distinct plaintexts. + // As an example, we will choose 10. + // + // Values stored in aws_dbe_b_inspector_id_last4 will be 10 bits long (0x000 - 0x3ff) + // There will be 2^10 = 1,024 possible HMAC values. + // With a sufficiently large number of well-distributed inspector IDs, + // for a particular beacon we expect (10,000/1,024) ~= 9.8 4-digit inspector ID suffixes + // sharing that beacon value. + let last4_beacon = StandardBeacon::builder() + .name("inspector_id_last4") + .length(10) + .build()?; + + // The configured DDB table has a GSI on the `aws_dbe_b_unit` AttributeName. + // This field holds a unit serial number. + // For this example, this is a 12-digit integer from 0 to 999,999,999,999 (10^12 possible values). + // We will assume values for this attribute are uniformly distributed across this range. + // A single unit serial number may be assigned to multiple `work_id`s. + // + // This link provides guidance for choosing a beacon length: + // https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/choosing-beacon-length.html + // We follow the guidance in the link above to determine reasonable bounds + // for the length of a beacon on a unit serial number: + // - min: log(sqrt(999,999,999,999))/log(2) ~= 19.9, round up to 20 + // - max: log((999,999,999,999/2))/log(2) ~= 38.9, round up to 39 + // We can choose a beacon length between 20 and 39: + // - Closer to 20, we expect more "false positives" to be returned, + // making it harder to identify which beacon values encode distinct plaintexts, + // but leading to more decrypt calls and worse performance + // - Closer to 39, we expect fewer "false positives" returned in queries, + // leading to fewer decrypt calls and better performance, + // but it is easier to identify which beacon values encode distinct plaintexts. + // As an example, we will choose 30. + // + // Values stored in aws_dbe_b_unit will be 30 bits long (0x00000000 - 0x3fffffff) + // There will be 2^30 = 1,073,741,824 ~= 1.1B possible HMAC values. + // With a sufficiently large number of well-distributed inspector IDs, + // for a particular beacon we expect (10^12/2^30) ~= 931.3 unit serial numbers + // sharing that beacon value. + let unit_beacon = StandardBeacon::builder().name("unit").length(30).build()?; + + let standard_beacon_list = vec![last4_beacon, unit_beacon]; + + // 2. Configure Keystore. + // The keystore is a separate DDB table where the client stores encryption and decryption materials. + // In order to configure beacons on the DDB client, you must configure a keystore. + // + // This example expects that you have already set up a KeyStore with a single branch key. + // See the "Create KeyStore Table Example" and "Create KeyStore Key Example" for how to do this. + // After you create a branch key, you should persist its ID for use in this example. + 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(branch_key_ddb_table_name) + .logical_key_store_name(branch_key_ddb_table_name) + .kms_configuration(KmsConfiguration::KmsKeyArn( + branch_key_wrapping_kms_key_arn.to_string(), + )) + .build()?; + + let key_store = keystore_client::Client::from_conf(key_store_config)?; + + // 3. Create BeaconVersion. + // The BeaconVersion inside the list holds the list of beacons on the table. + // The BeaconVersion also stores information about the keystore. + // BeaconVersion must be provided: + // - keyStore: The keystore configured in step 2. + // - keySource: A configuration for the key source. + // For simple use cases, we can configure a 'singleKeySource' which + // statically configures a single beaconKey. That is the approach this example takes. + // For use cases where you want to use different beacon keys depending on the data + // (for example if your table holds data for multiple tenants, and you want to use + // a different beacon key per tenant), look into configuring a MultiKeyStore: + // https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/searchable-encryption-multitenant.html + + let beacon_version = BeaconVersion::builder() + .standard_beacons(standard_beacon_list) + .version(1) // MUST be 1 + .key_store(key_store.clone()) + .key_source(BeaconKeySource::Single( + SingleKeyStore::builder() + // `keyId` references a beacon key. + // For every branch key we create in the keystore, + // we also create a beacon key. + // This beacon key is not the same as the branch key, + // but is created with the same ID as the branch key. + .key_id(branch_key_id) + .cache_ttl(6000) + .build()?, + )) + .build()?; + let beacon_versions = vec![beacon_version]; + + // 4. Create a Hierarchical Keyring + // This is a KMS keyring that utilizes the keystore table. + // This config defines how items are encrypted and decrypted. + // NOTE: You should configure this to use the same keystore as your search config. + let provider_config = MaterialProvidersConfig::builder().build()?; + let mat_prov = client::Client::from_conf(provider_config)?; + let kms_keyring = mat_prov + .create_aws_kms_hierarchical_keyring() + .branch_key_id(branch_key_id) + .key_store(key_store) + .ttl_seconds(6000) + .send() + .await?; + + // 5. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + // Any attributes that will be used in beacons must be configured as ENCRYPT_AND_SIGN. + let attribute_actions_on_encrypt = HashMap::from([ + ("work_id".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("inspection_date".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ( + "inspector_id_last4".to_string(), + CryptoAction::EncryptAndSign, + ), // Beaconized attributes must be encrypted + ("unit".to_string(), CryptoAction::EncryptAndSign), // Beaconized attributes must be encrypted + ]); + + // 6. Create the DynamoDb Encryption configuration for the table we will be writing to. + // The beaconVersions are added to the search configuration. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("work_id") + .sort_key_name("inspection_date") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(kms_keyring) + .search( + SearchConfig::builder() + .write_version(1) // MUST be 1 + .versions(beacon_versions) + .build()?, + ) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 7. Create a new AWS SDK DynamoDb client using the TableEncryptionConfigs + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 8. Put an item into our table using the above client. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side, according to our configuration. + // Since our configuration includes beacons for `inspector_id_last4` and `unit`, + // the client will add two additional attributes to the item. These attributes will have names + // `aws_dbe_b_inspector_id_last4` and `aws_dbe_b_unit`. Their values will be HMACs + // truncated to as many bits as the beacon's `length` parameter; e.g. + // aws_dbe_b_inspector_id_last4 = truncate(HMAC("4321"), 10) + // aws_dbe_b_unit = truncate(HMAC("123456789012"), 30) + + let item = HashMap::from([ + ( + "work_id".to_string(), + AttributeValue::S("1313ba89-5661-41eb-ba6c-cb1b4cb67b2d".to_string()), + ), + ( + "inspection_date".to_string(), + AttributeValue::S("2023-06-13".to_string()), + ), + ( + "inspector_id_last4".to_string(), + AttributeValue::S("4321".to_string()), + ), + ( + "unit".to_string(), + AttributeValue::S("123456789012".to_string()), + ), + ]); + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item.clone())) + .send() + .await?; + + // 9. Query for the item we just put. + // Note that we are constructing the query as if we were querying on plaintext values. + // However, the DDB encryption client will detect that this attribute name has a beacon configured. + // The client will add the beaconized attribute name and attribute value to the query, + // and transform the query to use the beaconized name and value. + // Internally, the client will query for and receive all items with a matching HMAC value in the beacon field. + // This may include a number of "false positives" with different ciphertext, but the same truncated HMAC. + // e.g. if truncate(HMAC("123456789012"), 30) + // == truncate(HMAC("098765432109"), 30), + // the query will return both items. + // The client will decrypt all returned items to determine which ones have the expected attribute values, + // and only surface items with the correct plaintext to the user. + // This procedure is internal to the client and is abstracted away from the user; + // e.g. the user will only see "123456789012" and never + // "098765432109", though the actual query returned both. + let expression_attributes_names = HashMap::from([ + ("#last4".to_string(), "inspector_id_last4".to_string()), + ("#unit".to_string(), "unit".to_string()), + ]); + + let expression_attribute_values = HashMap::from([ + (":last4".to_string(), AttributeValue::S("4321".to_string())), + ( + ":unit".to_string(), + AttributeValue::S("123456789012".to_string()), + ), + ]); + + // GSIs do not update instantly + // so if the results come back empty + // we retry after a short sleep + for _i in 0..10 { + let query_response = ddb + .query() + .table_name(ddb_table_name) + .index_name(GSI_NAME) + .key_condition_expression("#last4 = :last4 and #unit = :unit") + .set_expression_attribute_names(Some(expression_attributes_names.clone())) + .set_expression_attribute_values(Some(expression_attribute_values.clone())) + .send() + .await?; + + // if no results, sleep and try again + if query_response.items.is_none() || query_response.items.as_ref().unwrap().is_empty() { + std::thread::sleep(std::time::Duration::from_millis(20)); + continue; + } + + let attribute_values = query_response.items.unwrap(); + // Validate only 1 item was returned: the item we just put + assert_eq!(attribute_values.len(), 1); + let returned_item = &attribute_values[0]; + // Validate the item has the expected attributes + assert_eq!( + returned_item["inspector_id_last4"], + AttributeValue::S("4321".to_string()) + ); + assert_eq!( + returned_item["unit"], + AttributeValue::S("123456789012".to_string()) + ); + break; + } + println!("basic_searchable_encryption successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/searchableencryption/beacon_styles_searchable_encryption.rs b/releases/rust/db_esdk/examples/searchableencryption/beacon_styles_searchable_encryption.rs new file mode 100644 index 000000000..a7d359dfc --- /dev/null +++ b/releases/rust/db_esdk/examples/searchableencryption/beacon_styles_searchable_encryption.rs @@ -0,0 +1,409 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::*; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; +use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +/* + This example demonstrates how to use Beacons Styles on Standard Beacons on encrypted attributes, + put an item with the beacon, and query against that beacon. + This example follows a use case of a database that stores food information. + This is an extension of the "BasicSearchableEncryptionExample" in this directory + and uses the same table schema. + + Running this example requires access to a DDB table with the + following key configuration: + - Partition key is named "work_id" with type (S) + - Sort key is named "inspection_time" with type (S) + + In this example for storing food information, this schema is utilized for the data: + - "work_id" stores a unique identifier for a unit inspection work order (v4 UUID) + - "inspection_date" stores an ISO 8601 date for the inspection (YYYY-MM-DD) + - "fruit" stores one type of fruit + - "basket" stores a set of types of fruit + - "dessert" stores one type of dessert + - "veggies" stores a set of types of vegetable + - "work_type" stores a unit inspection category + + The example requires the following ordered input command line parameters: + 1. DDB table name for table to put/query data from + 2. Branch key ID for a branch key that was previously created in your key store. See the + CreateKeyStoreKeyExample. + 3. Branch key wrapping KMS key ARN for the KMS key used to create the branch key with ID + provided in arg 2 + 4. Branch key DDB table ARN for the DDB table representing the branch key store +*/ + +pub async fn put_and_query_with_beacon(branch_key_id: &str) -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::UNIT_INSPECTION_TEST_DDB_TABLE_NAME; + let branch_key_wrapping_kms_key_arn = test_utils::TEST_BRANCH_KEY_WRAPPING_KMS_KEY_ARN; + let branch_key_ddb_table_name = test_utils::TEST_BRANCH_KEYSTORE_DDB_TABLE_NAME; + + // 1. Create Beacons. + let standard_beacon_list = vec![ + // The fruit beacon allows searching on the encrypted fruit attribute + // We have selected 30 as an example beacon length, but you should go to + // https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/choosing-beacon-length.html + // when creating your beacons. + StandardBeacon::builder().name("fruit").length(30).build()?, + // The basket beacon allows searching on the encrypted basket attribute + // Basket is used as a Set, and therefore needs a beacon style to reflect that. + // Further, we need to be able to compare the items in basket to the fruit attribute + // so we `share` this beacon with `fruit`. + // Since we need both of these things, we use the SharedSet style. + StandardBeacon::builder() + .name("basket") + .length(30) + .style(BeaconStyle::SharedSet( + SharedSet::builder().other("fruit").build()?, + )) + .build()?, + // The dessert beacon allows searching on the encrypted dessert attribute + // We need to be able to compare the dessert attribute to the fruit attribute + // so we `share` this beacon with `fruit`. + StandardBeacon::builder() + .name("dessert") + .length(30) + .style(BeaconStyle::Shared( + Shared::builder().other("fruit").build()?, + )) + .build()?, + // The veggieBeacon allows searching on the encrypted veggies attribute + // veggies is used as a Set, and therefore needs a beacon style to reflect that. + StandardBeacon::builder() + .name("veggies") + .length(30) + .style(BeaconStyle::AsSet(AsSet::builder().build()?)) + .build()?, + // The work_typeBeacon allows searching on the encrypted work_type attribute + // We only use it as part of the compound work_unit beacon, + // so we disable its use as a standalone beacon + StandardBeacon::builder() + .name("work_type") + .length(30) + .style(BeaconStyle::PartOnly(PartOnly::builder().build()?)) + .build()?, + ]; + + // Here we build a compound beacon from work_id and work_type + // If we had tried to make a StandardBeacon from work_type, we would have seen an error + // because work_type is "PartOnly" + let encrypted_part_list = vec![EncryptedPart::builder() + .name("work_type") + .prefix("T-") + .build()?]; + + let signed_part_list = vec![SignedPart::builder().name("work_id").prefix("I-").build()?]; + + let compound_beacon_list = vec![CompoundBeacon::builder() + .name("work_unit") + .split(".") + .encrypted(encrypted_part_list) + .signed(signed_part_list) + .build()?]; + + // 2. Configure the Keystore + // These are the same constructions as in the Basic example, which describes these in more detail. + 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(branch_key_ddb_table_name) + .logical_key_store_name(branch_key_ddb_table_name) + .kms_configuration(KmsConfiguration::KmsKeyArn( + branch_key_wrapping_kms_key_arn.to_string(), + )) + .build()?; + + let key_store = keystore_client::Client::from_conf(key_store_config)?; + + // 3. Create BeaconVersion. + // This is similar to the Basic example + let beacon_version = BeaconVersion::builder() + .standard_beacons(standard_beacon_list) + .compound_beacons(compound_beacon_list) + .version(1) // MUST be 1 + .key_store(key_store.clone()) + .key_source(BeaconKeySource::Single( + SingleKeyStore::builder() + // `keyId` references a beacon key. + // For every branch key we create in the keystore, + // we also create a beacon key. + // This beacon key is not the same as the branch key, + // but is created with the same ID as the branch key. + .key_id(branch_key_id) + .cache_ttl(6000) + .build()?, + )) + .build()?; + let beacon_versions = vec![beacon_version]; + + // 4. Create a Hierarchical Keyring + // This is the same configuration as in the Basic example. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + let kms_keyring = mpl + .create_aws_kms_hierarchical_keyring() + .branch_key_id(branch_key_id) + .key_store(key_store) + .ttl_seconds(6000) + .send() + .await?; + + // 5. Configure which attributes are encrypted and/or signed when writing new items. + let attribute_actions_on_encrypt = HashMap::from([ + ("work_id".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("inspection_date".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ("dessert".to_string(), CryptoAction::EncryptAndSign), // Beaconized attributes must be encrypted + ("fruit".to_string(), CryptoAction::EncryptAndSign), // Beaconized attributes must be encrypted + ("basket".to_string(), CryptoAction::EncryptAndSign), // Beaconized attributes must be encrypted + ("veggies".to_string(), CryptoAction::EncryptAndSign), // Beaconized attributes must be encrypted + ("work_type".to_string(), CryptoAction::EncryptAndSign), // Beaconized attributes must be encrypted + ]); + + // 6. Create the DynamoDb Encryption configuration for the table we will be writing to. + // The beaconVersions are added to the search configuration. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("work_id") + .sort_key_name("inspection_date") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(kms_keyring) + .search( + SearchConfig::builder() + .write_version(1) // MUST be 1 + .versions(beacon_versions) + .build()?, + ) + .build()?; + + // 7. Create config + let encryption_config = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 8. Create item one, specifically with "dessert != fruit", and "fruit in basket". + let item1 = HashMap::from([ + ("work_id".to_string(), AttributeValue::S("1".to_string())), + ( + "inspection_date".to_string(), + AttributeValue::S("2023-06-13".to_string()), + ), + ("dessert".to_string(), AttributeValue::S("cake".to_string())), + ("fruit".to_string(), AttributeValue::S("banana".to_string())), + ( + "basket".to_string(), + AttributeValue::Ss(vec![ + "banana".to_string(), + "apple".to_string(), + "pear".to_string(), + ]), + ), + ( + "veggies".to_string(), + AttributeValue::Ss(vec![ + "beans".to_string(), + "carrots".to_string(), + "celery".to_string(), + ]), + ), + ( + "work_type".to_string(), + AttributeValue::S("small".to_string()), + ), + ]); + + // 9. Create item two, specifically with "dessert == fruit", and "fruit not in basket". + let item2 = HashMap::from([ + ("work_id".to_string(), AttributeValue::S("2".to_string())), + ( + "inspection_date".to_string(), + AttributeValue::S("2023-06-13".to_string()), + ), + ( + "dessert".to_string(), + AttributeValue::S("orange".to_string()), + ), + ("fruit".to_string(), AttributeValue::S("orange".to_string())), + ( + "basket".to_string(), + AttributeValue::Ss(vec![ + "strawberry".to_string(), + "blueberry".to_string(), + "blackberry".to_string(), + ]), + ), + ( + "veggies".to_string(), + AttributeValue::Ss(vec![ + "beans".to_string(), + "carrots".to_string(), + "peas".to_string(), + ]), + ), + ( + "work_type".to_string(), + AttributeValue::S("large".to_string()), + ), + ]); + + // 10. Create a new AWS SDK DynamoDb client using the DynamoDb Config above + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(encryption_config)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 11. Add the two items + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item1.clone())) + .send() + .await?; + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item2.clone())) + .send() + .await?; + + // 12. Test the first type of Set operation : + // Select records where the basket attribute holds a particular value + let expression_attribute_values = HashMap::from([( + ":value".to_string(), + AttributeValue::S("banana".to_string()), + )]); + + let scan_response = ddb + .scan() + .table_name(ddb_table_name) + .filter_expression("contains(basket, :value)") + .set_expression_attribute_values(Some(expression_attribute_values.clone())) + .send() + .await?; + + let attribute_values = scan_response.items.unwrap(); + // Validate only 1 item was returned: item1 + assert_eq!(attribute_values.len(), 1); + let returned_item = &attribute_values[0]; + // Validate the item has the expected attributes + assert_eq!(returned_item["work_id"], item1["work_id"]); + + // 13. Test the second type of Set operation : + // Select records where the basket attribute holds the fruit attribute + let scan_response = ddb + .scan() + .table_name(ddb_table_name) + .filter_expression("contains(basket, fruit)") + .send() + .await?; + + let attribute_values = scan_response.items.unwrap(); + // Validate only 1 item was returned: item1 + assert_eq!(attribute_values.len(), 1); + let returned_item = &attribute_values[0]; + // Validate the item has the expected attributes + assert_eq!(returned_item["work_id"], item1["work_id"]); + + // 14. Test the third type of Set operation : + // Select records where the fruit attribute exists in a particular set + let basket3 = vec![ + "boysenberry".to_string(), + "orange".to_string(), + "grape".to_string(), + ]; + let expression_attribute_values = + HashMap::from([(":value".to_string(), AttributeValue::Ss(basket3))]); + + let scan_response = ddb + .scan() + .table_name(ddb_table_name) + .filter_expression("contains(:value, fruit)") + .set_expression_attribute_values(Some(expression_attribute_values.clone())) + .send() + .await?; + + let attribute_values = scan_response.items.unwrap(); + // Validate only 1 item was returned: item1 + assert_eq!(attribute_values.len(), 1); + let returned_item = &attribute_values[0]; + // Validate the item has the expected attributes + assert_eq!(returned_item["work_id"], item2["work_id"]); + + // 15. Test a Shared search. Select records where the dessert attribute matches the fruit attribute + let scan_response = ddb + .scan() + .table_name(ddb_table_name) + .filter_expression("dessert = fruit") + .send() + .await?; + + let attribute_values = scan_response.items.unwrap(); + // Validate only 1 item was returned: item1 + assert_eq!(attribute_values.len(), 1); + let returned_item = &attribute_values[0]; + // Validate the item has the expected attributes + assert_eq!(returned_item["work_id"], item2["work_id"]); + + // 15. Test the AsSet attribute 'veggies' : + // Select records where the veggies attribute holds a particular value + let expression_attribute_values = + HashMap::from([(":value".to_string(), AttributeValue::S("peas".to_string()))]); + + let scan_response = ddb + .scan() + .table_name(ddb_table_name) + .filter_expression("contains(veggies, :value)") + .set_expression_attribute_values(Some(expression_attribute_values.clone())) + .send() + .await?; + + let attribute_values = scan_response.items.unwrap(); + // Validate only 1 item was returned: item1 + assert_eq!(attribute_values.len(), 1); + let returned_item = &attribute_values[0]; + // Validate the item has the expected attributes + assert_eq!(returned_item["work_id"], item2["work_id"]); + + // 16. Test the compound beacon 'work_unit' : + let expression_attribute_values = HashMap::from([( + ":value".to_string(), + AttributeValue::S("I-1.T-small".to_string()), + )]); + + let scan_response = ddb + .scan() + .table_name(ddb_table_name) + .filter_expression("work_unit = :value") + .set_expression_attribute_values(Some(expression_attribute_values.clone())) + .send() + .await?; + + let attribute_values = scan_response.items.unwrap(); + // Validate only 1 item was returned: item1 + assert_eq!(attribute_values.len(), 1); + let returned_item = &attribute_values[0]; + // Validate the item has the expected attributes + assert_eq!(returned_item["work_id"], item1["work_id"]); + + println!("beacon_styles_searchable_encryption successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/searchableencryption/complexexample/README.md b/releases/rust/db_esdk/examples/searchableencryption/complexexample/README.md new file mode 100644 index 000000000..bdbba2d7c --- /dev/null +++ b/releases/rust/db_esdk/examples/searchableencryption/complexexample/README.md @@ -0,0 +1,23 @@ +# ComplexSearchableEncryptionExample + +This example demonstrates complex queries +you can perform using beacons. +The example data used is for demonstrative purposes only, +and might not meet the distribution and correlation uniqueness +recommendations for beacons. +See our documentation for whether beacons are +right for your particular data set: +https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/searchable-encryption.html#are-beacons-right-for-me + +This example uses a more complex searchable encryption configuration than other examples. +This is intended to demonstrate how to set up a more complicated searchable encryption configuration. +This also walks through some example query expressions one can use to search their encrypted data. + +``` +. +├── complex_searchable_encryption.rs // Main entry point for example +├── beacon_config.rs // Sets up beacons and searchable encryption configuration +├── put_requests.rs // PUT requests added to the DDB table +├── query_requests.rs // QUERY requests executed on the DDB table +└── README.md // this file +``` diff --git a/releases/rust/db_esdk/examples/searchableencryption/complexexample/beacon_config.rs b/releases/rust/db_esdk/examples/searchableencryption/complexexample/beacon_config.rs new file mode 100644 index 000000000..5d248c425 --- /dev/null +++ b/releases/rust/db_esdk/examples/searchableencryption/complexexample/beacon_config.rs @@ -0,0 +1,554 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Constructor; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::ConstructorPart; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SignedPart; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; +use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use std::collections::HashMap; + +/* + * This file is used in an example to demonstrate complex queries + * that you can perform using beacons. + * The example data used is for demonstrative purposes only, + * and might not meet the distribution and correlation uniqueness + * recommendations for beacons. + * See our documentation for whether beacons are + * right for your particular data set: + * https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/searchable-encryption.html#are-beacons-right-for-me + * + * This file sets up all the searchable encryption configuration required to execute the examples from + * our workshop using the encryption client. + */ + +pub async fn setup_beacon_config( + ddb_table_name: &str, + branch_key_id: &str, + branch_key_wrapping_kms_key_arn: &str, + branch_key_ddb_table_name: &str, +) -> Result { + // 1. Create keystore and branch key + // These are the same constructions as in the Basic examples, which describe this in more detail. + 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(branch_key_ddb_table_name) + .logical_key_store_name(branch_key_ddb_table_name) + .kms_configuration(KmsConfiguration::KmsKeyArn( + branch_key_wrapping_kms_key_arn.to_string(), + )) + .build()?; + + let key_store = keystore_client::Client::from_conf(key_store_config)?; + + // 2. Create standard beacons + // For this example, we use a standard beacon length of 4. + // The BasicSearchableEncryptionExample gives a more thorough consideration of beacon length. + // For production applications, one should always exercise rigor when deciding beacon length, including + // examining population size and considering performance. + let standard_beacon_list = vec![ + StandardBeacon::builder() + .name("EmployeeID") + .length(4) + .build()?, + StandardBeacon::builder() + .name("TicketNumber") + .length(4) + .build()?, + StandardBeacon::builder() + .name("ProjectName") + .length(4) + .build()?, + StandardBeacon::builder() + .name("EmployeeEmail") + .length(4) + .build()?, + StandardBeacon::builder() + .name("CreatorEmail") + .length(4) + .build()?, + StandardBeacon::builder() + .name("ProjectStatus") + .length(4) + .build()?, + StandardBeacon::builder() + .name("OrganizerEmail") + .length(4) + .build()?, + StandardBeacon::builder() + .name("ManagerEmail") + .length(4) + .build()?, + StandardBeacon::builder() + .name("AssigneeEmail") + .length(4) + .build()?, + StandardBeacon::builder() + .name("Severity") + .length(4) + .build()?, + StandardBeacon::builder() + .name("City") + .loc("Location.City") + .length(4) + .build()?, + StandardBeacon::builder() + .name("Building") + .loc("Location.Building") + .length(4) + .build()?, + StandardBeacon::builder() + .name("Floor") + .loc("Location.Floor") + .length(4) + .build()?, + StandardBeacon::builder() + .name("Room") + .loc("Location.Room") + .length(4) + .build()?, + StandardBeacon::builder() + .name("Desk") + .loc("Location.Desk") + .length(4) + .build()?, + ]; + + // 3. Define encrypted parts + // Note that some of the prefixes are modified from the suggested prefixes in Demo.md. + // This is because all prefixes must be unique in a configuration. + // Encrypted parts are described in more detail in the CompoundBeaconSearchableEncryptionExample. + let encrypted_parts_list = vec![ + EncryptedPart::builder() + .name("EmployeeID") + .prefix("E-") + .build()?, + EncryptedPart::builder() + .name("TicketNumber") + .prefix("T-") + .build()?, + EncryptedPart::builder() + .name("ProjectName") + .prefix("P-") + .build()?, + EncryptedPart::builder() + .name("EmployeeEmail") + .prefix("EE-") + .build()?, + EncryptedPart::builder() + .name("CreatorEmail") + .prefix("CE-") + .build()?, + EncryptedPart::builder() + .name("OrganizerEmail") + .prefix("OE-") + .build()?, + EncryptedPart::builder() + .name("ManagerEmail") + .prefix("ME-") + .build()?, + EncryptedPart::builder() + .name("AssigneeEmail") + .prefix("AE-") + .build()?, + EncryptedPart::builder() + .name("ProjectStatus") + .prefix("PSts-") + .build()?, + EncryptedPart::builder().name("City").prefix("C-").build()?, + EncryptedPart::builder() + .name("Severity") + .prefix("S-") + .build()?, + EncryptedPart::builder() + .name("Building") + .prefix("B-") + .build()?, + EncryptedPart::builder() + .name("Floor") + .prefix("F-") + .build()?, + EncryptedPart::builder().name("Room").prefix("R-").build()?, + EncryptedPart::builder().name("Desk").prefix("D-").build()?, + ]; + + // 4. Define signed parts + // These are unencrypted attributes we would like to use in beacon queries. + // In this example, all of these represent dates or times. + // Keeping these attributes unencrypted allows us to use them in comparison-based queries. If a signed + // part is the first part in a compound beacon, then that part can be used in comparison for sorting. + let signed_parts_list = vec![ + SignedPart::builder() + .name("TicketModTime") + .prefix("M-") + .build()?, + SignedPart::builder() + .name("MeetingStart") + .prefix("MS-") + .build()?, + SignedPart::builder() + .name("TimeCardStart") + .prefix("TC-") + .build()?, + SignedPart::builder() + .name("ProjectStart") + .prefix("PS-") + .build()?, + ]; + + // 5. Create constructor parts + // Constructor parts are used to assemble constructors (constructors described more in next step). + // For each attribute that will be used in a constructor, there must be a corresponding constructor part. + // A constructor part must receive: + // - name: Name of a standard beacon + // - required: Whether this attribute must be present in the item to match a constructor + // In this example, we will define each constructor part once and re-use it across multiple constructors. + // The parts below are defined by working backwards from the constructors in "PK Constructors", + // "SK constructors", etc. sections in Demo.md. + let employee_id_constructor_part = ConstructorPart::builder() + .name("EmployeeID") + .required(true) + .build()?; + let ticket_number_constructor_part = ConstructorPart::builder() + .name("TicketNumber") + .required(true) + .build()?; + let project_name_constructor_part = ConstructorPart::builder() + .name("ProjectName") + .required(true) + .build()?; + let ticket_mod_time_constructor_part = ConstructorPart::builder() + .name("TicketModTime") + .required(true) + .build()?; + let meeting_start_constructor_part = ConstructorPart::builder() + .name("MeetingStart") + .required(true) + .build()?; + let timecard_start_constructor_part = ConstructorPart::builder() + .name("TimeCardStart") + .required(true) + .build()?; + let employee_email_constructor_part = ConstructorPart::builder() + .name("EmployeeEmail") + .required(true) + .build()?; + let creator_email_constructor_part = ConstructorPart::builder() + .name("CreatorEmail") + .required(true) + .build()?; + let project_status_constructor_part = ConstructorPart::builder() + .name("ProjectStatus") + .required(true) + .build()?; + let organizer_email_constructor_part = ConstructorPart::builder() + .name("OrganizerEmail") + .required(true) + .build()?; + let project_start_constructor_part = ConstructorPart::builder() + .name("ProjectStart") + .required(true) + .build()?; + let manager_email_constructor_part = ConstructorPart::builder() + .name("ManagerEmail") + .required(true) + .build()?; + let assignee_email_constructor_part = ConstructorPart::builder() + .name("AssigneeEmail") + .required(true) + .build()?; + let city_constructor_part = ConstructorPart::builder() + .name("City") + .required(true) + .build()?; + let severity_constructor_part = ConstructorPart::builder() + .name("Severity") + .required(true) + .build()?; + let building_constructor_part = ConstructorPart::builder() + .name("Building") + .required(true) + .build()?; + let floor_constructor_part = ConstructorPart::builder() + .name("Floor") + .required(true) + .build()?; + let room_constructor_part = ConstructorPart::builder() + .name("Room") + .required(true) + .build()?; + let desk_constructor_part = ConstructorPart::builder() + .name("Desk") + .required(true) + .build()?; + + // 6. Define constructors + // Constructors define how encrypted and signed parts are assembled into compound beacons. + // The constructors below are based off of the "PK Constructors", "SK constructors", etc. sections in Demo.md. + + // The employee ID constructor only requires an employee ID. + // If an item has an attribute with name "EmployeeID", it will match this constructor. + // If this is the first matching constructor in the constructor list (constructor list described more below), + // the compound beacon will use this constructor, and the compound beacon will be written as `E-X`. + + let employee_id_constructor = Constructor::builder() + .parts(vec![employee_id_constructor_part]) + .build()?; + let ticket_number_constructor = Constructor::builder() + .parts(vec![ticket_number_constructor_part]) + .build()?; + let project_name_constructor = Constructor::builder() + .parts(vec![project_name_constructor_part]) + .build()?; + let ticket_mod_time_constructor = Constructor::builder() + .parts(vec![ticket_mod_time_constructor_part]) + .build()?; + let building_constructor = Constructor::builder() + .parts(vec![building_constructor_part.clone()]) + .build()?; + + // This constructor requires all of "MeetingStart", "Location.Floor", and "Location.Room" attributes. + // If an item has all of these attributes, it will match this constructor. + // If this is the first matching constructor in the constructor list (constructor list described more below), + // the compound beacon will use this constructor, and the compound beacon will be written as `MS-X~F-Y~R-Z`. + // In a constructor with multiple constructor parts, the order the constructor parts are added to + // the constructor part list defines how the compound beacon is written. + // We can rearrange the beacon parts by changing the order the constructors were added to the list. + let meeting_start_floor_room_constructor = Constructor::builder() + .parts(vec![ + meeting_start_constructor_part, + floor_constructor_part.clone(), + room_constructor_part, + ]) + .build()?; + + let timecard_start_constructor = Constructor::builder() + .parts(vec![timecard_start_constructor_part.clone()]) + .build()?; + let timecard_start_employee_email_constructor = Constructor::builder() + .parts(vec![ + timecard_start_constructor_part, + employee_email_constructor_part.clone(), + ]) + .build()?; + let creator_email_constructor = Constructor::builder() + .parts(vec![creator_email_constructor_part]) + .build()?; + let project_status_constructor = Constructor::builder() + .parts(vec![project_status_constructor_part]) + .build()?; + let employee_email_constructor = Constructor::builder() + .parts(vec![employee_email_constructor_part]) + .build()?; + let organizer_email_constructor = Constructor::builder() + .parts(vec![organizer_email_constructor_part]) + .build()?; + let project_start_constructor = Constructor::builder() + .parts(vec![project_start_constructor_part]) + .build()?; + let manager_email_constructor = Constructor::builder() + .parts(vec![manager_email_constructor_part]) + .build()?; + let assignee_email_constructor = Constructor::builder() + .parts(vec![assignee_email_constructor_part]) + .build()?; + let city_constructor = Constructor::builder() + .parts(vec![city_constructor_part]) + .build()?; + let severity_constructor = Constructor::builder() + .parts(vec![severity_constructor_part]) + .build()?; + let building_floor_desk_constructor = Constructor::builder() + .parts(vec![ + building_constructor_part, + floor_constructor_part, + desk_constructor_part, + ]) + .build()?; + + // 7. Add constructors to the compound beacon constructor list in desired construction order + // In a compound beacon with multiple constructors, the order the constructors are added to + // the constructor list determines their priority. + // The first constructor added to a constructor list will be the first constructor that is executed. + // The client will evaluate constructors until one matches, and will use the first one that matches. + // If no constructors match, an attribute value is not written for that beacon. + // A general strategy is to add constructors with unique conditions at the beginning of the list, + // and add constructors with general conditions at the end of the list. This would allow a given + // item to trigger the constructor most specific to its attributes. + let pk0_constructor_list = vec![ + employee_id_constructor.clone(), + building_constructor, + ticket_number_constructor, + project_name_constructor.clone(), + ]; + let sk0_constructor_list = vec![ + ticket_mod_time_constructor.clone(), + meeting_start_floor_room_constructor.clone(), + timecard_start_employee_email_constructor, + project_name_constructor, + employee_id_constructor.clone(), + ]; + let pk1_constructor_list = vec![ + creator_email_constructor, + employee_email_constructor, + project_status_constructor, + organizer_email_constructor, + ]; + let sk1_constructor_list = vec![ + meeting_start_floor_room_constructor, + timecard_start_constructor, + ticket_mod_time_constructor.clone(), + project_start_constructor, + employee_id_constructor, + ]; + let pk2_constructor_list = vec![manager_email_constructor, assignee_email_constructor]; + let pk3_constructor_list = vec![city_constructor, severity_constructor]; + let sk3_constructor_list = vec![building_floor_desk_constructor, ticket_mod_time_constructor]; + + // 8. Define compound beacons + // Compound beacon construction is defined in more detail in CompoundBeaconSearchableEncryptionExample. + // Note that the split character must be a character that is not used in any attribute value. + let compound_beacon_list = vec![ + CompoundBeacon::builder() + .name("PK") + .split("~") + .constructors(pk0_constructor_list) + .build()?, + CompoundBeacon::builder() + .name("SK") + .split("~") + .constructors(sk0_constructor_list) + .build()?, + CompoundBeacon::builder() + .name("PK1") + .split("~") + .constructors(pk1_constructor_list) + .build()?, + CompoundBeacon::builder() + .name("SK1") + .split("~") + .constructors(sk1_constructor_list) + .build()?, + CompoundBeacon::builder() + .name("PK2") + .split("~") + .constructors(pk2_constructor_list) + .build()?, + CompoundBeacon::builder() + .name("PK3") + .split("~") + .constructors(pk3_constructor_list) + .build()?, + CompoundBeacon::builder() + .name("SK3") + .split("~") + .constructors(sk3_constructor_list) + .build()?, + ]; + + // 9. Create BeaconVersion + let beacon_versions = BeaconVersion::builder() + .standard_beacons(standard_beacon_list) + .compound_beacons(compound_beacon_list) + .encrypted_parts(encrypted_parts_list) + .signed_parts(signed_parts_list) + .version(1) + .key_store(key_store.clone()) + .key_source(BeaconKeySource::Single( + SingleKeyStore::builder() + .key_id(branch_key_id) + .cache_ttl(6000) + .build()?, + )) + .build()?; + let beacon_versions = vec![beacon_versions]; + + // 10. Create a Hierarchical Keyring + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + let kms_keyring = mpl + .create_aws_kms_hierarchical_keyring() + .branch_key_id(branch_key_id) + .key_store(key_store) + .ttl_seconds(600) + .send() + .await?; + + // 11. Define crypto actions + let attribute_actions_on_encrypt = HashMap::from([ + // Our partition key must be configured as SIGN_ONLY + ("partition_key".to_string(), CryptoAction::SignOnly), + // Attributes used in beacons must be configured as ENCRYPT_AND_SIGN + ("EmployeeID".to_string(), CryptoAction::EncryptAndSign), + ("TicketNumber".to_string(), CryptoAction::EncryptAndSign), + ("ProjectName".to_string(), CryptoAction::EncryptAndSign), + ("EmployeeName".to_string(), CryptoAction::EncryptAndSign), + ("EmployeeEmail".to_string(), CryptoAction::EncryptAndSign), + ("CreatorEmail".to_string(), CryptoAction::EncryptAndSign), + ("ProjectStatus".to_string(), CryptoAction::EncryptAndSign), + ("OrganizerEmail".to_string(), CryptoAction::EncryptAndSign), + ("ManagerEmail".to_string(), CryptoAction::EncryptAndSign), + ("AssigneeEmail".to_string(), CryptoAction::EncryptAndSign), + ("City".to_string(), CryptoAction::EncryptAndSign), + ("Severity".to_string(), CryptoAction::EncryptAndSign), + ("Location".to_string(), CryptoAction::EncryptAndSign), + // These are not beaconized attributes, but are sensitive data that must be encrypted + ("Attendees".to_string(), CryptoAction::EncryptAndSign), + ("Subject".to_string(), CryptoAction::EncryptAndSign), + // Signed parts and unencrypted attributes can be configured as SIGN_ONLY or DO_NOTHING + // For this example, we will set these to SIGN_ONLY to ensure authenticity + ("TicketModTime".to_string(), CryptoAction::SignOnly), + ("MeetingStart".to_string(), CryptoAction::SignOnly), + ("TimeCardStart".to_string(), CryptoAction::SignOnly), + ("EmployeeTitle".to_string(), CryptoAction::SignOnly), + ("Description".to_string(), CryptoAction::SignOnly), + ("ProjectTarget".to_string(), CryptoAction::SignOnly), + ("Hours".to_string(), CryptoAction::SignOnly), + ("Role".to_string(), CryptoAction::SignOnly), + ("Message".to_string(), CryptoAction::SignOnly), + ("ProjectStart".to_string(), CryptoAction::SignOnly), + ("Duration".to_string(), CryptoAction::SignOnly), + ]); + + // 12. Set up table config + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("partition_key") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(kms_keyring) + .search( + SearchConfig::builder() + .write_version(1) + .versions(beacon_versions) + .build()?, + ) + .build()?; + + let table_configs = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 13. Create a new AWS SDK DynamoDb client using the config above + let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(table_configs)) + .build(); + + Ok(aws_sdk_dynamodb::Client::from_conf(dynamo_config)) +} diff --git a/releases/rust/db_esdk/examples/searchableencryption/complexexample/complex_searchable_encryption.rs b/releases/rust/db_esdk/examples/searchableencryption/complexexample/complex_searchable_encryption.rs new file mode 100644 index 000000000..2f907bb73 --- /dev/null +++ b/releases/rust/db_esdk/examples/searchableencryption/complexexample/complex_searchable_encryption.rs @@ -0,0 +1,32 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; + +/* + * This file is used in an example to demonstrate complex queries + * you can perform using beacons. + * The example data used is for demonstrative purposes only, + * and might not meet the distribution and correlation uniqueness + * recommendations for beacons. + * See our documentation for whether beacons are + * right for your particular data set: + * https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/searchable-encryption.html#are-beacons-right-for-me + */ +pub async fn run_example(branch_key_id: &str) -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::TEST_COMPLEX_DDB_TABLE_NAME; + let branch_key_wrapping_kms_key_arn = test_utils::TEST_BRANCH_KEY_WRAPPING_KMS_KEY_ARN; + let branch_key_ddb_table_name = test_utils::TEST_BRANCH_KEYSTORE_DDB_TABLE_NAME; + + let mut ddb = super::beacon_config::setup_beacon_config( + ddb_table_name, + branch_key_id, + branch_key_wrapping_kms_key_arn, + branch_key_ddb_table_name, + ) + .await?; + super::put_requests::put_all_items_to_table(ddb_table_name, &mut ddb).await?; + super::query_requests::run_queries(ddb_table_name, &mut ddb).await?; + println!("complex searchable encryption example successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/searchableencryption/complexexample/mod.rs b/releases/rust/db_esdk/examples/searchableencryption/complexexample/mod.rs new file mode 100644 index 000000000..86dbf672e --- /dev/null +++ b/releases/rust/db_esdk/examples/searchableencryption/complexexample/mod.rs @@ -0,0 +1,7 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod beacon_config; +pub mod complex_searchable_encryption; +pub mod put_requests; +pub mod query_requests; diff --git a/releases/rust/db_esdk/examples/searchableencryption/complexexample/put_requests.rs b/releases/rust/db_esdk/examples/searchableencryption/complexexample/put_requests.rs new file mode 100644 index 000000000..23eaa7113 --- /dev/null +++ b/releases/rust/db_esdk/examples/searchableencryption/complexexample/put_requests.rs @@ -0,0 +1,453 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +/* + * This file is used in an example to demonstrate complex queries + * you can perform using beacons. + * The example data used is for demonstrative purposes only, + * and might not meet the distribution and correlation uniqueness + * recommendations for beacons. + * See our documentation for whether beacons are + * right for your particular data set: + * https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/searchable-encryption.html#are-beacons-right-for-me + * + * This class implements PutItemAsync calls to populate a DDB table with items from our workshop. + * By providing a DynamoDbClient that is configured to use searchable encryption, + * this class will encrypt the data client side and add beacon attributes to the items. + * This only implements a single item of each of the 6 record types from Demo.md. Adding the remaining + * items would extend the test and example coverage. + */ + +pub async fn put_all_items_to_table( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + put_all_meeting_items(ddb_table_name, ddb).await?; + put_all_employee_items(ddb_table_name, ddb).await?; + put_all_project_items(ddb_table_name, ddb).await?; + put_all_reservation_items(ddb_table_name, ddb).await?; + put_all_ticket_items(ddb_table_name, ddb).await?; + put_all_timecard_items(ddb_table_name, ddb).await?; + Ok(()) +} + +fn ss(s: &str) -> AttributeValue { + AttributeValue::S(s.to_string()) +} +fn entry(name: &str, value: &str) -> (String, AttributeValue) { + (name.to_string(), ss(value)) +} + +async fn put_item( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, + item: HashMap, +) -> Result<(), crate::BoxError> { + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item)) + .send() + .await?; + Ok(()) +} + +// emeeting.json +async fn put_all_meeting_items( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + let meeting1_attendee_list = vec![ss("able@gmail.com"), ss("zorro@gmail.com")]; + let meeting1_location = HashMap::from([entry("Floor", "12"), entry("Room", "403")]); + let meeting1 = HashMap::from([ + entry("partition_key", "meeting1"), + entry("EmployeeID", "emp_001"), + entry("EmployeeEmail", "able@gmail.com"), + entry("MeetingStart", "2022-07-04T13:00"), + entry("Duration", "30"), + entry("Subject", "Scan Beacons"), + ("Location".to_string(), AttributeValue::M(meeting1_location)), + ( + "Attendees".to_string(), + AttributeValue::L(meeting1_attendee_list), + ), + ]); + put_item(ddb_table_name, ddb, meeting1).await?; + + let meeting2_attendee_list = vec![ss("barney@gmail.com"), ss("zorro@gmail.com")]; + let meeting2_location = HashMap::from([entry("Floor", "12"), entry("Room", "403")]); + let meeting2 = HashMap::from([ + entry("partition_key", "meeting2"), + entry("EmployeeID", "emp_002"), + entry("EmployeeEmail", "barney@gmail.com"), + entry("MeetingStart", "2022-07-04T13:00"), + entry("Duration", "30"), + entry("Subject", "Scan Beacons"), + ("Location".to_string(), AttributeValue::M(meeting2_location)), + ( + "Attendees".to_string(), + AttributeValue::L(meeting2_attendee_list), + ), + ]); + put_item(ddb_table_name, ddb, meeting2).await?; + + let meeting3_attendee_list = vec![ss("charlie@gmail.com"), ss("zorro@gmail.com")]; + let meeting3_location = HashMap::from([entry("Floor", "12"), entry("Room", "403")]); + let meeting3 = HashMap::from([ + entry("partition_key", "meeting3"), + entry("EmployeeID", "emp_003"), + entry("EmployeeEmail", "charlie@gmail.com"), + entry("MeetingStart", "2022-07-04T13:00"), + entry("Duration", "30"), + entry("Subject", "Scan Beacons"), + ("Location".to_string(), AttributeValue::M(meeting3_location)), + ( + "Attendees".to_string(), + AttributeValue::L(meeting3_attendee_list), + ), + ]); + put_item(ddb_table_name, ddb, meeting3).await?; + + let meeting4_attendee_list = vec![ss("david@gmail.com"), ss("zorro@gmail.com")]; + let meeting4_location = HashMap::from([entry("Floor", "12"), entry("Room", "403")]); + let meeting4 = HashMap::from([ + entry("partition_key", "meeting4"), + entry("EmployeeID", "emp_004"), + entry("EmployeeEmail", "david@gmail.com"), + entry("MeetingStart", "2022-07-04T13:00"), + entry("Duration", "30"), + entry("Subject", "Scan Beacons"), + ("Location".to_string(), AttributeValue::M(meeting4_location)), + ( + "Attendees".to_string(), + AttributeValue::L(meeting4_attendee_list), + ), + ]); + put_item(ddb_table_name, ddb, meeting4).await?; + + let meeting5_attendee_list = vec![ss("barney@gmail.com"), ss("zorro@gmail.com")]; + let meeting5_location = HashMap::from([entry("Floor", "12"), entry("Room", "407")]); + let meeting5 = HashMap::from([ + entry("partition_key", "meeting5"), + entry("EmployeeID", "emp_002"), + entry("EmployeeEmail", "barney@gmail.com"), + entry("MeetingStart", "2022-07-04T14:00"), + entry("Duration", "30"), + entry("Subject", "DB ESDK"), + ("Location".to_string(), AttributeValue::M(meeting5_location)), + ( + "Attendees".to_string(), + AttributeValue::L(meeting5_attendee_list), + ), + ]); + put_item(ddb_table_name, ddb, meeting5).await?; + + let meeting6_attendee_list = vec![ss("charlie@gmail.com"), ss("zorro@gmail.com")]; + let meeting6_location = HashMap::from([entry("Floor", "12"), entry("Room", "407")]); + let meeting6 = HashMap::from([ + entry("partition_key", "meeting6"), + entry("EmployeeID", "emp_003"), + entry("EmployeeEmail", "charlie@gmail.com"), + entry("MeetingStart", "2022-07-04T14:00"), + entry("Duration", "30"), + entry("Subject", "DB ESDK"), + ("Location".to_string(), AttributeValue::M(meeting6_location)), + ( + "Attendees".to_string(), + AttributeValue::L(meeting6_attendee_list), + ), + ]); + put_item(ddb_table_name, ddb, meeting6).await?; + Ok(()) +} + +// employee.json +async fn put_all_employee_items( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + let employee1_location = HashMap::from([ + entry("Building", "44"), + entry("Floor", "12"), + entry("Desk", "3"), + entry("City", "Seattle"), + ]); + let employee1 = HashMap::from([ + entry("partition_key", "employee1"), + entry("EmployeeID", "emp_001"), + entry("EmployeeEmail", "able@gmail.com"), + entry("ManagerEmail", "zorro@gmail.com"), + entry("EmployeeName", "Able Jones"), + entry("EmployeeTitle", "SDE9"), + ( + "Location".to_string(), + AttributeValue::M(employee1_location), + ), + ]); + put_item(ddb_table_name, ddb, employee1).await?; + + let employee2_location = HashMap::from([ + entry("Building", "44"), + entry("Floor", "12"), + entry("Desk", "4"), + entry("City", "Seattle"), + ]); + let employee2 = HashMap::from([ + entry("partition_key", "employee2"), + entry("EmployeeID", "emp_002"), + entry("EmployeeEmail", "barney@gmail.com"), + entry("ManagerEmail", "zorro@gmail.com"), + entry("EmployeeName", "Barney Jones"), + entry("EmployeeTitle", "SDE8"), + ( + "Location".to_string(), + AttributeValue::M(employee2_location), + ), + ]); + put_item(ddb_table_name, ddb, employee2).await?; + + let employee3_location = HashMap::from([ + entry("Building", "44"), + entry("Floor", "4"), + entry("Desk", "5"), + entry("City", "Seattle"), + ]); + let employee3 = HashMap::from([ + entry("partition_key", "employee3"), + entry("EmployeeID", "emp_003"), + entry("EmployeeEmail", "charlie@gmail.com"), + entry("ManagerEmail", "zorro@gmail.com"), + entry("EmployeeName", "Charlie Jones"), + entry("EmployeeTitle", "SDE7"), + ( + "Location".to_string(), + AttributeValue::M(employee3_location), + ), + ]); + put_item(ddb_table_name, ddb, employee3).await?; + + let employee4_location = HashMap::from([ + entry("Building", "22"), + entry("Floor", "1"), + entry("Desk", "3"), + entry("City", "NYC"), + ]); + let employee4 = HashMap::from([ + entry("partition_key", "employee4"), + entry("EmployeeID", "emp_004"), + entry("EmployeeEmail", "david@gmail.com"), + entry("ManagerEmail", "zorro@gmail.com"), + entry("EmployeeName", "David Jones"), + entry("EmployeeTitle", "SDE6"), + ( + "Location".to_string(), + AttributeValue::M(employee4_location), + ), + ]); + put_item(ddb_table_name, ddb, employee4).await?; + Ok(()) +} + +// project.json +async fn put_all_project_items( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + let project1 = HashMap::from([ + entry("partition_key", "project1"), + entry("ProjectName", "project_001"), + entry("ProjectStatus", "Pending"), + entry("ProjectStart", "2022-11-01"), + entry("Description", "Turbo Crypto"), + entry("ProjectTarget", "2024-01-01"), + ]); + put_item(ddb_table_name, ddb, project1).await?; + + let project2 = HashMap::from([ + entry("partition_key", "project2"), + entry("ProjectName", "project_002"), + entry("ProjectStatus", "Active"), + entry("ProjectStart", "2022-07-04"), + entry("Description", "Scan Beacons"), + entry("ProjectTarget", "2024-01-01"), + ]); + put_item(ddb_table_name, ddb, project2).await?; + + let project3 = HashMap::from([ + entry("partition_key", "project3"), + entry("ProjectName", "project_003"), + entry("ProjectStatus", "Active"), + entry("ProjectStart", "2022-08-05"), + entry("Description", "DB ESDK"), + entry("ProjectTarget", "2023-02-27"), + ]); + put_item(ddb_table_name, ddb, project3).await?; + + let project4 = HashMap::from([ + entry("partition_key", "project4"), + entry("ProjectName", "project_004"), + entry("ProjectStatus", "Done"), + entry("ProjectStart", "2020-03-03"), + entry("Description", "S3EC"), + entry("ProjectTarget", "2021-09-05"), + ]); + put_item(ddb_table_name, ddb, project4).await?; + Ok(()) +} + +// reservation.json +async fn put_all_reservation_items( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + let reservation1_attendee_list = vec![ss("able@gmail.com"), ss("barney@gmail.com")]; + let reservation1_location = HashMap::from([ + entry("Building", "SEA33"), + entry("Floor", "12"), + entry("Room", "403"), + ]); + let reservation1 = HashMap::from([ + entry("partition_key", "reservation1"), + entry("MeetingStart", "2022-07-04T13:00"), + entry("OrganizerEmail", "able@gmail.com"), + entry("Duration", "30"), + entry("Subject", "Scan beacons"), + ( + "Location".to_string(), + AttributeValue::M(reservation1_location), + ), + ( + "Attendees".to_string(), + AttributeValue::L(reservation1_attendee_list), + ), + ]); + put_item(ddb_table_name, ddb, reservation1).await?; + + let reservation2_attendee_list = vec![ss("able@gmail.com"), ss("barney@gmail.com")]; + let reservation2_location = HashMap::from([ + entry("Building", "SEA33"), + entry("Floor", "12"), + entry("Room", "407"), + ]); + let reservation2 = HashMap::from([ + entry("partition_key", "reservation2"), + entry("MeetingStart", "2022-07-04T14:00"), + entry("OrganizerEmail", "barney@gmail.com"), + entry("Duration", "30"), + entry("Subject", "DB ESDK"), + ( + "Location".to_string(), + AttributeValue::M(reservation2_location), + ), + ( + "Attendees".to_string(), + AttributeValue::L(reservation2_attendee_list), + ), + ]); + put_item(ddb_table_name, ddb, reservation2).await?; + Ok(()) +} + +// ticket.json +async fn put_all_ticket_items( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + let ticket1 = HashMap::from([ + entry("partition_key", "ticket1"), + entry("TicketNumber", "ticket_001"), + entry("TicketModTime", "2022-10-07T14:32:25"), + entry("CreatorEmail", "zorro@gmail.com"), + entry("AssigneeEmail", "able@gmail.com"), + entry("Severity", "3"), + entry("Subject", "Bad bug"), + entry("Message", "This bug looks pretty bad"), + ]); + put_item(ddb_table_name, ddb, ticket1).await?; + + let ticket2 = HashMap::from([ + entry("partition_key", "ticket2"), + entry("TicketNumber", "ticket_001"), + entry("TicketModTime", "2022-10-07T14:32:25"), + entry("CreatorEmail", "able@gmail.com"), + entry("AssigneeEmail", "charlie@gmail.com"), + entry("Severity", "3"), + entry("Subject", "Bad bug"), + entry("Message", "Charlie should handle this"), + ]); + put_item(ddb_table_name, ddb, ticket2).await?; + + let ticket3 = HashMap::from([ + entry("partition_key", "ticket3"), + entry("TicketNumber", "ticket_002"), + entry("TicketModTime", "2022-10-06T14:32:25"), + entry("CreatorEmail", "zorro@gmail.com"), + entry("AssigneeEmail", "charlie@gmail.com"), + entry("Severity", "3"), + entry("Subject", "Easy bug"), + entry("Message", "This seems simple enough"), + ]); + put_item(ddb_table_name, ddb, ticket3).await?; + + let ticket4 = HashMap::from([ + entry("partition_key", "ticket4"), + entry("TicketNumber", "ticket_002"), + entry("TicketModTime", "2022-10-08T14:32:25"), + entry("CreatorEmail", "charlie@gmail.com"), + entry("AssigneeEmail", "able@gmail.com"), + entry("Severity", "3"), + entry("Subject", "Easy bug"), + entry("Message", "that's in able's code"), + ]); + put_item(ddb_table_name, ddb, ticket4).await?; + Ok(()) +} + +// timecard.json +async fn put_all_timecard_items( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + let timecard1 = HashMap::from([ + entry("partition_key", "timecard1"), + entry("ProjectName", "project_002"), + entry("TimeCardStart", "2022-09-12"), + entry("EmployeeEmail", "able@gmail.com"), + entry("Hours", "40"), + entry("Role", "SDE3"), + ]); + put_item(ddb_table_name, ddb, timecard1).await?; + + let timecard2 = HashMap::from([ + entry("partition_key", "timecard2"), + entry("ProjectName", "project_002"), + entry("TimeCardStart", "2022-09-12"), + entry("EmployeeEmail", "barney@gmail.com"), + entry("Hours", "20"), + entry("Role", "PM"), + ]); + put_item(ddb_table_name, ddb, timecard2).await?; + + let timecard3 = HashMap::from([ + entry("partition_key", "timecard3"), + entry("ProjectName", "project_003"), + entry("TimeCardStart", "2022-09-12"), + entry("EmployeeEmail", "charlie@gmail.com"), + entry("Hours", "40"), + entry("Role", "SDE3"), + ]); + put_item(ddb_table_name, ddb, timecard3).await?; + + let timecard4 = HashMap::from([ + entry("partition_key", "timecard4"), + entry("ProjectName", "project_003"), + entry("TimeCardStart", "2022-09-12"), + entry("EmployeeEmail", "barney@gmail.com"), + entry("Hours", "20"), + entry("Role", "PM"), + ]); + put_item(ddb_table_name, ddb, timecard4).await?; + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/searchableencryption/complexexample/query_requests.rs b/releases/rust/db_esdk/examples/searchableencryption/complexexample/query_requests.rs new file mode 100644 index 000000000..f64ae0e33 --- /dev/null +++ b/releases/rust/db_esdk/examples/searchableencryption/complexexample/query_requests.rs @@ -0,0 +1,879 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +/* + * This file is used in an example to demonstrate complex queries + * you can perform using beacons. + * The example data used is for demonstrative purposes only, + * and might not meet the distribution and correlation uniqueness + * recommendations for beacons. + * See our documentation for whether beacons are + * right for your particular data set: + * https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/searchable-encryption.html#are-beacons-right-for-me + * + * This class implements query access patterns from our workshop. + * The queries in this file are more complicated than in other searchable encryption examples, + * and should demonstrate how one can structure queries on beacons in a broader variety of applications. + */ + +pub async fn run_queries( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + run_query1(ddb_table_name, ddb).await?; + run_query2(ddb_table_name, ddb).await?; + run_query3(ddb_table_name, ddb).await?; + run_query4(ddb_table_name, ddb).await?; + run_query5(ddb_table_name, ddb).await?; + run_query6(ddb_table_name, ddb).await?; + run_query7(ddb_table_name, ddb).await?; + run_query8(ddb_table_name, ddb).await?; + run_query9(ddb_table_name, ddb).await?; + run_query10(ddb_table_name, ddb).await?; + run_query11(ddb_table_name, ddb).await?; + run_query12(ddb_table_name, ddb).await?; + run_query13(ddb_table_name, ddb).await?; + run_query14(ddb_table_name, ddb).await?; + run_query15(ddb_table_name, ddb).await?; + run_query16(ddb_table_name, ddb).await?; + run_query17(ddb_table_name, ddb).await?; + run_query18(ddb_table_name, ddb).await?; + run_query19(ddb_table_name, ddb).await?; + run_query20(ddb_table_name, ddb).await?; + run_query21(ddb_table_name, ddb).await?; + run_query22(ddb_table_name, ddb).await?; + run_query23(ddb_table_name, ddb).await?; + Ok(()) +} + +fn ss(s: &str) -> AttributeValue { + AttributeValue::S(s.to_string()) +} + +fn entry(name: &str, value: &str) -> (String, AttributeValue) { + (name.to_string(), ss(value)) +} + +async fn run_query1( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 1: Get meetings by date and email + // Key condition: PK1=email SK1 between(date1, date2) + // Filter condition: duration > 0 + + let query1_names = HashMap::from([ + ("#duration".to_string(), "Duration".to_string()), // Duration is a reserved word + ]); + + let query1_values = HashMap::from([ + entry(":e", "EE-able@gmail.com"), + entry(":date1", "MS-2022-07-02"), + entry(":date2", "MS-2022-07-08"), + entry(":zero", "0"), + ]); + + let query1_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-1") + .set_expression_attribute_names(Some(query1_names)) + .set_expression_attribute_values(Some(query1_values)) + .key_condition_expression("PK1 = :e AND SK1 BETWEEN :date1 AND :date2") + .filter_expression("#duration > :zero") + .send() + .await?; + + // Assert 1 item was returned + let items = query1_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("meeting1")); + assert_eq!(items[0]["Subject"], ss("Scan Beacons")); + assert_eq!(items[0]["Location"].as_m().unwrap()["Floor"], ss("12")); + assert!(items[0]["Attendees"] + .as_l() + .unwrap() + .contains(&ss("zorro@gmail.com"))); + Ok(()) +} + +async fn run_query2( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 2: Get meetings by date and employeeID + // Key condition: PK=employeeID SK between(date1, date2) + // Filter condition: duration > 0 + + let query2_names = HashMap::from([ + ("#duration".to_string(), "Duration".to_string()), // Duration is a reserved word + ]); + + let query2_values = HashMap::from([ + entry(":employee", "E-emp_001"), + entry(":date1", "MS-2022-07-02"), + entry(":date2", "MS-2022-07-08"), + entry(":zero", "0"), + ]); + + let query2_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-0") + .set_expression_attribute_names(Some(query2_names)) + .set_expression_attribute_values(Some(query2_values)) + .key_condition_expression("PK = :employee AND SK BETWEEN :date1 AND :date2") + .filter_expression("#duration > :zero") + .send() + .await?; + + // Assert 1 item was returned + let items = query2_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("meeting1")); + assert_eq!(items[0]["Subject"], ss("Scan Beacons")); + assert_eq!(items[0]["Location"].as_m().unwrap()["Floor"], ss("12")); + assert!(items[0]["Attendees"] + .as_l() + .unwrap() + .contains(&ss("zorro@gmail.com"))); + Ok(()) +} + +async fn run_query3( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 3: Get meetings by date and building/floor/room + // Key condition: PK=employeeID SK between(date1, date2) + // Filter condition: SK contains building.floor.room (see NOTE) + // NOTE: This query is modified from Demo.md. + // Demo.md calls for a filter condition "SK contains building.floor.room" + // However, one cannot use primary keys (partition nor sort) in a filter expression. + // Instead, this query filters on the individual beacon attributes: building, floor, and room. + + let query3_values = HashMap::from([ + entry(":buildingbeacon", "B-SEA33"), + entry(":building", "SEA33"), + entry(":floor", "12"), + entry(":room", "403"), + entry(":date1", "MS-2022-07-02"), + entry(":date2", "MS-2022-07-08"), + ]); + + let query3_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-0") + .set_expression_attribute_values(Some(query3_values)) + .key_condition_expression("PK = :buildingbeacon AND SK BETWEEN :date1 AND :date2") + .filter_expression("Building = :building AND Floor = :floor AND Room = :room") + .send() + .await?; + + // Assert 1 item was returned + let items = query3_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("reservation1")); + assert_eq!(items[0]["Subject"], ss("Scan beacons")); + assert_eq!( + items[0]["Location"].as_m().unwrap()["Building"], + ss("SEA33") + ); + assert!(items[0]["Attendees"] + .as_l() + .unwrap() + .contains(&ss("barney@gmail.com"))); + Ok(()) +} + +async fn run_query4( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 4: Get employee data by email + // Key condition: PK1=email SK1=employee ID + + let query4_values = HashMap::from([ + entry(":email", "EE-able@gmail.com"), + entry(":employee", "E-emp_001"), + ]); + + let query4_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-1") + .set_expression_attribute_values(Some(query4_values)) + .key_condition_expression("PK1 = :email AND SK1 = :employee") + .send() + .await?; + + // Assert 1 item was returned + let items = query4_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("employee1")); + assert_eq!(items[0]["EmployeeID"], ss("emp_001")); + assert_eq!(items[0]["Location"].as_m().unwrap()["Desk"], ss("3")); + Ok(()) +} + +async fn run_query5( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 5: Get meetings by email + // Key condition: PK1=email SK1 > 30 days ago + + let query5_values = HashMap::from([ + entry(":email", "EE-able@gmail.com"), + entry(":thirtydaysago", "MS-2023-03-20"), + entry(":prefix", "MS-"), + ]); + + let query5_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-1") + .set_expression_attribute_values(Some(query5_values)) + .key_condition_expression("PK1 = :email AND SK1 BETWEEN :prefix AND :thirtydaysago") + .send() + .await?; + + // Assert 1 item was returned + let items = query5_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("meeting1")); + assert_eq!(items[0]["Subject"], ss("Scan Beacons")); + assert_eq!(items[0]["Location"].as_m().unwrap()["Floor"], ss("12")); + assert!(items[0]["Attendees"] + .as_l() + .unwrap() + .contains(&ss("zorro@gmail.com"))); + Ok(()) +} + +async fn run_query6( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 6: Get tickets by email + // Key condition: PK1=email SK1 > 30 days ago + + let query6_values = HashMap::from([ + entry(":creatoremail", "CE-zorro@gmail.com"), + entry(":thirtydaysago", "MS-2023-03-20"), + ]); + + let query6_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-1") + .set_expression_attribute_values(Some(query6_values)) + .key_condition_expression("PK1 = :creatoremail AND SK1 < :thirtydaysago") + .send() + .await?; + + // Assert 2 items were returned + let items = query6_response.items.unwrap(); + assert_eq!(items.len(), 2); + + // Expected to be `ticket1` and `ticket3` + assert!( + ((items[0]["partition_key"] == ss("ticket1")) + && (items[1]["partition_key"] == ss("ticket3"))) + || ((items[0]["partition_key"] == ss("ticket3")) + && (items[1]["partition_key"] == ss("ticket1"))) + ); + Ok(()) +} + +async fn run_query7( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 7: Get reservations by email + // Key condition: PK1=organizeremail SK1 > 30 days ago + + let query7_values = HashMap::from([ + entry(":organizeremail", "OE-able@gmail.com"), + entry(":thirtydaysago", "MS-2023-03-20"), + ]); + + let query7_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-1") + .set_expression_attribute_values(Some(query7_values)) + .key_condition_expression("PK1 = :organizeremail AND SK1 < :thirtydaysago") + .send() + .await?; + + // Assert 1 item was returned + let items = query7_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("reservation1")); + assert_eq!(items[0]["Subject"], ss("Scan beacons")); + assert_eq!(items[0]["Location"].as_m().unwrap()["Floor"], ss("12")); + assert!(items[0]["Attendees"] + .as_l() + .unwrap() + .contains(&ss("barney@gmail.com"))); + Ok(()) +} + +async fn run_query8( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 8: Get time cards by email + // Key condition: PK1=employeeemail SK1 > 30 days ago + + let query8_values = HashMap::from([ + entry(":email", "EE-able@gmail.com"), + entry(":prefix", "TC-"), + entry(":thirtydaysago", "TC-2023-03-20"), + ]); + + let query8_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-1") + .set_expression_attribute_values(Some(query8_values)) + .key_condition_expression("PK1 = :email AND SK1 BETWEEN :prefix AND :thirtydaysago") + .send() + .await?; + + // Assert 1 item was returned + let items = query8_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("timecard1")); + assert_eq!(items[0]["ProjectName"], ss("project_002")); + Ok(()) +} + +async fn run_query9( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 9: Get employee info by employee ID + // Key condition: PK1=employeeID SK starts with "E-" + + let query9_values = HashMap::from([entry(":employee", "E-emp_001"), entry(":prefix", "E-")]); + + let query9_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-0") + .set_expression_attribute_values(Some(query9_values)) + .key_condition_expression("PK = :employee AND begins_with(SK, :prefix)") + .send() + .await?; + + // Assert 1 item was returned + let items = query9_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("employee1")); + assert_eq!(items[0]["EmployeeID"], ss("emp_001")); + Ok(()) +} + +async fn run_query10( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 10: Get employee info by email + // Key condition: PK1=email + // Filter condition: SK starts with "E-" + + let query10_values = + HashMap::from([entry(":email", "EE-able@gmail.com"), entry(":prefix", "E-")]); + + let query10_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-1") + .set_expression_attribute_values(Some(query10_values)) + .key_condition_expression("PK1 = :email AND begins_with(SK1, :prefix)") + .send() + .await?; + + // Assert 1 item was returned + let items = query10_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("employee1")); + assert_eq!(items[0]["EmployeeID"], ss("emp_001")); + Ok(()) +} + +async fn run_query11( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 11: Get ticket history by ticket number + // Key condition: PK=TicketNumber + + let query11_values = HashMap::from([entry(":ticket", "T-ticket_001")]); + + let query11_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-0") + .set_expression_attribute_values(Some(query11_values)) + .key_condition_expression("PK = :ticket") + .send() + .await?; + + // Assert 2 items were returned + let items = query11_response.items.unwrap(); + assert_eq!(items.len(), 2); + + // Expected to be `ticket1` and `ticket3` + assert!( + ((items[0]["partition_key"] == ss("ticket1")) + && (items[1]["partition_key"] == ss("ticket2"))) + || ((items[0]["partition_key"] == ss("ticket2")) + && (items[1]["partition_key"] == ss("ticket1"))) + ); + Ok(()) +} + +async fn run_query12( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 12: Get Ticket History by employee email + // Key condition: PK1=CreatorEmail + // Filter condition: PK=TicketNumber + + let query12_values = HashMap::from([ + entry(":email", "CE-zorro@gmail.com"), + entry(":ticket", "T-ticket_001"), + ]); + + let query12_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-1") + .set_expression_attribute_values(Some(query12_values)) + .key_condition_expression("PK1 = :email") + .filter_expression("PK = :ticket") + .send() + .await?; + + // Assert 1 item was returned + let items = query12_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("ticket1")); + assert_eq!(items[0]["TicketNumber"], ss("ticket_001")); + Ok(()) +} + +async fn run_query13( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 13: Get ticket history by assignee email + // Key condition: PK=AssigneeEmail + // Filter condition: PK=ticketNumber + let query13_values = HashMap::from([ + entry(":assigneeemail", "AE-able@gmail.com"), + entry(":ticket", "T-ticket_001"), + ]); + + let query13_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-2") + .set_expression_attribute_values(Some(query13_values)) + .key_condition_expression("PK2 = :assigneeemail") + .filter_expression("PK = :ticket") + .send() + .await?; + + // Assert 1 item was returned + let items = query13_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("ticket1")); + assert_eq!(items[0]["Subject"], ss("Bad bug")); + Ok(()) +} + +async fn run_query14( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 14: Get employees by city.building.floor.desk + // Key condition: PK3=city SK3 begins_with(building.floor.desk) + + let query14_values = HashMap::from([ + entry(":city", "C-Seattle"), + entry(":location", "B-44~F-12~D-3"), + ]); + + let query14_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-3") + .set_expression_attribute_values(Some(query14_values)) + .key_condition_expression("PK3 = :city AND begins_with(SK3, :location)") + .send() + .await?; + + // Assert 1 item was returned + let items = query14_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("employee1")); + assert_eq!(items[0]["EmployeeID"], ss("emp_001")); + assert_eq!(items[0]["Location"].as_m().unwrap()["Desk"], ss("3")); + Ok(()) +} + +async fn run_query15( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 15: Get employees by manager email + // Key condition: PK2 = ManagerEmail + + let query15_values = HashMap::from([entry(":manageremail", "ME-zorro@gmail.com")]); + + let query15_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-2") + .set_expression_attribute_values(Some(query15_values)) + .key_condition_expression("PK2 = :manageremail") + .send() + .await?; + + // Assert 4 items returned: + // Expected to be `employee1`, `employee2`, `employee3`, and `employee4` + let items = query15_response.items.unwrap(); + assert_eq!(items.len(), 4); + + let mut found_known_value_item_query15 = false; + for item in &items { + if item["partition_key"] == ss("employee1") { + found_known_value_item_query15 = true; + assert_eq!(item["EmployeeID"], ss("emp_001")); + assert_eq!(item["Location"].as_m().unwrap()["Desk"], ss("3")); + } + } + + assert!(found_known_value_item_query15); + Ok(()) +} + +async fn run_query16( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 16: Get assigned tickets by assignee email + // Key condition: PK2 = AssigneeEmail + + let query16_values = HashMap::from([entry(":assigneeemail", "AE-able@gmail.com")]); + + let query16_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-2") + .set_expression_attribute_values(Some(query16_values)) + .key_condition_expression("PK2 = :assigneeemail") + .send() + .await?; + + // Assert 2 items were returned + let items = query16_response.items.unwrap(); + assert_eq!(items.len(), 2); + + // Expected to be `ticket1` and `ticket4` + assert!( + ((items[0]["partition_key"] == ss("ticket1")) + && (items[1]["partition_key"] == ss("ticket4"))) + || ((items[0]["partition_key"] == ss("ticket4")) + && (items[1]["partition_key"] == ss("ticket1"))) + ); + Ok(()) +} + +async fn run_query17( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 17: Get tickets updated within the last 24 hours + // Key condition: PK3 = Severity, SK3 > 24 hours ago + // (For the sake of this example, we will assume + // the date is 2022-10-08T09:30:00, such that "24 hours ago" + // is 2022-10-07T09:30:00, and that our sample ticket record + // with TicketModTime=2022-10-07T14:32:25 will be returned.) + + let query17_values = HashMap::from([ + entry(":severity", "S-3"), + entry(":yesterday", "M-2022-10-07T09:30:00"), + ]); + + let query17_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-3") + .set_expression_attribute_values(Some(query17_values)) + .key_condition_expression("PK3 = :severity AND SK3 > :yesterday") + .send() + .await?; + + // Assert 3 items returned: + // Expected to be `ticket1`, `ticket2`, and `ticket4` + + let items = query17_response.items.unwrap(); + assert_eq!(items.len(), 3); + + let mut found_known_value_item_query17 = false; + for item in &items { + if item["partition_key"] == ss("ticket1") { + found_known_value_item_query17 = true; + assert_eq!(item["TicketNumber"], ss("ticket_001")); + } + } + + assert!(found_known_value_item_query17); + Ok(()) +} + +async fn run_query18( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 18: Get projects by status, start and target date + // Key condition: PK1 = Status, SK1 > StartDate + // Filter condition: TargetDelivery < TargetDate + + let query18_values = HashMap::from([ + entry(":status", "PSts-Pending"), + entry(":startdate", "PS-2022-01-01"), + entry(":target", "2025-01-01"), + ]); + + let query18_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-1") + .set_expression_attribute_values(Some(query18_values)) + .key_condition_expression("PK1 = :status AND SK1 > :startdate") + .filter_expression("ProjectTarget < :target") + .send() + .await?; + + // Assert 1 item was returned + let items = query18_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("project1")); + assert_eq!(items[0]["ProjectName"], ss("project_001")); + Ok(()) +} + +async fn run_query19( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 19: Get projects by name + // Key condition: PK = ProjectName, SK = ProjectName + + let query19_values = HashMap::from([entry(":projectname", "P-project_001")]); + + let query19_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-0") + .set_expression_attribute_values(Some(query19_values)) + .key_condition_expression("PK = :projectname AND SK = :projectname") + .send() + .await?; + + // Assert 1 item was returned + let items = query19_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("project1")); + assert_eq!(items[0]["ProjectName"], ss("project_001")); + Ok(()) +} + +async fn run_query20( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 20: Get Project History by date range (against timecard record) + // Key condition: PK = ProjectName, SK between(date1, date2) + + let query20_values = HashMap::from([ + entry(":projectname", "P-project_002"), + entry(":date1", "TC-2022-01-01"), + entry(":date2", "TC-2023-01-01"), + ]); + + let query20_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-0") + .set_expression_attribute_values(Some(query20_values)) + .key_condition_expression("PK = :projectname AND SK BETWEEN :date1 AND :date2") + .send() + .await?; + + // Assert 2 items returned: + // Expected to be `timecard1` and `timecard2` + let items = query20_response.items.unwrap(); + assert_eq!(items.len(), 2); + + assert!( + ((items[0]["partition_key"] == ss("timecard1")) + && (items[1]["partition_key"] == ss("timecard2"))) + || ((items[0]["partition_key"] == ss("timecard2")) + && (items[1]["partition_key"] == ss("timecard1"))) + ); + Ok(()) +} + +async fn run_query21( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 21: Get Project History by role + // Key condition: PK = ProjectName + // Filter condition: role=rolename + + let query21_names = HashMap::from([ + ("#role".to_string(), "Role".to_string()), // Role is a reserved word + ]); + + let query21_values = HashMap::from([ + entry(":projectname", "P-project_002"), + entry(":role", "SDE3"), + ]); + + let query21_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-0") + .set_expression_attribute_values(Some(query21_values)) + .set_expression_attribute_names(Some(query21_names)) + .key_condition_expression("PK = :projectname") + .filter_expression("#role = :role") + .send() + .await?; + + // Assert 1 item was returned: `timecard1` + let items = query21_response.items.unwrap(); + assert_eq!(items.len(), 1); + + // Known value test: Assert some properties the item + assert_eq!(items[0]["partition_key"], ss("timecard1")); + assert_eq!(items[0]["ProjectName"], ss("project_002")); + Ok(()) +} + +async fn run_query22( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 22: Get reservations by building ID + // Key condition: PK = Building ID + + let query22_values = HashMap::from([entry(":building", "B-SEA33")]); + + let query22_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-0") + .set_expression_attribute_values(Some(query22_values)) + .key_condition_expression("PK = :building") + .send() + .await?; + + // Assert 2 items returned: + // Expected to be `reservation1` and `reservation2` + let items = query22_response.items.unwrap(); + assert_eq!(items.len(), 2); + + assert!( + ((items[0]["partition_key"] == ss("reservation1")) + && (items[1]["partition_key"] == ss("reservation2"))) + || ((items[0]["partition_key"] == ss("reservation2")) + && (items[1]["partition_key"] == ss("reservation1"))) + ); + Ok(()) +} + +async fn run_query23( + ddb_table_name: &str, + ddb: &mut aws_sdk_dynamodb::Client, +) -> Result<(), crate::BoxError> { + // Query 23: Get reservations by building ID and time range + // Key condition: PK = Building ID, SK between(date1, date2) + // Filter condition: Duration > 0 + + let query23_names = HashMap::from([ + ("#duration".to_string(), "Duration".to_string()), // Duration is a reserved word + ]); + + let query23_values = HashMap::from([ + entry(":building", "B-SEA33"), + entry(":date1", "MS-2022-07-01"), + entry(":date2", "MS-2022-07-08"), + entry(":zero", "0"), + ]); + + let query23_response = ddb + .query() + .table_name(ddb_table_name) + .index_name("GSI-0") + .set_expression_attribute_values(Some(query23_values)) + .set_expression_attribute_names(Some(query23_names)) + .key_condition_expression("PK = :building AND SK BETWEEN :date1 AND :date2") + .filter_expression("#duration > :zero") + .send() + .await?; + + // Assert 2 items returned: + // Expected to be `reservation1` and `reservation2` + let items = query23_response.items.unwrap(); + assert_eq!(items.len(), 2); + + assert!( + ((items[0]["partition_key"] == ss("reservation1")) + && (items[1]["partition_key"] == ss("reservation2"))) + || ((items[0]["partition_key"] == ss("reservation2")) + && (items[1]["partition_key"] == ss("reservation1"))) + ); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/searchableencryption/compound_beacon_searchable_encryption.rs b/releases/rust/db_esdk/examples/searchableencryption/compound_beacon_searchable_encryption.rs new file mode 100644 index 000000000..c78f14576 --- /dev/null +++ b/releases/rust/db_esdk/examples/searchableencryption/compound_beacon_searchable_encryption.rs @@ -0,0 +1,328 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; +use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::client as transform_client; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +/* + This example demonstrates how to set up a compound beacon on encrypted attributes, + put an item with the beacon, and query against that beacon. + This example follows a use case of a database that stores unit inspection information. + This is an extension of the "BasicSearchableEncryptionExample" in this directory. + This example uses the same situation (storing unit inspection information) + and the same table schema. + However, this example uses a different Global Secondary Index (GSI) + that is based on a compound beacon configuration composed of + the `last4` and `unit` attributes. + + Running this example requires access to a DDB table with the + following key configuration: + - Partition key is named "work_id" with type (S) + - Sort key is named "inspection_time" with type (S) + This table must have a Global Secondary Index (GSI) configured named "last4UnitCompound-index": + - Partition key is named "aws_dbe_b_last4UnitCompound" with type (S) + + In this example for storing unit inspection information, this schema is utilized for the data: + - "work_id" stores a unique identifier for a unit inspection work order (v4 UUID) + - "inspection_date" stores an ISO 8601 date for the inspection (YYYY-MM-DD) + - "inspector_id_last4" stores the last 4 digits of the ID of the inspector performing the work + - "unit" stores a 12-digit serial number for the unit being inspected + + The example requires the following ordered input command line parameters: + 1. DDB table name for table to put/query data from + 2. Branch key ID for a branch key that was previously created in your key store. See the + CreateKeyStoreKeyExample. + 3. Branch key wrapping KMS key ARN for the KMS key used to create the branch key with ID + provided in arg 2 + 4. Branch key DDB table ARN for the DDB table representing the branch key store +*/ + +const GSI_NAME: &str = "last4UnitCompound-index"; + +pub async fn put_and_query_with_beacon(branch_key_id: &str) -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::UNIT_INSPECTION_TEST_DDB_TABLE_NAME; + let branch_key_wrapping_kms_key_arn = test_utils::TEST_BRANCH_KEY_WRAPPING_KMS_KEY_ARN; + let branch_key_ddb_table_name = test_utils::TEST_BRANCH_KEYSTORE_DDB_TABLE_NAME; + + // 1. Create Beacons. + // These are the same beacons as in the "BasicSearchableEncryptionExample" in this directory. + // See that file to see details on beacon construction and parameters. + // While we will not directly query against these beacons, + // you must create standard beacons on encrypted fields + // that we wish to use in compound beacons. + let last4_beacon = StandardBeacon::builder() + .name("inspector_id_last4") + .length(10) + .build()?; + + let unit_beacon = StandardBeacon::builder().name("unit").length(30).build()?; + + let standard_beacon_list = vec![last4_beacon, unit_beacon]; + + // 2. Define encrypted parts. + // Encrypted parts define the beacons that can be used to construct a compound beacon, + // and how the compound beacon prefixes those beacon values. + + // A encrypted part must receive: + // - name: Name of a standard beacon + // - prefix: Any string. This is plaintext that prefixes the beaconized value in the compound beacon. + // Prefixes must be unique across the configuration, and must not be a prefix of another prefix; + // i.e. for all configured prefixes, the first N characters of a prefix must not equal another prefix. + // In practice, it is suggested to have a short value distinguishable from other parts served on the prefix. + // For this example, we will choose "L-" as the prefix for "Last 4 digits of inspector ID". + // With this prefix and the standard beacon's bit length definition (10), the beaconized + // version of the inspector ID's last 4 digits will appear as + // `L-000` to `L-3ff` inside a compound beacon. + + // For this example, we will choose "U-" as the prefix for "unit". + // With this prefix and the standard beacon's bit length definition (30), a unit beacon will appear + // as `U-00000000` to `U-3fffffff` inside a compound beacon. + let encrypted_parts_list = vec![ + EncryptedPart::builder() + .name("inspector_id_last4") + .prefix("L-") + .build()?, + EncryptedPart::builder().name("unit").prefix("U-").build()?, + ]; + + // 3. Define compound beacon. + // A compound beacon allows one to serve multiple beacons or attributes from a single index. + // A compound beacon must receive: + // - name: The name of the beacon. Compound beacon values will be written to `aws_ddb_e_[name]`. + // - split: A character separating parts in a compound beacon + // A compound beacon may also receive: + // - encrypted: A list of encrypted parts. This is effectively a list of beacons. We provide the list + // that we created above. + // - constructors: A list of constructors. This is an ordered list of possible ways to create a beacon. + // We have not defined any constructors here; see the complex example for how to do this. + // The client will provide a default constructor, which will write a compound beacon as: + // all signed parts in the order they are added to the signed list; + // all encrypted parts in order they are added to the encrypted list; all parts required. + // In this example, we expect compound beacons to be written as + // `L-XXX.U-YYYYYYYY`, since our encrypted list looks like + // [last4EncryptedPart, unitEncryptedPart]. + // - signed: A list of signed parts, i.e. plaintext attributes. This would be provided if we + // wanted to use plaintext values as part of constructing our compound beacon. We do not + // provide this here; see the Complex example for an example. + let compound_beacon_list = vec![CompoundBeacon::builder() + .name("last4UnitCompound") + .split(".") + .encrypted(encrypted_parts_list) + .build()?]; + + // 4. Configure the Keystore + // These are the same constructions as in the Basic example, which describes these in more detail. + + 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(branch_key_ddb_table_name) + .logical_key_store_name(branch_key_ddb_table_name) + .kms_configuration(KmsConfiguration::KmsKeyArn( + branch_key_wrapping_kms_key_arn.to_string(), + )) + .build()?; + + let key_store = keystore_client::Client::from_conf(key_store_config)?; + + // 5. Create BeaconVersion. + // This is similar to the Basic example, except we have also provided a compoundBeaconList. + // We must also continue to provide all of the standard beacons that compose a compound beacon list. + let beacon_version = BeaconVersion::builder() + .standard_beacons(standard_beacon_list) + .compound_beacons(compound_beacon_list) + .version(1) // MUST be 1 + .key_store(key_store.clone()) + .key_source(BeaconKeySource::Single( + SingleKeyStore::builder() + // `keyId` references a beacon key. + // For every branch key we create in the keystore, + // we also create a beacon key. + // This beacon key is not the same as the branch key, + // but is created with the same ID as the branch key. + .key_id(branch_key_id) + .cache_ttl(6000) + .build()?, + )) + .build()?; + let beacon_versions = vec![beacon_version]; + + // 6. Create a Hierarchical Keyring + // This is the same configuration as in the Basic example. + + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + let kms_keyring = mpl + .create_aws_kms_hierarchical_keyring() + .branch_key_id(branch_key_id) + .key_store(key_store) + .ttl_seconds(6000) + .send() + .await?; + + // 7. Configure which attributes are encrypted and/or signed when writing new items. + let attribute_actions_on_encrypt = HashMap::from([ + ("work_id".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("inspection_date".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ( + "inspector_id_last4".to_string(), + CryptoAction::EncryptAndSign, + ), // Beaconized attributes must be encrypted + ("unit".to_string(), CryptoAction::EncryptAndSign), // Beaconized attributes must be encrypted + ]); + + // We do not need to define a crypto action on last4UnitCompound. + // We only need to define crypto actions on attributes that we pass to PutItem. + + // 8. Create the DynamoDb Encryption configuration for the table we will be writing to. + // The beaconVersions are added to the search configuration. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("work_id") + .sort_key_name("inspection_date") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(kms_keyring) + .search( + SearchConfig::builder() + .write_version(1) // MUST be 1 + .versions(beacon_versions) + .build()?, + ) + .build()?; + + // 9. Create config + let encryption_config = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 10. Create an item with both attributes used in the compound beacon. + let item = HashMap::from([ + ( + "work_id".to_string(), + AttributeValue::S("9ce39272-8068-4efd-a211-cd162ad65d4c".to_string()), + ), + ( + "inspection_date".to_string(), + AttributeValue::S("2023-06-13".to_string()), + ), + ( + "inspector_id_last4".to_string(), + AttributeValue::S("5678".to_string()), + ), + ( + "unit".to_string(), + AttributeValue::S("011899988199".to_string()), + ), + ]); + + // 11. If developing or debugging, verify config by checking compound beacon values directly + let trans = transform_client::Client::from_conf(encryption_config.clone())?; + let resolve_output = trans + .resolve_attributes() + .table_name(ddb_table_name) + .item(item.clone()) + .version(1) + .send() + .await?; + + // Verify that there are no virtual fields + assert_eq!(resolve_output.virtual_fields.unwrap().len(), 0); + + // Verify that CompoundBeacons has the expected value + let compound_beacons = resolve_output.compound_beacons.unwrap(); + assert_eq!(compound_beacons.len(), 1); + assert_eq!( + compound_beacons["last4UnitCompound"], + "L-5678.U-011899988199" + ); + // Note : the compound beacon actually stored in the table is not "L-5678.U-011899988199" + // but rather something like "L-abc.U-123", as both parts are EncryptedParts + // and therefore the text is replaced by the associated beacon + + // 12. Create a new AWS SDK DynamoDb client using the DynamoDb Encryption Interceptor above + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(encryption_config)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 13. Write the item to the table + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item.clone())) + .send() + .await?; + + // 14. Query for the item we just put. + let expression_attribute_values = HashMap::from([ + // This query expression takes a few factors into consideration: + // - The configured prefix for the last 4 digits of an inspector ID is "L-"; + // the prefix for the unit is "U-" + // - The configured split character, separating component parts, is "." + // - The default constructor adds encrypted parts in the order they are in the encrypted list, which + // configures `last4` to come before `unit`` + // NOTE: We did not need to create a compound beacon for this query. This query could have also been + // done by querying on the partition and sort key, as was done in the Basic example. + // This is intended to be a simple example to demonstrate how one might set up a compound beacon. + // For examples where compound beacons are required, see the Complex example. + // The most basic extension to this example that would require a compound beacon would add a third + // part to the compound beacon, then query against three parts. + ( + ":value".to_string(), + AttributeValue::S("L-5678.U-011899988199".to_string()), + ), + ]); + + // GSIs are sometimes a little bit delayed, so we retry if the query comes up empty. + for _i in 0..10 { + let query_response = ddb + .query() + .table_name(ddb_table_name) + .index_name(GSI_NAME) + .key_condition_expression("last4UnitCompound = :value") + .set_expression_attribute_values(Some(expression_attribute_values.clone())) + .send() + .await?; + + // if no results, sleep and try again + if query_response.items.is_none() || query_response.items.as_ref().unwrap().is_empty() { + std::thread::sleep(std::time::Duration::from_millis(20)); + continue; + } + + let attribute_values = query_response.items.unwrap(); + // Validate only 1 item was returned: the item we just put + assert_eq!(attribute_values.len(), 1); + let returned_item = &attribute_values[0]; + // Validate the item has the expected attributes + assert_eq!( + returned_item["inspector_id_last4"], + AttributeValue::S("5678".to_string()) + ); + assert_eq!( + returned_item["unit"], + AttributeValue::S("011899988199".to_string()) + ); + break; + } + println!("compound_beacon_searchable_encryption successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/searchableencryption/mod.rs b/releases/rust/db_esdk/examples/searchableencryption/mod.rs new file mode 100644 index 000000000..5dcd38898 --- /dev/null +++ b/releases/rust/db_esdk/examples/searchableencryption/mod.rs @@ -0,0 +1,8 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub mod basic_searchable_encryption; +pub mod beacon_styles_searchable_encryption; +pub mod complexexample; +pub mod compound_beacon_searchable_encryption; +pub mod virtual_beacon_searchable_encryption; diff --git a/releases/rust/db_esdk/examples/searchableencryption/virtual_beacon_searchable_encryption.rs b/releases/rust/db_esdk/examples/searchableencryption/virtual_beacon_searchable_encryption.rs new file mode 100644 index 000000000..6de40463e --- /dev/null +++ b/releases/rust/db_esdk/examples/searchableencryption/virtual_beacon_searchable_encryption.rs @@ -0,0 +1,437 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::test_utils; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualField; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform; +use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction; +use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client; +use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig; +use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration; +use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client; +use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig; +use aws_db_esdk::client as transform_client; +use aws_db_esdk::intercept::DbEsdkInterceptor; +use aws_db_esdk::DynamoDbTablesEncryptionConfig; +use aws_sdk_dynamodb::types::AttributeValue; +use std::collections::HashMap; + +/* + This example demonstrates how to set up a virtual field from two DDB + attributes, create a standard beacon with that field, put an item with + that beacon, and query against that beacon. + + A virtual field is a field consisting of a transformation of one or more attributes in a DDB item. + Virtual fields are useful in querying against encrypted fields that only have a handful of + possible values. They allow you to take fields with few possible values, concatenate + them to other fields, then query against the combined field. This enables using these types of + fields in queries while making it infeasible to identify which beacon values encode + the few possible distinct plaintexts. This is explained in more detail below. + Virtual fields are not stored in the DDB table. However, they are used to construct + a beacon, the value of which is stored. + + For more information on virtual fields, see + https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/beacons.html#virtual-field + + For our example, we will construct a virtual field + from two DDB attributes `state` and `hasTestResult` as `state`+prefix(`hasTestResult`, 1). + We will then create a beacon out of this virtual field and use it to search. + + This example follows a use case of a database that stores customer test result metadata. + Records are indexed by `customer_id` and store a `state` attribute, representing the + US state or territory where the customer lives, and a `hasTestResult` boolean attribute, + representing whether the customer has a "test result" available. (Maybe this represents + some medical test result, and this table stores "result available" metadata.) We assume + that values in these fields are uniformly distributed across all possible values for + these fields (56 for `state`, 2 for `hasTestResult`), and are uniformly distributed across + customer IDs. + + The motivation behind this example is to demonstrate how and why one would use a virtual beacon. + In this example, our table stores records with an encrypted boolean `hasTestResult` attribute. + We would like to be able to query for customers in a given state with a `true` hasTestResult + attribute. + + To be able to execute this query securely and efficiently, we want the following + properties on our table: + 1. Hide the distribution of `hasTestResult` attribute values (i.e. it should be infeasible + to determine the percentage of `true`s to `false`s across the dataset from beaconized + values) + 2. Query against a combination of whether `hasTestResult` is true/false and the `state` field + We cannot achieve these properties with a standard beacon on a true/false attribute. Following + the guidance to choose a beacon length: + https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/choosing-beacon-length.html + For a boolean value (in our case, whether `hasTestResult` is true or false), the acceptable + bounds for beacon length are either 0 or 1. This corresponds to either not storing a beacon + (length 0), or effectively storing another boolean attribute (length 1). With + length 0, this beacon is useless for searching (violating property 2); with length 1, this + beacon may not hide the attribute (violating property 1). + In addition, choosing a longer beacon length does not help us. + Each attribute value is mapped to a distinct beacon. + Since booleans only have 2 possible attribute values, we will still only have 2 possible + beacon values, though those values may be longer. A longer beacon provides no advantages over + beacon of length 1 in this situation. + + A compound beacon also does not help. + To (over)simplify, a compound beacon is a concatenation of standard beacons, + i.e. beacon(`state`)+beacon(`hasTestResult`). + The `hasTestResult` beacon is still visible, so we would still have the problems above. + + To achieve these properties, we instead construct a virtual field and use that in our beacon, + i.e. beacon(`state`+`hasTestResult`). Assuming these fields are well-distributed across + customer IDs and possible values, this gives us both desired properties; we can query against + both attributes while hiding information from the underlying data. This is demonstrated in more + detail below. + + Running this example requires access to a DDB table with the + following primary key configuration: + - Partition key is named "customer_id" with type (S) + - Sort key is named "create_time" with type (S) + This table must have a Global Secondary Index (GSI) configured named "stateAndHasTestResult-index": + - Partition key is named "aws_dbe_b_stateAndHasTestResult" with type (S) + + In this example for storing customer location data, this schema is utilized for the data: + - "customer_id" stores a unique customer identifier + - "create_time" stores a Unix timestamp + - "state" stores an encrypted 2-letter US state or territory abbreviation + (https://www.faa.gov/air_traffic/publications/atpubs/cnt_html/appendix_a.html) + - "hasTestResult" is not part of the schema, but is an attribute utilized in this example. + It stores a boolean attribute (false/true) indicating whether this customer has a test result + available. + + The example requires the following ordered input command line parameters: + 1. DDB table name for table to put/query data from + 2. Branch key ID for a branch key that was previously created in your key store. See the + CreateKeyStoreKeyExample. + 2. Branch key wrapping KMS key ARN for the KMS key used to create the branch key + 3. Branch key DDB table name for the DDB table representing the branch key store +*/ + +const GSI_NAME: &str = "stateAndHasTestResult-index"; + +pub async fn put_and_query_with_beacon(branch_key_id: &str) -> Result<(), crate::BoxError> { + let ddb_table_name = test_utils::SIMPLE_BEACON_TEST_DDB_TABLE_NAME; + let branch_key_wrapping_kms_key_arn = test_utils::TEST_BRANCH_KEY_WRAPPING_KMS_KEY_ARN; + let branch_key_ddb_table_name = test_utils::TEST_BRANCH_KEYSTORE_DDB_TABLE_NAME; + + // 1. Construct a length-1 prefix virtual transform. + // `hasTestResult` is a binary attribute, containing either `true` or `false`. + // As an example to demonstrate virtual transforms, we will truncate the value + // of `hasTestResult` in the virtual field to the length-1 prefix of the binary value, i.e.: + // - "true" -> "t" + // - "false -> "f" + // This is not necessary. This is done as a demonstration of virtual transforms. + // Virtual transform operations treat all attributes as strings + // (i.e. the boolean value `true` is interpreted as a string "true"), + // so its length-1 prefix is just "t". + + let length1_prefix_virtual_transform_list = vec![VirtualTransform::Prefix( + GetPrefix::builder().length(1).build()?, + )]; + + // 2. Construct the VirtualParts required for the VirtualField + let has_test_result_part = VirtualPart::builder() + .loc("hasTestResult") + .trans(length1_prefix_virtual_transform_list) + .build()?; + + let state_part = VirtualPart::builder().loc("state").build()?; + // Note that we do not apply any transform to the `state` attribute, + // and the virtual field will read in the attribute as-is. + + // 3. Construct the VirtualField from the VirtualParts + // Note that the order that virtual parts are added to the virtualPartList + // dictates the order in which they are concatenated to build the virtual field. + // You must add virtual parts in the same order on write as you do on read. + let virtual_part_list = vec![state_part, has_test_result_part]; + + let state_and_has_test_result_field = VirtualField::builder() + .name("stateAndHasTestResult") + .parts(virtual_part_list) + .build()?; + + let virtual_field_list = vec![state_and_has_test_result_field]; + + // 4. Configure our beacon. + // The virtual field is assumed to hold a US 2-letter state abbreviation + // (56 possible values = 50 states + 6 territories) concatenated with a binary attribute + // (2 possible values: true/false hasTestResult field), we expect a population size of + // 56 * 2 = 112 possible values. + // We will also assume that these values are reasonably well-distributed across + // customer IDs. In practice, this will not be true. We would expect + // more populous states to appear more frequently in the database. + // A more complex analysis would show that a stricter upper bound + // is necessary to account for this by hiding information from the + // underlying distribution. + // + // This link provides guidance for choosing a beacon length: + // https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/choosing-beacon-length.html + // We follow the guidance in the link above to determine reasonable bounds for beacon length: + // - min: log(sqrt(112))/log(2) ~= 3.4, round down to 3 + // - max: log((112/2))/log(2) ~= 5.8, round up to 6 + // You will somehow need to round results to a nearby integer. + // We choose to round to the nearest integer; you might consider a different rounding approach. + // Rounding up will return fewer expected "false positives" in queries, + // leading to fewer decrypt calls and better performance, + // but it is easier to identify which beacon values encode distinct plaintexts. + // Rounding down will return more expected "false positives" in queries, + // leading to more decrypt calls and worse performance, + // but it is harder to identify which beacon values encode distinct plaintexts. + // We can choose a beacon length between 3 and 6: + // - Closer to 3, we expect more "false positives" to be returned, + // making it harder to identify which beacon values encode distinct plaintexts, + // but leading to more decrypt calls and worse performance + // - Closer to 6, we expect fewer "false positives" returned in queries, + // leading to fewer decrypt calls and better performance, + // but it is easier to identify which beacon values encode distinct plaintexts. + // As an example, we will choose 5. + // Values stored in aws_dbe_b_stateAndHasTestResult will be 5 bits long (0x00 - 0x1f) + // There will be 2^5 = 32 possible HMAC values. + // With a well-distributed dataset (112 values), for a particular beacon we expect + // (112/32) = 3.5 combinations of abbreviation + true/false attribute + // sharing that beacon value. + let standard_beacon_list = vec![StandardBeacon::builder() + .name("stateAndHasTestResult") + .length(5) + .build()?]; + + // 5. Configure Keystore. + // This example expects that you have already set up a KeyStore with a single branch key. + // See the "CreateKeyStoreTableExample" and "CreateKeyStoreKeyExample" files for how to do this. + // After you create a branch key, you should persist its ID for use in this example. + 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(branch_key_ddb_table_name) + .logical_key_store_name(branch_key_ddb_table_name) + .kms_configuration(KmsConfiguration::KmsKeyArn( + branch_key_wrapping_kms_key_arn.to_string(), + )) + .build()?; + + let key_store = keystore_client::Client::from_conf(key_store_config)?; + + // 6. Create BeaconVersion. + // The BeaconVersion inside the list holds the list of beacons on the table. + // The BeaconVersion also stores information about the keystore. + // BeaconVersion must be provided: + // - keyStore: The keystore configured in the previous step. + // - keySource: A configuration for the key source. + // For simple use cases, we can configure a 'singleKeySource' which + // statically configures a single beaconKey. That is the approach this example takes. + // For use cases where you want to use different beacon keys depending on the data + // (for example if your table holds data for multiple tenants, and you want to use + // a different beacon key per tenant), look into configuring a MultiKeyStore: + // https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/searchable-encryption-multitenant.html + // We also provide our standard beacon list and virtual fields here. + let beacon_version = BeaconVersion::builder() + .standard_beacons(standard_beacon_list) + .virtual_fields(virtual_field_list) + .version(1) // MUST be 1 + .key_store(key_store.clone()) + .key_source(BeaconKeySource::Single( + SingleKeyStore::builder() + // `keyId` references a beacon key. + // For every branch key we create in the keystore, + // we also create a beacon key. + // This beacon key is not the same as the branch key, + // but is created with the same ID as the branch key. + .key_id(branch_key_id) + .cache_ttl(6000) + .build()?, + )) + .build()?; + let beacon_versions = vec![beacon_version]; + + // 7. Create a Hierarchical Keyring + // This is a KMS keyring that utilizes the keystore table. + // This config defines how items are encrypted and decrypted. + // NOTE: You should configure this to use the same keystore as your search config. + let mpl_config = MaterialProvidersConfig::builder().build()?; + let mpl = mpl_client::Client::from_conf(mpl_config)?; + let kms_keyring = mpl + .create_aws_kms_hierarchical_keyring() + .branch_key_id(branch_key_id) + .key_store(key_store) + .ttl_seconds(6000) + .send() + .await?; + + // 8. Configure which attributes are encrypted and/or signed when writing new items. + // For each attribute that may exist on the items we plan to write to our DynamoDbTable, + // we must explicitly configure how they should be treated during item encryption: + // - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature + // - SIGN_ONLY: The attribute not encrypted, but is still included in the signature + // - DO_NOTHING: The attribute is not encrypted and not included in the signature + // Any attributes that will be used in beacons must be configured as ENCRYPT_AND_SIGN. + let attribute_actions_on_encrypt = HashMap::from([ + ("customer_id".to_string(), CryptoAction::SignOnly), // Our partition attribute must be SIGN_ONLY + ("create_time".to_string(), CryptoAction::SignOnly), // Our sort attribute must be SIGN_ONLY + ("state".to_string(), CryptoAction::EncryptAndSign), // Beaconized attributes must be encrypted + ("hasTestResult".to_string(), CryptoAction::EncryptAndSign), // Beaconized attributes must be encrypted + ]); + + // 9. Create the DynamoDb Encryption configuration for the table we will be writing to. + // The beaconVersions are added to the search configuration. + let table_config = DynamoDbTableEncryptionConfig::builder() + .logical_table_name(ddb_table_name) + .partition_key_name("customer_id") + .sort_key_name("create_time") + .attribute_actions_on_encrypt(attribute_actions_on_encrypt) + .keyring(kms_keyring) + .search( + SearchConfig::builder() + .write_version(1) // MUST be 1 + .versions(beacon_versions) + .build()?, + ) + .build()?; + + // 10. Create config + let encryption_config = DynamoDbTablesEncryptionConfig::builder() + .table_encryption_configs(HashMap::from([(ddb_table_name.to_string(), table_config)])) + .build()?; + + // 11. Create test items + + // Create item with hasTestResult=true + let item_with_has_test_result = HashMap::from([ + ( + "customer_id".to_string(), + AttributeValue::S("ABC-123".to_string()), + ), + ( + "create_time".to_string(), + AttributeValue::N("1681495205".to_string()), + ), + ("state".to_string(), AttributeValue::S("CA".to_string())), + ("hasTestResult".to_string(), AttributeValue::Bool(true)), + ]); + + // Create item with hasTestResult=false + let item_with_no_has_test_result = HashMap::from([ + ( + "customer_id".to_string(), + AttributeValue::S("DEF-456".to_string()), + ), + ( + "create_time".to_string(), + AttributeValue::N("1681495205".to_string()), + ), + ("state".to_string(), AttributeValue::S("CA".to_string())), + ("hasTestResult".to_string(), AttributeValue::Bool(false)), + ]); + + // 12. If developing or debugging, verify config by checking virtual field values directly + let trans = transform_client::Client::from_conf(encryption_config.clone())?; + let resolve_output = trans + .resolve_attributes() + .table_name(ddb_table_name) + .item(item_with_has_test_result.clone()) + .version(1) + .send() + .await?; + + // CompoundBeacons is empty because we have no Compound Beacons configured + assert_eq!(resolve_output.compound_beacons.unwrap().len(), 0); + + // Verify that VirtualFields has the expected value + let virtual_fields = resolve_output.virtual_fields.unwrap(); + assert_eq!(virtual_fields.len(), 1); + assert_eq!(virtual_fields["stateAndHasTestResult"], "CAt"); + + // 13. Create a new AWS SDK DynamoDb client using the DynamoDb Encryption Interceptor above + let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config) + .interceptor(DbEsdkInterceptor::new(encryption_config)) + .build(); + let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config); + + // 14. Put two items into our table using the above client. + // The two items will differ only in their `customer_id` attribute (primary key) + // and their `hasTestResult` attribute. + // We will query against these items to demonstrate how to use our setup above + // to query against our `stateAndHasTestResult` beacon. + // Before the item gets sent to DynamoDb, it will be encrypted + // client-side, according to our configuration. + // Since our configuration includes a beacon on a virtual field named + // `stateAndHasTestResult`, the client will add an attribute + // to the item with name `aws_dbe_b_stateAndHasTestResult`. + // Its value will be an HMAC truncated to as many bits as the + // beacon's `length` parameter; i.e. 5. + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item_with_has_test_result.clone())) + .send() + .await?; + + ddb.put_item() + .table_name(ddb_table_name) + .set_item(Some(item_with_no_has_test_result.clone())) + .send() + .await?; + + // 15. Query by stateAndHasTestResult attribute. + // Note that we are constructing the query as if we were querying on plaintext values. + // However, the DDB encryption client will detect that this attribute name has a beacon configured. + // The client will add the beaconized attribute name and attribute value to the query, + // and transform the query to use the beaconized name and value. + // Internally, the client will query for and receive all items with a matching HMAC value in the beacon field. + // This may include a number of "false positives" with different ciphertext, but the same truncated HMAC. + // e.g. if truncate(HMAC("CAt"), 5) == truncate(HMAC("DCf"), 5), the query will return both items. + // The client will decrypt all returned items to determine which ones have the expected attribute values, + // and only surface items with the correct plaintext to the user. + // This procedure is internal to the client and is abstracted away from the user; + // e.g. the user will only see "CAt" and never "DCf", though the actual query returned both. + let expression_attribute_values = HashMap::from([ + // We are querying for the item with `state`="CA" and `hasTestResult`=`true`. + // Since we added virtual parts as `state` then `hasTestResult`, + // we must write our query expression in the same order. + // We constructed our virtual field as `state`+`hasTestResult`, + // so we add the two parts in that order. + // Since we also created a virtual transform that truncated `hasTestResult` + // to its length-1 prefix, i.e. "true" -> "t", + // we write that field as its length-1 prefix in the query. + ( + ":stateAndHasTestResult".to_string(), + AttributeValue::S("CAt".to_string()), + ), + ]); + + // GSIs are sometimes a little bit delayed, so we retry if the query comes up empty. + for _i in 0..10 { + let query_response = ddb + .query() + .table_name(ddb_table_name) + .index_name(GSI_NAME) + .key_condition_expression("stateAndHasTestResult = :stateAndHasTestResult") + .set_expression_attribute_values(Some(expression_attribute_values.clone())) + .send() + .await?; + + // if no results, sleep and try again + if query_response.items.is_none() || query_response.items.as_ref().unwrap().is_empty() { + std::thread::sleep(std::time::Duration::from_millis(20)); + continue; + } + + let attribute_values = query_response.items.unwrap(); + // Validate only 1 item was returned: the item we just put + assert_eq!(attribute_values.len(), 1); + let returned_item = &attribute_values[0]; + // Validate the item has the expected attributes + assert_eq!(returned_item["state"], AttributeValue::S("CA".to_string())); + assert_eq!(returned_item["hasTestResult"], AttributeValue::Bool(true)); + break; + } + println!("virtual_beacon_searchable_encryption successful."); + Ok(()) +} diff --git a/releases/rust/db_esdk/examples/test_utils.rs b/releases/rust/db_esdk/examples/test_utils.rs new file mode 100644 index 000000000..01b1eb012 --- /dev/null +++ b/releases/rust/db_esdk/examples/test_utils.rs @@ -0,0 +1,46 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub const TEST_KEYSTORE_NAME: &str = "KeyStoreDdbTable"; +pub const TEST_LOGICAL_KEYSTORE_NAME: &str = "KeyStoreDdbTable"; + +pub const TEST_KEYSTORE_KMS_KEY_ID: &str = + "arn:aws:kms:us-west-2:370957321024:key/9d989aa2-2f9c-438c-a745-cc57d3ad0126"; + +pub const TEST_AWS_ACCOUNT_ID: &str = "658956600833"; + +pub const TEST_AWS_REGION: &str = "us-west-2"; + +// These are public KMS Keys that MUST only be used for testing, and MUST NOT be used for any production data +pub const TEST_KMS_KEY_ID: &str = + "arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f"; + +pub const TEST_MRK_KEY_ID: &str = + "arn:aws:kms:us-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7"; + +pub const TEST_KMS_RSA_KEY_ID: &str = + "arn:aws:kms:us-west-2:658956600833:key/8b432da4-dde4-4bc3-a794-c7d68cbab5a6"; + +pub const TEST_MRK_REPLICA_KEY_ID_US_EAST_1: &str = + "arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7"; + +pub const TEST_MRK_REPLICA_KEY_ID_EU_WEST_1: &str = + "arn:aws:kms:eu-west-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7"; + +// Our tests require access to DDB Table with this name +pub const TEST_DDB_TABLE_NAME: &str = "DynamoDbEncryptionInterceptorTestTableCS"; +pub const TEST_COMPLEX_TABLE_NAME: &str = "ComplexBeaconTestTableCS"; + +// Our tests require access to DDB Tables with these name +pub const SIMPLE_BEACON_TEST_DDB_TABLE_NAME: &str = "SimpleBeaconTestTable"; +pub const UNIT_INSPECTION_TEST_DDB_TABLE_NAME: &str = "UnitInspectionTestTableCS"; + +// The branch key must have been created using this KMS key +// Note: This is a public resource that anyone can access. +// This MUST NOT be used to encrypt any production data. +pub const TEST_BRANCH_KEY_WRAPPING_KMS_KEY_ARN: &str = + "arn:aws:kms:us-west-2:370957321024:key/9d989aa2-2f9c-438c-a745-cc57d3ad0126"; + +// Our tests require access to DDB Table with this name configured as a branch keystore +pub const TEST_BRANCH_KEYSTORE_DDB_TABLE_NAME: &str = "KeyStoreDdbTable"; +pub const TEST_COMPLEX_DDB_TABLE_NAME: &str = "ComplexBeaconTestTable"; diff --git a/releases/rust/db_esdk/src/aes_gcm.rs b/releases/rust/db_esdk/src/aes_gcm.rs new file mode 100644 index 000000000..21bf9230f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/aes_kdf_ctr.rs b/releases/rust/db_esdk/src/aes_kdf_ctr.rs new file mode 100644 index 000000000..f5b996ba3 --- /dev/null +++ b/releases/rust/db_esdk/src/aes_kdf_ctr.rs @@ -0,0 +1,77 @@ +// 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; + + #[allow(non_camel_case_types)] + // pub struct _default {} + + 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/db_esdk/src/client.rs b/releases/rust/db_esdk/src/client.rs new file mode 100644 index 000000000..b32c05b27 --- /dev/null +++ b/releases/rust/db_esdk/src/client.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. +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::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig, + ) -> Result { + let inner = + crate::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::_default::DynamoDbEncryptionTransforms( + &crate::conversions::dynamo_db_tables_encryption_config::_dynamo_db_tables_encryption_config::to_dafny(conf), + ); + 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 put_item_input_transform; + +mod put_item_output_transform; + +mod get_item_input_transform; + +mod get_item_output_transform; + +mod batch_write_item_input_transform; + +mod batch_write_item_output_transform; + +mod batch_get_item_input_transform; + +mod batch_get_item_output_transform; + +mod scan_input_transform; + +mod scan_output_transform; + +mod query_input_transform; + +mod query_output_transform; + +mod transact_write_items_input_transform; + +mod transact_write_items_output_transform; + +mod update_item_input_transform; + +mod update_item_output_transform; + +mod delete_item_input_transform; + +mod delete_item_output_transform; + +mod transact_get_items_input_transform; + +mod transact_get_items_output_transform; + +mod execute_statement_input_transform; + +mod execute_statement_output_transform; + +mod batch_execute_statement_input_transform; + +mod batch_execute_statement_output_transform; + +mod execute_transaction_input_transform; + +mod execute_transaction_output_transform; + +mod resolve_attributes; diff --git a/releases/rust/db_esdk/src/client/batch_execute_statement_input_transform.rs b/releases/rust/db_esdk/src/client/batch_execute_statement_input_transform.rs new file mode 100644 index 000000000..44d904ddd --- /dev/null +++ b/releases/rust/db_esdk/src/client/batch_execute_statement_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`BatchExecuteStatementInputTransform`](crate::operation::batch_execute_statement_input_transform::builders::BatchExecuteStatementInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::batch_execute_statement_input_transform::builders::BatchExecuteStatementInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::batch_execute_statement_input_transform::builders::BatchExecuteStatementInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`BatchExecuteStatementInputTransformOutput`](crate::operation::batch_execute_statement_input_transform::BatchExecuteStatementInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::batch_execute_statement_input_transform::BatchExecuteStatementInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::batch_execute_statement_input_transform::BatchExecuteStatementInputTransformError) + pub fn batch_execute_statement_input_transform(&self) -> crate::operation::batch_execute_statement_input_transform::builders::BatchExecuteStatementInputTransformFluentBuilder { + crate::operation::batch_execute_statement_input_transform::builders::BatchExecuteStatementInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/batch_execute_statement_output_transform.rs b/releases/rust/db_esdk/src/client/batch_execute_statement_output_transform.rs new file mode 100644 index 000000000..9ce9cf059 --- /dev/null +++ b/releases/rust/db_esdk/src/client/batch_execute_statement_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`BatchExecuteStatementOutputTransform`](crate::operation::batch_execute_statement_output_transform::builders::BatchExecuteStatementOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::batch_execute_statement_output_transform::builders::BatchExecuteStatementOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::batch_execute_statement_output_transform::builders::BatchExecuteStatementOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::batch_execute_statement_output_transform::builders::BatchExecuteStatementOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::batch_execute_statement_output_transform::builders::BatchExecuteStatementOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`BatchExecuteStatementOutputTransformOutput`](crate::operation::batch_execute_statement_output_transform::BatchExecuteStatementOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::batch_execute_statement_output_transform::BatchExecuteStatementOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::batch_execute_statement_output_transform::BatchExecuteStatementOutputTransformError) + pub fn batch_execute_statement_output_transform(&self) -> crate::operation::batch_execute_statement_output_transform::builders::BatchExecuteStatementOutputTransformFluentBuilder { + crate::operation::batch_execute_statement_output_transform::builders::BatchExecuteStatementOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/batch_get_item_input_transform.rs b/releases/rust/db_esdk/src/client/batch_get_item_input_transform.rs new file mode 100644 index 000000000..e3865aaa4 --- /dev/null +++ b/releases/rust/db_esdk/src/client/batch_get_item_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`BatchGetItemInputTransform`](crate::operation::batch_get_item_input_transform::builders::BatchGetItemInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::batch_get_item_input_transform::builders::BatchGetItemInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::batch_get_item_input_transform::builders::BatchGetItemInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`BatchGetItemInputTransformOutput`](crate::operation::batch_get_item_input_transform::BatchGetItemInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::batch_get_item_input_transform::BatchGetItemInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::batch_get_item_input_transform::BatchGetItemInputTransformError) + pub fn batch_get_item_input_transform(&self) -> crate::operation::batch_get_item_input_transform::builders::BatchGetItemInputTransformFluentBuilder { + crate::operation::batch_get_item_input_transform::builders::BatchGetItemInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/batch_get_item_output_transform.rs b/releases/rust/db_esdk/src/client/batch_get_item_output_transform.rs new file mode 100644 index 000000000..732cf1e15 --- /dev/null +++ b/releases/rust/db_esdk/src/client/batch_get_item_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`BatchGetItemOutputTransform`](crate::operation::batch_get_item_output_transform::builders::BatchGetItemOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::batch_get_item_output_transform::builders::BatchGetItemOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::batch_get_item_output_transform::builders::BatchGetItemOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::batch_get_item_output_transform::builders::BatchGetItemOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::batch_get_item_output_transform::builders::BatchGetItemOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`BatchGetItemOutputTransformOutput`](crate::operation::batch_get_item_output_transform::BatchGetItemOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::batch_get_item_output_transform::BatchGetItemOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::batch_get_item_output_transform::BatchGetItemOutputTransformError) + pub fn batch_get_item_output_transform(&self) -> crate::operation::batch_get_item_output_transform::builders::BatchGetItemOutputTransformFluentBuilder { + crate::operation::batch_get_item_output_transform::builders::BatchGetItemOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/batch_write_item_input_transform.rs b/releases/rust/db_esdk/src/client/batch_write_item_input_transform.rs new file mode 100644 index 000000000..eb575d858 --- /dev/null +++ b/releases/rust/db_esdk/src/client/batch_write_item_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`BatchWriteItemInputTransform`](crate::operation::batch_write_item_input_transform::builders::BatchWriteItemInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::batch_write_item_input_transform::builders::BatchWriteItemInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::batch_write_item_input_transform::builders::BatchWriteItemInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`BatchWriteItemInputTransformOutput`](crate::operation::batch_write_item_input_transform::BatchWriteItemInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::batch_write_item_input_transform::BatchWriteItemInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::batch_write_item_input_transform::BatchWriteItemInputTransformError) + pub fn batch_write_item_input_transform(&self) -> crate::operation::batch_write_item_input_transform::builders::BatchWriteItemInputTransformFluentBuilder { + crate::operation::batch_write_item_input_transform::builders::BatchWriteItemInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/batch_write_item_output_transform.rs b/releases/rust/db_esdk/src/client/batch_write_item_output_transform.rs new file mode 100644 index 000000000..3b57660c4 --- /dev/null +++ b/releases/rust/db_esdk/src/client/batch_write_item_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`BatchWriteItemOutputTransform`](crate::operation::batch_write_item_output_transform::builders::BatchWriteItemOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::batch_write_item_output_transform::builders::BatchWriteItemOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::batch_write_item_output_transform::builders::BatchWriteItemOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::batch_write_item_output_transform::builders::BatchWriteItemOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::batch_write_item_output_transform::builders::BatchWriteItemOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`BatchWriteItemOutputTransformOutput`](crate::operation::batch_write_item_output_transform::BatchWriteItemOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::batch_write_item_output_transform::BatchWriteItemOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::batch_write_item_output_transform::BatchWriteItemOutputTransformError) + pub fn batch_write_item_output_transform(&self) -> crate::operation::batch_write_item_output_transform::builders::BatchWriteItemOutputTransformFluentBuilder { + crate::operation::batch_write_item_output_transform::builders::BatchWriteItemOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/delete_item_input_transform.rs b/releases/rust/db_esdk/src/client/delete_item_input_transform.rs new file mode 100644 index 000000000..d0c711f78 --- /dev/null +++ b/releases/rust/db_esdk/src/client/delete_item_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`DeleteItemInputTransform`](crate::operation::delete_item_input_transform::builders::DeleteItemInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::delete_item_input_transform::builders::DeleteItemInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::delete_item_input_transform::builders::DeleteItemInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`DeleteItemInputTransformOutput`](crate::operation::delete_item_input_transform::DeleteItemInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::delete_item_input_transform::DeleteItemInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::delete_item_input_transform::DeleteItemInputTransformError) + pub fn delete_item_input_transform(&self) -> crate::operation::delete_item_input_transform::builders::DeleteItemInputTransformFluentBuilder { + crate::operation::delete_item_input_transform::builders::DeleteItemInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/delete_item_output_transform.rs b/releases/rust/db_esdk/src/client/delete_item_output_transform.rs new file mode 100644 index 000000000..14606a01c --- /dev/null +++ b/releases/rust/db_esdk/src/client/delete_item_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`DeleteItemOutputTransform`](crate::operation::delete_item_output_transform::builders::DeleteItemOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::delete_item_output_transform::builders::DeleteItemOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::delete_item_output_transform::builders::DeleteItemOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::delete_item_output_transform::builders::DeleteItemOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::delete_item_output_transform::builders::DeleteItemOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`DeleteItemOutputTransformOutput`](crate::operation::delete_item_output_transform::DeleteItemOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::delete_item_output_transform::DeleteItemOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::delete_item_output_transform::DeleteItemOutputTransformError) + pub fn delete_item_output_transform(&self) -> crate::operation::delete_item_output_transform::builders::DeleteItemOutputTransformFluentBuilder { + crate::operation::delete_item_output_transform::builders::DeleteItemOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/execute_statement_input_transform.rs b/releases/rust/db_esdk/src/client/execute_statement_input_transform.rs new file mode 100644 index 000000000..463fba5be --- /dev/null +++ b/releases/rust/db_esdk/src/client/execute_statement_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`ExecuteStatementInputTransform`](crate::operation::execute_statement_input_transform::builders::ExecuteStatementInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::execute_statement_input_transform::builders::ExecuteStatementInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::execute_statement_input_transform::builders::ExecuteStatementInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`ExecuteStatementInputTransformOutput`](crate::operation::execute_statement_input_transform::ExecuteStatementInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::execute_statement_input_transform::ExecuteStatementInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::execute_statement_input_transform::ExecuteStatementInputTransformError) + pub fn execute_statement_input_transform(&self) -> crate::operation::execute_statement_input_transform::builders::ExecuteStatementInputTransformFluentBuilder { + crate::operation::execute_statement_input_transform::builders::ExecuteStatementInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/execute_statement_output_transform.rs b/releases/rust/db_esdk/src/client/execute_statement_output_transform.rs new file mode 100644 index 000000000..215364377 --- /dev/null +++ b/releases/rust/db_esdk/src/client/execute_statement_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`ExecuteStatementOutputTransform`](crate::operation::execute_statement_output_transform::builders::ExecuteStatementOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::execute_statement_output_transform::builders::ExecuteStatementOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::execute_statement_output_transform::builders::ExecuteStatementOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::execute_statement_output_transform::builders::ExecuteStatementOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::execute_statement_output_transform::builders::ExecuteStatementOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`ExecuteStatementOutputTransformOutput`](crate::operation::execute_statement_output_transform::ExecuteStatementOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::execute_statement_output_transform::ExecuteStatementOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::execute_statement_output_transform::ExecuteStatementOutputTransformError) + pub fn execute_statement_output_transform(&self) -> crate::operation::execute_statement_output_transform::builders::ExecuteStatementOutputTransformFluentBuilder { + crate::operation::execute_statement_output_transform::builders::ExecuteStatementOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/execute_transaction_input_transform.rs b/releases/rust/db_esdk/src/client/execute_transaction_input_transform.rs new file mode 100644 index 000000000..c278f9d25 --- /dev/null +++ b/releases/rust/db_esdk/src/client/execute_transaction_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`ExecuteTransactionInputTransform`](crate::operation::execute_transaction_input_transform::builders::ExecuteTransactionInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::execute_transaction_input_transform::builders::ExecuteTransactionInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::execute_transaction_input_transform::builders::ExecuteTransactionInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`ExecuteTransactionInputTransformOutput`](crate::operation::execute_transaction_input_transform::ExecuteTransactionInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::execute_transaction_input_transform::ExecuteTransactionInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::execute_transaction_input_transform::ExecuteTransactionInputTransformError) + pub fn execute_transaction_input_transform(&self) -> crate::operation::execute_transaction_input_transform::builders::ExecuteTransactionInputTransformFluentBuilder { + crate::operation::execute_transaction_input_transform::builders::ExecuteTransactionInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/execute_transaction_output_transform.rs b/releases/rust/db_esdk/src/client/execute_transaction_output_transform.rs new file mode 100644 index 000000000..24ceff914 --- /dev/null +++ b/releases/rust/db_esdk/src/client/execute_transaction_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`ExecuteTransactionOutputTransform`](crate::operation::execute_transaction_output_transform::builders::ExecuteTransactionOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::execute_transaction_output_transform::builders::ExecuteTransactionOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::execute_transaction_output_transform::builders::ExecuteTransactionOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::execute_transaction_output_transform::builders::ExecuteTransactionOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::execute_transaction_output_transform::builders::ExecuteTransactionOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`ExecuteTransactionOutputTransformOutput`](crate::operation::execute_transaction_output_transform::ExecuteTransactionOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::execute_transaction_output_transform::ExecuteTransactionOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::execute_transaction_output_transform::ExecuteTransactionOutputTransformError) + pub fn execute_transaction_output_transform(&self) -> crate::operation::execute_transaction_output_transform::builders::ExecuteTransactionOutputTransformFluentBuilder { + crate::operation::execute_transaction_output_transform::builders::ExecuteTransactionOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/get_item_input_transform.rs b/releases/rust/db_esdk/src/client/get_item_input_transform.rs new file mode 100644 index 000000000..9dc6c249c --- /dev/null +++ b/releases/rust/db_esdk/src/client/get_item_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`GetItemInputTransform`](crate::operation::get_item_input_transform::builders::GetItemInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::get_item_input_transform::builders::GetItemInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::get_item_input_transform::builders::GetItemInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`GetItemInputTransformOutput`](crate::operation::get_item_input_transform::GetItemInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::get_item_input_transform::GetItemInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_item_input_transform::GetItemInputTransformError) + pub fn get_item_input_transform(&self) -> crate::operation::get_item_input_transform::builders::GetItemInputTransformFluentBuilder { + crate::operation::get_item_input_transform::builders::GetItemInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/get_item_output_transform.rs b/releases/rust/db_esdk/src/client/get_item_output_transform.rs new file mode 100644 index 000000000..52a253302 --- /dev/null +++ b/releases/rust/db_esdk/src/client/get_item_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`GetItemOutputTransform`](crate::operation::get_item_output_transform::builders::GetItemOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::get_item_output_transform::builders::GetItemOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::get_item_output_transform::builders::GetItemOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::get_item_output_transform::builders::GetItemOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::get_item_output_transform::builders::GetItemOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`GetItemOutputTransformOutput`](crate::operation::get_item_output_transform::GetItemOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::get_item_output_transform::GetItemOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_item_output_transform::GetItemOutputTransformError) + pub fn get_item_output_transform(&self) -> crate::operation::get_item_output_transform::builders::GetItemOutputTransformFluentBuilder { + crate::operation::get_item_output_transform::builders::GetItemOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/put_item_input_transform.rs b/releases/rust/db_esdk/src/client/put_item_input_transform.rs new file mode 100644 index 000000000..96ba7eed1 --- /dev/null +++ b/releases/rust/db_esdk/src/client/put_item_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`PutItemInputTransform`](crate::operation::put_item_input_transform::builders::PutItemInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::put_item_input_transform::builders::PutItemInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::put_item_input_transform::builders::PutItemInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`PutItemInputTransformOutput`](crate::operation::put_item_input_transform::PutItemInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::put_item_input_transform::PutItemInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::put_item_input_transform::PutItemInputTransformError) + pub fn put_item_input_transform(&self) -> crate::operation::put_item_input_transform::builders::PutItemInputTransformFluentBuilder { + crate::operation::put_item_input_transform::builders::PutItemInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/put_item_output_transform.rs b/releases/rust/db_esdk/src/client/put_item_output_transform.rs new file mode 100644 index 000000000..685a48680 --- /dev/null +++ b/releases/rust/db_esdk/src/client/put_item_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`PutItemOutputTransform`](crate::operation::put_item_output_transform::builders::PutItemOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::put_item_output_transform::builders::PutItemOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::put_item_output_transform::builders::PutItemOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::put_item_output_transform::builders::PutItemOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::put_item_output_transform::builders::PutItemOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`PutItemOutputTransformOutput`](crate::operation::put_item_output_transform::PutItemOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::put_item_output_transform::PutItemOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::put_item_output_transform::PutItemOutputTransformError) + pub fn put_item_output_transform(&self) -> crate::operation::put_item_output_transform::builders::PutItemOutputTransformFluentBuilder { + crate::operation::put_item_output_transform::builders::PutItemOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/query_input_transform.rs b/releases/rust/db_esdk/src/client/query_input_transform.rs new file mode 100644 index 000000000..596dd94c0 --- /dev/null +++ b/releases/rust/db_esdk/src/client/query_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`QueryInputTransform`](crate::operation::query_input_transform::builders::QueryInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::query_input_transform::builders::QueryInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::query_input_transform::builders::QueryInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`QueryInputTransformOutput`](crate::operation::query_input_transform::QueryInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::query_input_transform::QueryInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::query_input_transform::QueryInputTransformError) + pub fn query_input_transform(&self) -> crate::operation::query_input_transform::builders::QueryInputTransformFluentBuilder { + crate::operation::query_input_transform::builders::QueryInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/query_output_transform.rs b/releases/rust/db_esdk/src/client/query_output_transform.rs new file mode 100644 index 000000000..4e6a4bd8f --- /dev/null +++ b/releases/rust/db_esdk/src/client/query_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`QueryOutputTransform`](crate::operation::query_output_transform::builders::QueryOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::query_output_transform::builders::QueryOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::query_output_transform::builders::QueryOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::query_output_transform::builders::QueryOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::query_output_transform::builders::QueryOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`QueryOutputTransformOutput`](crate::operation::query_output_transform::QueryOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::query_output_transform::QueryOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::query_output_transform::QueryOutputTransformError) + pub fn query_output_transform(&self) -> crate::operation::query_output_transform::builders::QueryOutputTransformFluentBuilder { + crate::operation::query_output_transform::builders::QueryOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/resolve_attributes.rs b/releases/rust/db_esdk/src/client/resolve_attributes.rs new file mode 100644 index 000000000..df04501d5 --- /dev/null +++ b/releases/rust/db_esdk/src/client/resolve_attributes.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::client::Client { + /// Constructs a fluent builder for the [`ResolveAttributes`](crate::operation::resolve_attributes::builders::ResolveAttributesFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`item(impl Into>>)`](crate::operation::resolve_attributes::builders::ResolveAttributesFluentBuilder::item) / [`set_item(Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>)`](crate::operation::resolve_attributes::builders::ResolveAttributesFluentBuilder::set_item): (undocumented)
+ /// - [`table_name(impl Into>)`](crate::operation::resolve_attributes::builders::ResolveAttributesFluentBuilder::table_name) / [`set_table_name(Option<::std::string::String>)`](crate::operation::resolve_attributes::builders::ResolveAttributesFluentBuilder::set_table_name): (undocumented)
+ /// - [`version(impl Into>)`](crate::operation::resolve_attributes::builders::ResolveAttributesFluentBuilder::version) / [`set_version(Option<::std::primitive::i32>)`](crate::operation::resolve_attributes::builders::ResolveAttributesFluentBuilder::set_version): (undocumented)
+ /// - On success, responds with [`ResolveAttributesOutput`](crate::operation::resolve_attributes::ResolveAttributesOutput) with field(s): + /// - [`compound_beacons(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::resolve_attributes::ResolveAttributesOutput::compound_beacons): (undocumented) + /// - [`virtual_fields(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::resolve_attributes::ResolveAttributesOutput::virtual_fields): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::resolve_attributes::ResolveAttributesError) + pub fn resolve_attributes(&self) -> crate::operation::resolve_attributes::builders::ResolveAttributesFluentBuilder { + crate::operation::resolve_attributes::builders::ResolveAttributesFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/scan_input_transform.rs b/releases/rust/db_esdk/src/client/scan_input_transform.rs new file mode 100644 index 000000000..e311b4b31 --- /dev/null +++ b/releases/rust/db_esdk/src/client/scan_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`ScanInputTransform`](crate::operation::scan_input_transform::builders::ScanInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::scan_input_transform::builders::ScanInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::scan_input_transform::builders::ScanInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`ScanInputTransformOutput`](crate::operation::scan_input_transform::ScanInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::scan_input_transform::ScanInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::scan_input_transform::ScanInputTransformError) + pub fn scan_input_transform(&self) -> crate::operation::scan_input_transform::builders::ScanInputTransformFluentBuilder { + crate::operation::scan_input_transform::builders::ScanInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/scan_output_transform.rs b/releases/rust/db_esdk/src/client/scan_output_transform.rs new file mode 100644 index 000000000..1b77728a7 --- /dev/null +++ b/releases/rust/db_esdk/src/client/scan_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`ScanOutputTransform`](crate::operation::scan_output_transform::builders::ScanOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::scan_output_transform::builders::ScanOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::scan_output_transform::builders::ScanOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::scan_output_transform::builders::ScanOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::scan_output_transform::builders::ScanOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`ScanOutputTransformOutput`](crate::operation::scan_output_transform::ScanOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::scan_output_transform::ScanOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::scan_output_transform::ScanOutputTransformError) + pub fn scan_output_transform(&self) -> crate::operation::scan_output_transform::builders::ScanOutputTransformFluentBuilder { + crate::operation::scan_output_transform::builders::ScanOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/transact_get_items_input_transform.rs b/releases/rust/db_esdk/src/client/transact_get_items_input_transform.rs new file mode 100644 index 000000000..69fe51819 --- /dev/null +++ b/releases/rust/db_esdk/src/client/transact_get_items_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`TransactGetItemsInputTransform`](crate::operation::transact_get_items_input_transform::builders::TransactGetItemsInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::transact_get_items_input_transform::builders::TransactGetItemsInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::transact_get_items_input_transform::builders::TransactGetItemsInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`TransactGetItemsInputTransformOutput`](crate::operation::transact_get_items_input_transform::TransactGetItemsInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::transact_get_items_input_transform::TransactGetItemsInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::transact_get_items_input_transform::TransactGetItemsInputTransformError) + pub fn transact_get_items_input_transform(&self) -> crate::operation::transact_get_items_input_transform::builders::TransactGetItemsInputTransformFluentBuilder { + crate::operation::transact_get_items_input_transform::builders::TransactGetItemsInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/transact_get_items_output_transform.rs b/releases/rust/db_esdk/src/client/transact_get_items_output_transform.rs new file mode 100644 index 000000000..ce7b27d42 --- /dev/null +++ b/releases/rust/db_esdk/src/client/transact_get_items_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`TransactGetItemsOutputTransform`](crate::operation::transact_get_items_output_transform::builders::TransactGetItemsOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::transact_get_items_output_transform::builders::TransactGetItemsOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::transact_get_items_output_transform::builders::TransactGetItemsOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::transact_get_items_output_transform::builders::TransactGetItemsOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::transact_get_items_output_transform::builders::TransactGetItemsOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`TransactGetItemsOutputTransformOutput`](crate::operation::transact_get_items_output_transform::TransactGetItemsOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::transact_get_items_output_transform::TransactGetItemsOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::transact_get_items_output_transform::TransactGetItemsOutputTransformError) + pub fn transact_get_items_output_transform(&self) -> crate::operation::transact_get_items_output_transform::builders::TransactGetItemsOutputTransformFluentBuilder { + crate::operation::transact_get_items_output_transform::builders::TransactGetItemsOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/transact_write_items_input_transform.rs b/releases/rust/db_esdk/src/client/transact_write_items_input_transform.rs new file mode 100644 index 000000000..973714801 --- /dev/null +++ b/releases/rust/db_esdk/src/client/transact_write_items_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`TransactWriteItemsInputTransform`](crate::operation::transact_write_items_input_transform::builders::TransactWriteItemsInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::transact_write_items_input_transform::builders::TransactWriteItemsInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::transact_write_items_input_transform::builders::TransactWriteItemsInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`TransactWriteItemsInputTransformOutput`](crate::operation::transact_write_items_input_transform::TransactWriteItemsInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::transact_write_items_input_transform::TransactWriteItemsInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::transact_write_items_input_transform::TransactWriteItemsInputTransformError) + pub fn transact_write_items_input_transform(&self) -> crate::operation::transact_write_items_input_transform::builders::TransactWriteItemsInputTransformFluentBuilder { + crate::operation::transact_write_items_input_transform::builders::TransactWriteItemsInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/transact_write_items_output_transform.rs b/releases/rust/db_esdk/src/client/transact_write_items_output_transform.rs new file mode 100644 index 000000000..b88327405 --- /dev/null +++ b/releases/rust/db_esdk/src/client/transact_write_items_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`TransactWriteItemsOutputTransform`](crate::operation::transact_write_items_output_transform::builders::TransactWriteItemsOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::transact_write_items_output_transform::builders::TransactWriteItemsOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::transact_write_items_output_transform::builders::TransactWriteItemsOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::transact_write_items_output_transform::builders::TransactWriteItemsOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::transact_write_items_output_transform::builders::TransactWriteItemsOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`TransactWriteItemsOutputTransformOutput`](crate::operation::transact_write_items_output_transform::TransactWriteItemsOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::transact_write_items_output_transform::TransactWriteItemsOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::transact_write_items_output_transform::TransactWriteItemsOutputTransformError) + pub fn transact_write_items_output_transform(&self) -> crate::operation::transact_write_items_output_transform::builders::TransactWriteItemsOutputTransformFluentBuilder { + crate::operation::transact_write_items_output_transform::builders::TransactWriteItemsOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/update_item_input_transform.rs b/releases/rust/db_esdk/src/client/update_item_input_transform.rs new file mode 100644 index 000000000..a9515f83d --- /dev/null +++ b/releases/rust/db_esdk/src/client/update_item_input_transform.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::client::Client { + /// Constructs a fluent builder for the [`UpdateItemInputTransform`](crate::operation::update_item_input_transform::builders::UpdateItemInputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`sdk_input(impl Into>)`](crate::operation::update_item_input_transform::builders::UpdateItemInputTransformFluentBuilder::sdk_input) / [`set_sdk_input(Option)`](crate::operation::update_item_input_transform::builders::UpdateItemInputTransformFluentBuilder::set_sdk_input): (undocumented)
+ /// - On success, responds with [`UpdateItemInputTransformOutput`](crate::operation::update_item_input_transform::UpdateItemInputTransformOutput) with field(s): + /// - [`transformed_input(Option)`](crate::operation::update_item_input_transform::UpdateItemInputTransformOutput::transformed_input): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::update_item_input_transform::UpdateItemInputTransformError) + pub fn update_item_input_transform(&self) -> crate::operation::update_item_input_transform::builders::UpdateItemInputTransformFluentBuilder { + crate::operation::update_item_input_transform::builders::UpdateItemInputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/client/update_item_output_transform.rs b/releases/rust/db_esdk/src/client/update_item_output_transform.rs new file mode 100644 index 000000000..e1a2a0554 --- /dev/null +++ b/releases/rust/db_esdk/src/client/update_item_output_transform.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::client::Client { + /// Constructs a fluent builder for the [`UpdateItemOutputTransform`](crate::operation::update_item_output_transform::builders::UpdateItemOutputTransformFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`original_input(impl Into>)`](crate::operation::update_item_output_transform::builders::UpdateItemOutputTransformFluentBuilder::original_input) / [`set_original_input(Option)`](crate::operation::update_item_output_transform::builders::UpdateItemOutputTransformFluentBuilder::set_original_input): (undocumented)
+ /// - [`sdk_output(impl Into>)`](crate::operation::update_item_output_transform::builders::UpdateItemOutputTransformFluentBuilder::sdk_output) / [`set_sdk_output(Option)`](crate::operation::update_item_output_transform::builders::UpdateItemOutputTransformFluentBuilder::set_sdk_output): (undocumented)
+ /// - On success, responds with [`UpdateItemOutputTransformOutput`](crate::operation::update_item_output_transform::UpdateItemOutputTransformOutput) with field(s): + /// - [`transformed_output(Option)`](crate::operation::update_item_output_transform::UpdateItemOutputTransformOutput::transformed_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::update_item_output_transform::UpdateItemOutputTransformError) + pub fn update_item_output_transform(&self) -> crate::operation::update_item_output_transform::builders::UpdateItemOutputTransformFluentBuilder { + crate::operation::update_item_output_transform::builders::UpdateItemOutputTransformFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/concurrent_call.rs b/releases/rust/db_esdk/src/concurrent_call.rs new file mode 100644 index 000000000..6bafd0c6a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/conversions.rs b/releases/rust/db_esdk/src/conversions.rs new file mode 100644 index 000000000..dc05808bf --- /dev/null +++ b/releases/rust/db_esdk/src/conversions.rs @@ -0,0 +1,170 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// 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 batch_execute_statement_input_transform; + + pub mod batch_execute_statement_input_transform_input; + + pub mod batch_execute_statement_input_transform_output; + + pub mod batch_execute_statement_output_transform; + + pub mod batch_execute_statement_output_transform_input; + + pub mod batch_execute_statement_output_transform_output; + + pub mod batch_get_item_input_transform; + + pub mod batch_get_item_input_transform_input; + + pub mod batch_get_item_input_transform_output; + + pub mod batch_get_item_output_transform; + + pub mod batch_get_item_output_transform_input; + + pub mod batch_get_item_output_transform_output; + + pub mod batch_write_item_input_transform; + + pub mod batch_write_item_input_transform_input; + + pub mod batch_write_item_input_transform_output; + + pub mod batch_write_item_output_transform; + + pub mod batch_write_item_output_transform_input; + + pub mod batch_write_item_output_transform_output; + + pub mod client; + + pub mod delete_item_input_transform; + + pub mod delete_item_input_transform_input; + + pub mod delete_item_input_transform_output; + + pub mod delete_item_output_transform; + + pub mod delete_item_output_transform_input; + + pub mod delete_item_output_transform_output; + + pub mod error; + + pub mod execute_statement_input_transform; + + pub mod execute_statement_input_transform_input; + + pub mod execute_statement_input_transform_output; + + pub mod execute_statement_output_transform; + + pub mod execute_statement_output_transform_input; + + pub mod execute_statement_output_transform_output; + + pub mod execute_transaction_input_transform; + + pub mod execute_transaction_input_transform_input; + + pub mod execute_transaction_input_transform_output; + + pub mod execute_transaction_output_transform; + + pub mod execute_transaction_output_transform_input; + + pub mod execute_transaction_output_transform_output; + + pub mod get_item_input_transform; + + pub mod get_item_input_transform_input; + + pub mod get_item_input_transform_output; + + pub mod get_item_output_transform; + + pub mod get_item_output_transform_input; + + pub mod get_item_output_transform_output; + + pub mod put_item_input_transform; + + pub mod put_item_input_transform_input; + + pub mod put_item_input_transform_output; + + pub mod put_item_output_transform; + + pub mod put_item_output_transform_input; + + pub mod put_item_output_transform_output; + + pub mod query_input_transform; + + pub mod query_input_transform_input; + + pub mod query_input_transform_output; + + pub mod query_output_transform; + + pub mod query_output_transform_input; + + pub mod query_output_transform_output; + + pub mod resolve_attributes; + + pub mod resolve_attributes_input; + + pub mod resolve_attributes_output; + + pub mod scan_input_transform; + + pub mod scan_input_transform_input; + + pub mod scan_input_transform_output; + + pub mod scan_output_transform; + + pub mod scan_output_transform_input; + + pub mod scan_output_transform_output; + + pub mod transact_get_items_input_transform; + + pub mod transact_get_items_input_transform_input; + + pub mod transact_get_items_input_transform_output; + + pub mod transact_get_items_output_transform; + + pub mod transact_get_items_output_transform_input; + + pub mod transact_get_items_output_transform_output; + + pub mod transact_write_items_input_transform; + + pub mod transact_write_items_input_transform_input; + + pub mod transact_write_items_input_transform_output; + + pub mod transact_write_items_output_transform; + + pub mod transact_write_items_output_transform_input; + + pub mod transact_write_items_output_transform_output; + + pub mod update_item_input_transform; + + pub mod update_item_input_transform_input; + + pub mod update_item_input_transform_output; + + pub mod update_item_output_transform; + + pub mod update_item_output_transform_input; + + pub mod update_item_output_transform_output; + +pub mod dynamo_db_tables_encryption_config; diff --git a/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform.rs b/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform.rs new file mode 100644 index 000000000..8f7228ea7 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform.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 _batch_execute_statement_input_transform_input; + + pub mod _batch_execute_statement_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform/_batch_execute_statement_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform/_batch_execute_statement_input_transform_input.rs new file mode 100644 index 000000000..90cb24305 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform/_batch_execute_statement_input_transform_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::operation::batch_execute_statement_input_transform::BatchExecuteStatementInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformInput::BatchExecuteStatementInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformInput, + >, +) -> crate::operation::batch_execute_statement_input_transform::BatchExecuteStatementInputTransformInput { + crate::operation::batch_execute_statement_input_transform::BatchExecuteStatementInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform/_batch_execute_statement_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform/_batch_execute_statement_input_transform_output.rs new file mode 100644 index 000000000..3bd0b5b99 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform/_batch_execute_statement_input_transform_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::operation::batch_execute_statement_input_transform::BatchExecuteStatementInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformOutput::BatchExecuteStatementInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformOutput, + >, +) -> crate::operation::batch_execute_statement_input_transform::BatchExecuteStatementInputTransformOutput { + crate::operation::batch_execute_statement_input_transform::BatchExecuteStatementInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform_input.rs new file mode 100644 index 000000000..dd2e4c420 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform_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::types::BatchExecuteStatementInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchExecuteStatementInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformInput::BatchExecuteStatementInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformInput, + >, +) -> crate::types::BatchExecuteStatementInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformInput, +) -> crate::types::BatchExecuteStatementInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformInput::BatchExecuteStatementInputTransformInput {..} => + crate::types::BatchExecuteStatementInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/batch_execute_statement_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform_output.rs new file mode 100644 index 000000000..19b91b665 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_execute_statement_input_transform_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::types::BatchExecuteStatementInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchExecuteStatementInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformOutput::BatchExecuteStatementInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformOutput, + >, +) -> crate::types::BatchExecuteStatementInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformOutput, +) -> crate::types::BatchExecuteStatementInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformOutput::BatchExecuteStatementInputTransformOutput {..} => + crate::types::BatchExecuteStatementInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/batch_execute_statement_output_transform.rs b/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform.rs new file mode 100644 index 000000000..709024a57 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform.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 _batch_execute_statement_output_transform_input; + + pub mod _batch_execute_statement_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform/_batch_execute_statement_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform/_batch_execute_statement_output_transform_input.rs new file mode 100644 index 000000000..77b9c4ffb --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform/_batch_execute_statement_output_transform_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::operation::batch_execute_statement_output_transform::BatchExecuteStatementOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformInput::BatchExecuteStatementOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformInput, + >, +) -> crate::operation::batch_execute_statement_output_transform::BatchExecuteStatementOutputTransformInput { + crate::operation::batch_execute_statement_output_transform::BatchExecuteStatementOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform/_batch_execute_statement_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform/_batch_execute_statement_output_transform_output.rs new file mode 100644 index 000000000..ed42eabd7 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform/_batch_execute_statement_output_transform_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::operation::batch_execute_statement_output_transform::BatchExecuteStatementOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformOutput::BatchExecuteStatementOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformOutput, + >, +) -> crate::operation::batch_execute_statement_output_transform::BatchExecuteStatementOutputTransformOutput { + crate::operation::batch_execute_statement_output_transform::BatchExecuteStatementOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform_input.rs new file mode 100644 index 000000000..496eca808 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform_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::types::BatchExecuteStatementOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchExecuteStatementOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformInput::BatchExecuteStatementOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformInput, + >, +) -> crate::types::BatchExecuteStatementOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformInput, +) -> crate::types::BatchExecuteStatementOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformInput::BatchExecuteStatementOutputTransformInput {..} => + crate::types::BatchExecuteStatementOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/batch_execute_statement_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform_output.rs new file mode 100644 index 000000000..19388032b --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_execute_statement_output_transform_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::types::BatchExecuteStatementOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchExecuteStatementOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformOutput::BatchExecuteStatementOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformOutput, + >, +) -> crate::types::BatchExecuteStatementOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformOutput, +) -> crate::types::BatchExecuteStatementOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformOutput::BatchExecuteStatementOutputTransformOutput {..} => + crate::types::BatchExecuteStatementOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_execute_statement::_batch_execute_statement_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/batch_get_item_input_transform.rs b/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform.rs new file mode 100644 index 000000000..c79c4e091 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform.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 _batch_get_item_input_transform_input; + + pub mod _batch_get_item_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform/_batch_get_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform/_batch_get_item_input_transform_input.rs new file mode 100644 index 000000000..6b2302f31 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform/_batch_get_item_input_transform_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::operation::batch_get_item_input_transform::BatchGetItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformInput::BatchGetItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformInput, + >, +) -> crate::operation::batch_get_item_input_transform::BatchGetItemInputTransformInput { + crate::operation::batch_get_item_input_transform::BatchGetItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform/_batch_get_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform/_batch_get_item_input_transform_output.rs new file mode 100644 index 000000000..a35aba580 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform/_batch_get_item_input_transform_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::operation::batch_get_item_input_transform::BatchGetItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformOutput::BatchGetItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformOutput, + >, +) -> crate::operation::batch_get_item_input_transform::BatchGetItemInputTransformOutput { + crate::operation::batch_get_item_input_transform::BatchGetItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform_input.rs new file mode 100644 index 000000000..cfbe525a5 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform_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::types::BatchGetItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchGetItemInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformInput::BatchGetItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformInput, + >, +) -> crate::types::BatchGetItemInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformInput, +) -> crate::types::BatchGetItemInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformInput::BatchGetItemInputTransformInput {..} => + crate::types::BatchGetItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/batch_get_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform_output.rs new file mode 100644 index 000000000..c9573c13e --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_get_item_input_transform_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::types::BatchGetItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchGetItemInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformOutput::BatchGetItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformOutput, + >, +) -> crate::types::BatchGetItemInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformOutput, +) -> crate::types::BatchGetItemInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformOutput::BatchGetItemInputTransformOutput {..} => + crate::types::BatchGetItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/batch_get_item_output_transform.rs b/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform.rs new file mode 100644 index 000000000..2eaa537d2 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform.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 _batch_get_item_output_transform_input; + + pub mod _batch_get_item_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform/_batch_get_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform/_batch_get_item_output_transform_input.rs new file mode 100644 index 000000000..6020fe2bc --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform/_batch_get_item_output_transform_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::operation::batch_get_item_output_transform::BatchGetItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformInput::BatchGetItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformInput, + >, +) -> crate::operation::batch_get_item_output_transform::BatchGetItemOutputTransformInput { + crate::operation::batch_get_item_output_transform::BatchGetItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform/_batch_get_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform/_batch_get_item_output_transform_output.rs new file mode 100644 index 000000000..74e15051f --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform/_batch_get_item_output_transform_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::operation::batch_get_item_output_transform::BatchGetItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformOutput::BatchGetItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformOutput, + >, +) -> crate::operation::batch_get_item_output_transform::BatchGetItemOutputTransformOutput { + crate::operation::batch_get_item_output_transform::BatchGetItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform_input.rs new file mode 100644 index 000000000..19a4bb240 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform_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::types::BatchGetItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchGetItemOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformInput::BatchGetItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformInput, + >, +) -> crate::types::BatchGetItemOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformInput, +) -> crate::types::BatchGetItemOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformInput::BatchGetItemOutputTransformInput {..} => + crate::types::BatchGetItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/batch_get_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform_output.rs new file mode 100644 index 000000000..76505702b --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_get_item_output_transform_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::types::BatchGetItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchGetItemOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformOutput::BatchGetItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformOutput, + >, +) -> crate::types::BatchGetItemOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformOutput, +) -> crate::types::BatchGetItemOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformOutput::BatchGetItemOutputTransformOutput {..} => + crate::types::BatchGetItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_get_item::_batch_get_item_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/batch_write_item_input_transform.rs b/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform.rs new file mode 100644 index 000000000..a0954efc7 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform.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 _batch_write_item_input_transform_input; + + pub mod _batch_write_item_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform/_batch_write_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform/_batch_write_item_input_transform_input.rs new file mode 100644 index 000000000..a341ab2ee --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform/_batch_write_item_input_transform_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::operation::batch_write_item_input_transform::BatchWriteItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformInput::BatchWriteItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformInput, + >, +) -> crate::operation::batch_write_item_input_transform::BatchWriteItemInputTransformInput { + crate::operation::batch_write_item_input_transform::BatchWriteItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform/_batch_write_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform/_batch_write_item_input_transform_output.rs new file mode 100644 index 000000000..f126c4493 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform/_batch_write_item_input_transform_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::operation::batch_write_item_input_transform::BatchWriteItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformOutput::BatchWriteItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformOutput, + >, +) -> crate::operation::batch_write_item_input_transform::BatchWriteItemInputTransformOutput { + crate::operation::batch_write_item_input_transform::BatchWriteItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform_input.rs new file mode 100644 index 000000000..99e464dbd --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform_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::types::BatchWriteItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchWriteItemInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformInput::BatchWriteItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformInput, + >, +) -> crate::types::BatchWriteItemInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformInput, +) -> crate::types::BatchWriteItemInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformInput::BatchWriteItemInputTransformInput {..} => + crate::types::BatchWriteItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/batch_write_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform_output.rs new file mode 100644 index 000000000..85943aa8d --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_write_item_input_transform_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::types::BatchWriteItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchWriteItemInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformOutput::BatchWriteItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformOutput, + >, +) -> crate::types::BatchWriteItemInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformOutput, +) -> crate::types::BatchWriteItemInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformOutput::BatchWriteItemInputTransformOutput {..} => + crate::types::BatchWriteItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/batch_write_item_output_transform.rs b/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform.rs new file mode 100644 index 000000000..9dd31eac6 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform.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 _batch_write_item_output_transform_input; + + pub mod _batch_write_item_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform/_batch_write_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform/_batch_write_item_output_transform_input.rs new file mode 100644 index 000000000..307204c1d --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform/_batch_write_item_output_transform_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::operation::batch_write_item_output_transform::BatchWriteItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformInput::BatchWriteItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformInput, + >, +) -> crate::operation::batch_write_item_output_transform::BatchWriteItemOutputTransformInput { + crate::operation::batch_write_item_output_transform::BatchWriteItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform/_batch_write_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform/_batch_write_item_output_transform_output.rs new file mode 100644 index 000000000..b8b4d1f4f --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform/_batch_write_item_output_transform_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::operation::batch_write_item_output_transform::BatchWriteItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformOutput::BatchWriteItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformOutput, + >, +) -> crate::operation::batch_write_item_output_transform::BatchWriteItemOutputTransformOutput { + crate::operation::batch_write_item_output_transform::BatchWriteItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform_input.rs new file mode 100644 index 000000000..9f545059c --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform_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::types::BatchWriteItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchWriteItemOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformInput::BatchWriteItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformInput, + >, +) -> crate::types::BatchWriteItemOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformInput, +) -> crate::types::BatchWriteItemOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformInput::BatchWriteItemOutputTransformInput {..} => + crate::types::BatchWriteItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/batch_write_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform_output.rs new file mode 100644 index 000000000..29f5d2635 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/batch_write_item_output_transform_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::types::BatchWriteItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::BatchWriteItemOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformOutput::BatchWriteItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformOutput, + >, +) -> crate::types::BatchWriteItemOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformOutput, +) -> crate::types::BatchWriteItemOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformOutput::BatchWriteItemOutputTransformOutput {..} => + crate::types::BatchWriteItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::batch_write_item::_batch_write_item_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/client.rs b/releases/rust/db_esdk/src/conversions/client.rs new file mode 100644 index 000000000..5f354865d --- /dev/null +++ b/releases/rust/db_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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::IDynamoDbEncryptionTransformsClient + >, +) -> crate::client::Client { + crate::client::Client { dafny_client: dafny_value } +} diff --git a/releases/rust/db_esdk/src/conversions/delete_item_input_transform.rs b/releases/rust/db_esdk/src/conversions/delete_item_input_transform.rs new file mode 100644 index 000000000..549a3f8bf --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/delete_item_input_transform.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 _delete_item_input_transform_input; + + pub mod _delete_item_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/delete_item_input_transform/_delete_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/delete_item_input_transform/_delete_item_input_transform_input.rs new file mode 100644 index 000000000..741b703ba --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/delete_item_input_transform/_delete_item_input_transform_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::operation::delete_item_input_transform::DeleteItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformInput::DeleteItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformInput, + >, +) -> crate::operation::delete_item_input_transform::DeleteItemInputTransformInput { + crate::operation::delete_item_input_transform::DeleteItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/delete_item_input_transform/_delete_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/delete_item_input_transform/_delete_item_input_transform_output.rs new file mode 100644 index 000000000..c31fd5e3d --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/delete_item_input_transform/_delete_item_input_transform_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::operation::delete_item_input_transform::DeleteItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformOutput::DeleteItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformOutput, + >, +) -> crate::operation::delete_item_input_transform::DeleteItemInputTransformOutput { + crate::operation::delete_item_input_transform::DeleteItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/delete_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/delete_item_input_transform_input.rs new file mode 100644 index 000000000..38f20e438 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/delete_item_input_transform_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::types::DeleteItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::DeleteItemInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformInput::DeleteItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformInput, + >, +) -> crate::types::DeleteItemInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformInput, +) -> crate::types::DeleteItemInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformInput::DeleteItemInputTransformInput {..} => + crate::types::DeleteItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/delete_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/delete_item_input_transform_output.rs new file mode 100644 index 000000000..496182052 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/delete_item_input_transform_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::types::DeleteItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::DeleteItemInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformOutput::DeleteItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformOutput, + >, +) -> crate::types::DeleteItemInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformOutput, +) -> crate::types::DeleteItemInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformOutput::DeleteItemInputTransformOutput {..} => + crate::types::DeleteItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/delete_item_output_transform.rs b/releases/rust/db_esdk/src/conversions/delete_item_output_transform.rs new file mode 100644 index 000000000..cc60d846c --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/delete_item_output_transform.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 _delete_item_output_transform_input; + + pub mod _delete_item_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/delete_item_output_transform/_delete_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/delete_item_output_transform/_delete_item_output_transform_input.rs new file mode 100644 index 000000000..3052ec61e --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/delete_item_output_transform/_delete_item_output_transform_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::operation::delete_item_output_transform::DeleteItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformInput::DeleteItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformInput, + >, +) -> crate::operation::delete_item_output_transform::DeleteItemOutputTransformInput { + crate::operation::delete_item_output_transform::DeleteItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/delete_item_output_transform/_delete_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/delete_item_output_transform/_delete_item_output_transform_output.rs new file mode 100644 index 000000000..67d3288e0 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/delete_item_output_transform/_delete_item_output_transform_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::operation::delete_item_output_transform::DeleteItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformOutput::DeleteItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformOutput, + >, +) -> crate::operation::delete_item_output_transform::DeleteItemOutputTransformOutput { + crate::operation::delete_item_output_transform::DeleteItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/delete_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/delete_item_output_transform_input.rs new file mode 100644 index 000000000..052ccb167 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/delete_item_output_transform_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::types::DeleteItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::DeleteItemOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformInput::DeleteItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformInput, + >, +) -> crate::types::DeleteItemOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformInput, +) -> crate::types::DeleteItemOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformInput::DeleteItemOutputTransformInput {..} => + crate::types::DeleteItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/delete_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/delete_item_output_transform_output.rs new file mode 100644 index 000000000..b287047e5 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/delete_item_output_transform_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::types::DeleteItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::DeleteItemOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformOutput::DeleteItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformOutput, + >, +) -> crate::types::DeleteItemOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformOutput, +) -> crate::types::DeleteItemOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformOutput::DeleteItemOutputTransformOutput {..} => + crate::types::DeleteItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::delete_item::_delete_item_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/dynamo_db_tables_encryption_config.rs b/releases/rust/db_esdk/src/conversions/dynamo_db_tables_encryption_config.rs new file mode 100644 index 000000000..7ee95a747 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/dynamo_db_tables_encryption_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 _dynamo_db_tables_encryption_config; diff --git a/releases/rust/db_esdk/src/conversions/dynamo_db_tables_encryption_config/_dynamo_db_tables_encryption_config.rs b/releases/rust/db_esdk/src/conversions/dynamo_db_tables_encryption_config/_dynamo_db_tables_encryption_config.rs new file mode 100644 index 000000000..4e23c0297 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/dynamo_db_tables_encryption_config/_dynamo_db_tables_encryption_config.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::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig, +> { + ::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::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig, + >, +) -> crate::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig { + plain_from_dafny(&*dafny_value) +} + + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig::DynamoDbTablesEncryptionConfig { + tableEncryptionConfigs: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.table_encryption_configs.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_table_encryption_config::to_dafny(&v.clone()) +, +) +, + } +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig, +) -> crate::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig::DynamoDbTablesEncryptionConfig {..} => + crate::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig::builder() + .set_table_encryption_configs(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.tableEncryptionConfigs(), + |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::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_table_encryption_config::from_dafny(v.clone()) +, +) + )) + .build() + .unwrap() + } +} diff --git a/releases/rust/db_esdk/src/conversions/error.rs b/releases/rust/db_esdk/src/conversions/error.rs new file mode 100644 index 000000000..3f13ebf3a --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/error.rs @@ -0,0 +1,165 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// 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::dbencryptionsdk::dynamodb::transforms::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::DynamoDbEncryptionTransformsException { message } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::DynamoDbEncryptionTransformsException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::types::error::Error::DynamoDB_20120810Error { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::ComAmazonawsDynamodb { + ComAmazonawsDynamodb: crate::deps::com_amazonaws_dynamodb::conversions::error::to_dafny(error), + }, +crate::types::error::Error::DynamoDbEncryptionError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkDynamoDb { + AwsCryptographyDbEncryptionSdkDynamoDb: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::error::to_dafny(error), + }, +crate::types::error::Error::DynamoDbItemEncryptorError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor { + AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::error::to_dafny(error), + }, +crate::types::error::Error::StructuredEncryptionError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkStructuredEncryption { + AwsCryptographyDbEncryptionSdkStructuredEncryption: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::to_dafny(error), + }, +crate::types::error::Error::AwsCryptographicMaterialProvidersError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::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::dbencryptionsdk::dynamodb::transforms::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::dbencryptionsdk::dynamodb::transforms::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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::Opaque { + obj: ::dafny_runtime::Object(obj.0) + }, + crate::types::error::Error::OpaqueWithText { obj, objMessage } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error, + >, +) -> crate::types::error::Error { + match ::std::borrow::Borrow::borrow(&dafny_value) { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::DynamoDbEncryptionTransformsException { message } => + crate::types::error::Error::DynamoDbEncryptionTransformsException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::ComAmazonawsDynamodb { ComAmazonawsDynamodb } => + crate::types::error::Error::DynamoDB_20120810Error { + error: crate::deps::com_amazonaws_dynamodb::conversions::error::from_dafny(ComAmazonawsDynamodb.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkDynamoDb { AwsCryptographyDbEncryptionSdkDynamoDb } => + crate::types::error::Error::DynamoDbEncryptionError { + error: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::error::from_dafny(AwsCryptographyDbEncryptionSdkDynamoDb.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor { AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor } => + crate::types::error::Error::DynamoDbItemEncryptorError { + error: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::error::from_dafny(AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkStructuredEncryption { AwsCryptographyDbEncryptionSdkStructuredEncryption } => + crate::types::error::Error::StructuredEncryptionError { + error: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::from_dafny(AwsCryptographyDbEncryptionSdkStructuredEncryption.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::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::dbencryptionsdk::dynamodb::transforms::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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::Opaque { obj } => + crate::types::error::Error::Opaque { + obj: obj.clone() + }, + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::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::dbencryptionsdk::dynamodb::transforms::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/db_esdk/src/conversions/execute_statement_input_transform.rs b/releases/rust/db_esdk/src/conversions/execute_statement_input_transform.rs new file mode 100644 index 000000000..623a27cff --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_statement_input_transform.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 _execute_statement_input_transform_input; + + pub mod _execute_statement_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/execute_statement_input_transform/_execute_statement_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/execute_statement_input_transform/_execute_statement_input_transform_input.rs new file mode 100644 index 000000000..62a99001e --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_statement_input_transform/_execute_statement_input_transform_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::operation::execute_statement_input_transform::ExecuteStatementInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformInput::ExecuteStatementInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformInput, + >, +) -> crate::operation::execute_statement_input_transform::ExecuteStatementInputTransformInput { + crate::operation::execute_statement_input_transform::ExecuteStatementInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/execute_statement_input_transform/_execute_statement_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/execute_statement_input_transform/_execute_statement_input_transform_output.rs new file mode 100644 index 000000000..38d5e923c --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_statement_input_transform/_execute_statement_input_transform_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::operation::execute_statement_input_transform::ExecuteStatementInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformOutput::ExecuteStatementInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformOutput, + >, +) -> crate::operation::execute_statement_input_transform::ExecuteStatementInputTransformOutput { + crate::operation::execute_statement_input_transform::ExecuteStatementInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/execute_statement_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/execute_statement_input_transform_input.rs new file mode 100644 index 000000000..2ddc2bd01 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_statement_input_transform_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::types::ExecuteStatementInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ExecuteStatementInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformInput::ExecuteStatementInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformInput, + >, +) -> crate::types::ExecuteStatementInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformInput, +) -> crate::types::ExecuteStatementInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformInput::ExecuteStatementInputTransformInput {..} => + crate::types::ExecuteStatementInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/execute_statement_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/execute_statement_input_transform_output.rs new file mode 100644 index 000000000..398becff2 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_statement_input_transform_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::types::ExecuteStatementInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ExecuteStatementInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformOutput::ExecuteStatementInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformOutput, + >, +) -> crate::types::ExecuteStatementInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformOutput, +) -> crate::types::ExecuteStatementInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformOutput::ExecuteStatementInputTransformOutput {..} => + crate::types::ExecuteStatementInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/execute_statement_output_transform.rs b/releases/rust/db_esdk/src/conversions/execute_statement_output_transform.rs new file mode 100644 index 000000000..c164f7c6b --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_statement_output_transform.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 _execute_statement_output_transform_input; + + pub mod _execute_statement_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/execute_statement_output_transform/_execute_statement_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/execute_statement_output_transform/_execute_statement_output_transform_input.rs new file mode 100644 index 000000000..4f2f8ecf8 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_statement_output_transform/_execute_statement_output_transform_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::operation::execute_statement_output_transform::ExecuteStatementOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformInput::ExecuteStatementOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformInput, + >, +) -> crate::operation::execute_statement_output_transform::ExecuteStatementOutputTransformInput { + crate::operation::execute_statement_output_transform::ExecuteStatementOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/execute_statement_output_transform/_execute_statement_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/execute_statement_output_transform/_execute_statement_output_transform_output.rs new file mode 100644 index 000000000..69144974e --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_statement_output_transform/_execute_statement_output_transform_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::operation::execute_statement_output_transform::ExecuteStatementOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformOutput::ExecuteStatementOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformOutput, + >, +) -> crate::operation::execute_statement_output_transform::ExecuteStatementOutputTransformOutput { + crate::operation::execute_statement_output_transform::ExecuteStatementOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/execute_statement_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/execute_statement_output_transform_input.rs new file mode 100644 index 000000000..7f777c273 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_statement_output_transform_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::types::ExecuteStatementOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ExecuteStatementOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformInput::ExecuteStatementOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformInput, + >, +) -> crate::types::ExecuteStatementOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformInput, +) -> crate::types::ExecuteStatementOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformInput::ExecuteStatementOutputTransformInput {..} => + crate::types::ExecuteStatementOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/execute_statement_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/execute_statement_output_transform_output.rs new file mode 100644 index 000000000..5f67fadce --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_statement_output_transform_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::types::ExecuteStatementOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ExecuteStatementOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformOutput::ExecuteStatementOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformOutput, + >, +) -> crate::types::ExecuteStatementOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformOutput, +) -> crate::types::ExecuteStatementOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformOutput::ExecuteStatementOutputTransformOutput {..} => + crate::types::ExecuteStatementOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_statement::_execute_statement_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/execute_transaction_input_transform.rs b/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform.rs new file mode 100644 index 000000000..c8b73c60d --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform.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 _execute_transaction_input_transform_input; + + pub mod _execute_transaction_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform/_execute_transaction_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform/_execute_transaction_input_transform_input.rs new file mode 100644 index 000000000..e125eb4cf --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform/_execute_transaction_input_transform_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::operation::execute_transaction_input_transform::ExecuteTransactionInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformInput::ExecuteTransactionInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformInput, + >, +) -> crate::operation::execute_transaction_input_transform::ExecuteTransactionInputTransformInput { + crate::operation::execute_transaction_input_transform::ExecuteTransactionInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform/_execute_transaction_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform/_execute_transaction_input_transform_output.rs new file mode 100644 index 000000000..0c5e14fe2 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform/_execute_transaction_input_transform_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::operation::execute_transaction_input_transform::ExecuteTransactionInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformOutput::ExecuteTransactionInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformOutput, + >, +) -> crate::operation::execute_transaction_input_transform::ExecuteTransactionInputTransformOutput { + crate::operation::execute_transaction_input_transform::ExecuteTransactionInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform_input.rs new file mode 100644 index 000000000..e0dfbd914 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform_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::types::ExecuteTransactionInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ExecuteTransactionInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformInput::ExecuteTransactionInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformInput, + >, +) -> crate::types::ExecuteTransactionInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformInput, +) -> crate::types::ExecuteTransactionInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformInput::ExecuteTransactionInputTransformInput {..} => + crate::types::ExecuteTransactionInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/execute_transaction_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform_output.rs new file mode 100644 index 000000000..de9435ba9 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_transaction_input_transform_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::types::ExecuteTransactionInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ExecuteTransactionInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformOutput::ExecuteTransactionInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformOutput, + >, +) -> crate::types::ExecuteTransactionInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformOutput, +) -> crate::types::ExecuteTransactionInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformOutput::ExecuteTransactionInputTransformOutput {..} => + crate::types::ExecuteTransactionInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/execute_transaction_output_transform.rs b/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform.rs new file mode 100644 index 000000000..ab3254896 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform.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 _execute_transaction_output_transform_input; + + pub mod _execute_transaction_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform/_execute_transaction_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform/_execute_transaction_output_transform_input.rs new file mode 100644 index 000000000..99f334f79 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform/_execute_transaction_output_transform_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::operation::execute_transaction_output_transform::ExecuteTransactionOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformInput::ExecuteTransactionOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformInput, + >, +) -> crate::operation::execute_transaction_output_transform::ExecuteTransactionOutputTransformInput { + crate::operation::execute_transaction_output_transform::ExecuteTransactionOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform/_execute_transaction_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform/_execute_transaction_output_transform_output.rs new file mode 100644 index 000000000..89633bee2 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform/_execute_transaction_output_transform_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::operation::execute_transaction_output_transform::ExecuteTransactionOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformOutput::ExecuteTransactionOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformOutput, + >, +) -> crate::operation::execute_transaction_output_transform::ExecuteTransactionOutputTransformOutput { + crate::operation::execute_transaction_output_transform::ExecuteTransactionOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform_input.rs new file mode 100644 index 000000000..e0b55696f --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform_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::types::ExecuteTransactionOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ExecuteTransactionOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformInput::ExecuteTransactionOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformInput, + >, +) -> crate::types::ExecuteTransactionOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformInput, +) -> crate::types::ExecuteTransactionOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformInput::ExecuteTransactionOutputTransformInput {..} => + crate::types::ExecuteTransactionOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/execute_transaction_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform_output.rs new file mode 100644 index 000000000..03c6fa82c --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/execute_transaction_output_transform_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::types::ExecuteTransactionOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ExecuteTransactionOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformOutput::ExecuteTransactionOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformOutput, + >, +) -> crate::types::ExecuteTransactionOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformOutput, +) -> crate::types::ExecuteTransactionOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformOutput::ExecuteTransactionOutputTransformOutput {..} => + crate::types::ExecuteTransactionOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::execute_transaction::_execute_transaction_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/get_item_input_transform.rs b/releases/rust/db_esdk/src/conversions/get_item_input_transform.rs new file mode 100644 index 000000000..291c941fc --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/get_item_input_transform.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_item_input_transform_input; + + pub mod _get_item_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/get_item_input_transform/_get_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/get_item_input_transform/_get_item_input_transform_input.rs new file mode 100644 index 000000000..97e4c607d --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/get_item_input_transform/_get_item_input_transform_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::operation::get_item_input_transform::GetItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformInput::GetItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformInput, + >, +) -> crate::operation::get_item_input_transform::GetItemInputTransformInput { + crate::operation::get_item_input_transform::GetItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/get_item_input_transform/_get_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/get_item_input_transform/_get_item_input_transform_output.rs new file mode 100644 index 000000000..93d94c2d5 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/get_item_input_transform/_get_item_input_transform_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::operation::get_item_input_transform::GetItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformOutput::GetItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformOutput, + >, +) -> crate::operation::get_item_input_transform::GetItemInputTransformOutput { + crate::operation::get_item_input_transform::GetItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/get_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/get_item_input_transform_input.rs new file mode 100644 index 000000000..055b2e0ff --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/get_item_input_transform_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::types::GetItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::GetItemInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformInput::GetItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformInput, + >, +) -> crate::types::GetItemInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformInput, +) -> crate::types::GetItemInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformInput::GetItemInputTransformInput {..} => + crate::types::GetItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/get_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/get_item_input_transform_output.rs new file mode 100644 index 000000000..3c4c77362 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/get_item_input_transform_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::types::GetItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::GetItemInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformOutput::GetItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformOutput, + >, +) -> crate::types::GetItemInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformOutput, +) -> crate::types::GetItemInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformOutput::GetItemInputTransformOutput {..} => + crate::types::GetItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/get_item_output_transform.rs b/releases/rust/db_esdk/src/conversions/get_item_output_transform.rs new file mode 100644 index 000000000..378f3d2a7 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/get_item_output_transform.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_item_output_transform_input; + + pub mod _get_item_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/get_item_output_transform/_get_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/get_item_output_transform/_get_item_output_transform_input.rs new file mode 100644 index 000000000..9425250f2 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/get_item_output_transform/_get_item_output_transform_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::operation::get_item_output_transform::GetItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformInput::GetItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformInput, + >, +) -> crate::operation::get_item_output_transform::GetItemOutputTransformInput { + crate::operation::get_item_output_transform::GetItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/get_item_output_transform/_get_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/get_item_output_transform/_get_item_output_transform_output.rs new file mode 100644 index 000000000..4bd50150e --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/get_item_output_transform/_get_item_output_transform_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::operation::get_item_output_transform::GetItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformOutput::GetItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformOutput, + >, +) -> crate::operation::get_item_output_transform::GetItemOutputTransformOutput { + crate::operation::get_item_output_transform::GetItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/get_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/get_item_output_transform_input.rs new file mode 100644 index 000000000..fd38e6695 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/get_item_output_transform_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::types::GetItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::GetItemOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformInput::GetItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformInput, + >, +) -> crate::types::GetItemOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformInput, +) -> crate::types::GetItemOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformInput::GetItemOutputTransformInput {..} => + crate::types::GetItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/get_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/get_item_output_transform_output.rs new file mode 100644 index 000000000..d5795b5d8 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/get_item_output_transform_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::types::GetItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::GetItemOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformOutput::GetItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformOutput, + >, +) -> crate::types::GetItemOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformOutput, +) -> crate::types::GetItemOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformOutput::GetItemOutputTransformOutput {..} => + crate::types::GetItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::get_item::_get_item_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/put_item_input_transform.rs b/releases/rust/db_esdk/src/conversions/put_item_input_transform.rs new file mode 100644 index 000000000..ae7812760 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/put_item_input_transform.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 _put_item_input_transform_input; + + pub mod _put_item_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/put_item_input_transform/_put_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/put_item_input_transform/_put_item_input_transform_input.rs new file mode 100644 index 000000000..d46a9626c --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/put_item_input_transform/_put_item_input_transform_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::operation::put_item_input_transform::PutItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformInput::PutItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformInput, + >, +) -> crate::operation::put_item_input_transform::PutItemInputTransformInput { + crate::operation::put_item_input_transform::PutItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/put_item_input_transform/_put_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/put_item_input_transform/_put_item_input_transform_output.rs new file mode 100644 index 000000000..2de239237 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/put_item_input_transform/_put_item_input_transform_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::operation::put_item_input_transform::PutItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformOutput::PutItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformOutput, + >, +) -> crate::operation::put_item_input_transform::PutItemInputTransformOutput { + crate::operation::put_item_input_transform::PutItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/put_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/put_item_input_transform_input.rs new file mode 100644 index 000000000..7ee3224b9 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/put_item_input_transform_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::types::PutItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::PutItemInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformInput::PutItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformInput, + >, +) -> crate::types::PutItemInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformInput, +) -> crate::types::PutItemInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformInput::PutItemInputTransformInput {..} => + crate::types::PutItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/put_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/put_item_input_transform_output.rs new file mode 100644 index 000000000..f6100a1c8 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/put_item_input_transform_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::types::PutItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::PutItemInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformOutput::PutItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformOutput, + >, +) -> crate::types::PutItemInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformOutput, +) -> crate::types::PutItemInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformOutput::PutItemInputTransformOutput {..} => + crate::types::PutItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/put_item_output_transform.rs b/releases/rust/db_esdk/src/conversions/put_item_output_transform.rs new file mode 100644 index 000000000..9f15f5b5f --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/put_item_output_transform.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 _put_item_output_transform_input; + + pub mod _put_item_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/put_item_output_transform/_put_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/put_item_output_transform/_put_item_output_transform_input.rs new file mode 100644 index 000000000..2dfa26e7c --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/put_item_output_transform/_put_item_output_transform_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::operation::put_item_output_transform::PutItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformInput::PutItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformInput, + >, +) -> crate::operation::put_item_output_transform::PutItemOutputTransformInput { + crate::operation::put_item_output_transform::PutItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/put_item_output_transform/_put_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/put_item_output_transform/_put_item_output_transform_output.rs new file mode 100644 index 000000000..fb151dbf0 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/put_item_output_transform/_put_item_output_transform_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::operation::put_item_output_transform::PutItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformOutput::PutItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformOutput, + >, +) -> crate::operation::put_item_output_transform::PutItemOutputTransformOutput { + crate::operation::put_item_output_transform::PutItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/put_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/put_item_output_transform_input.rs new file mode 100644 index 000000000..5b8fc043d --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/put_item_output_transform_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::types::PutItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::PutItemOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformInput::PutItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformInput, + >, +) -> crate::types::PutItemOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformInput, +) -> crate::types::PutItemOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformInput::PutItemOutputTransformInput {..} => + crate::types::PutItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/put_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/put_item_output_transform_output.rs new file mode 100644 index 000000000..30d25a9f4 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/put_item_output_transform_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::types::PutItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::PutItemOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformOutput::PutItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformOutput, + >, +) -> crate::types::PutItemOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformOutput, +) -> crate::types::PutItemOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformOutput::PutItemOutputTransformOutput {..} => + crate::types::PutItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::put_item::_put_item_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/query_input_transform.rs b/releases/rust/db_esdk/src/conversions/query_input_transform.rs new file mode 100644 index 000000000..fa4f8194e --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/query_input_transform.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 _query_input_transform_input; + + pub mod _query_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/query_input_transform/_query_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/query_input_transform/_query_input_transform_input.rs new file mode 100644 index 000000000..0c9f508dc --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/query_input_transform/_query_input_transform_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::operation::query_input_transform::QueryInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformInput::QueryInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformInput, + >, +) -> crate::operation::query_input_transform::QueryInputTransformInput { + crate::operation::query_input_transform::QueryInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/query_input_transform/_query_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/query_input_transform/_query_input_transform_output.rs new file mode 100644 index 000000000..1db17c253 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/query_input_transform/_query_input_transform_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::operation::query_input_transform::QueryInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformOutput::QueryInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformOutput, + >, +) -> crate::operation::query_input_transform::QueryInputTransformOutput { + crate::operation::query_input_transform::QueryInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/query_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/query_input_transform_input.rs new file mode 100644 index 000000000..18d3653e9 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/query_input_transform_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::types::QueryInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::QueryInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformInput::QueryInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformInput, + >, +) -> crate::types::QueryInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformInput, +) -> crate::types::QueryInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformInput::QueryInputTransformInput {..} => + crate::types::QueryInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/query_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/query_input_transform_output.rs new file mode 100644 index 000000000..109d1f9c5 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/query_input_transform_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::types::QueryInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::QueryInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformOutput::QueryInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformOutput, + >, +) -> crate::types::QueryInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformOutput, +) -> crate::types::QueryInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformOutput::QueryInputTransformOutput {..} => + crate::types::QueryInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/query_output_transform.rs b/releases/rust/db_esdk/src/conversions/query_output_transform.rs new file mode 100644 index 000000000..4fef09c70 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/query_output_transform.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 _query_output_transform_input; + + pub mod _query_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/query_output_transform/_query_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/query_output_transform/_query_output_transform_input.rs new file mode 100644 index 000000000..c67dfd5e6 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/query_output_transform/_query_output_transform_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::operation::query_output_transform::QueryOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformInput::QueryOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::query::_query_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformInput, + >, +) -> crate::operation::query_output_transform::QueryOutputTransformInput { + crate::operation::query_output_transform::QueryOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::query::_query_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/query_output_transform/_query_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/query_output_transform/_query_output_transform_output.rs new file mode 100644 index 000000000..b87ee96dc --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/query_output_transform/_query_output_transform_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::operation::query_output_transform::QueryOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformOutput::QueryOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::query::_query_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformOutput, + >, +) -> crate::operation::query_output_transform::QueryOutputTransformOutput { + crate::operation::query_output_transform::QueryOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::query::_query_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/query_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/query_output_transform_input.rs new file mode 100644 index 000000000..1f8a5ab1e --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/query_output_transform_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::types::QueryOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::QueryOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformInput::QueryOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::query::_query_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformInput, + >, +) -> crate::types::QueryOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformInput, +) -> crate::types::QueryOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformInput::QueryOutputTransformInput {..} => + crate::types::QueryOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::query::_query_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::query::_query_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/query_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/query_output_transform_output.rs new file mode 100644 index 000000000..0e3525a5d --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/query_output_transform_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::types::QueryOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::QueryOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformOutput::QueryOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::query::_query_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformOutput, + >, +) -> crate::types::QueryOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformOutput, +) -> crate::types::QueryOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformOutput::QueryOutputTransformOutput {..} => + crate::types::QueryOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::query::_query_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/resolve_attributes.rs b/releases/rust/db_esdk/src/conversions/resolve_attributes.rs new file mode 100644 index 000000000..67c2846e2 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/resolve_attributes.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 _resolve_attributes_input; + + pub mod _resolve_attributes_output; diff --git a/releases/rust/db_esdk/src/conversions/resolve_attributes/_resolve_attributes_input.rs b/releases/rust/db_esdk/src/conversions/resolve_attributes/_resolve_attributes_input.rs new file mode 100644 index 000000000..115aa5932 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/resolve_attributes/_resolve_attributes_input.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. +#[allow(dead_code)] +pub fn to_dafny( + value: crate::operation::resolve_attributes::ResolveAttributesInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesInput::ResolveAttributesInput { + 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.clone()) +, +) +, + Version: crate::standard_library_conversions::oint_to_dafny(value.version), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesInput, + >, +) -> crate::operation::resolve_attributes::ResolveAttributesInput { + crate::operation::resolve_attributes::ResolveAttributesInput::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_version(crate::standard_library_conversions::oint_from_dafny(dafny_value.Version().clone())) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/resolve_attributes/_resolve_attributes_output.rs b/releases/rust/db_esdk/src/conversions/resolve_attributes/_resolve_attributes_output.rs new file mode 100644 index 000000000..1a96ae415 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/resolve_attributes/_resolve_attributes_output.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: crate::operation::resolve_attributes::ResolveAttributesOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesOutput::ResolveAttributesOutput { + VirtualFields: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.virtual_fields.clone().unwrap(), + |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), +) +, + CompoundBeacons: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.compound_beacons.clone().unwrap(), + |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), +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesOutput, + >, +) -> crate::operation::resolve_attributes::ResolveAttributesOutput { + crate::operation::resolve_attributes::ResolveAttributesOutput::builder() + .set_virtual_fields(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.VirtualFields(), + |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), +) + )) + .set_compound_beacons(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.CompoundBeacons(), + |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), +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/resolve_attributes_input.rs b/releases/rust/db_esdk/src/conversions/resolve_attributes_input.rs new file mode 100644 index 000000000..4cb22b7bf --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/resolve_attributes_input.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: &crate::types::ResolveAttributesInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ResolveAttributesInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesInput::ResolveAttributesInput { + 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.clone()) +, +) +, + Version: crate::standard_library_conversions::oint_to_dafny(value.version), + } +} + +#[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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesInput, + >, +) -> crate::types::ResolveAttributesInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesInput, +) -> crate::types::ResolveAttributesInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesInput::ResolveAttributesInput {..} => + crate::types::ResolveAttributesInput::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_version(crate::standard_library_conversions::oint_from_dafny(dafny_value.Version().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/db_esdk/src/conversions/resolve_attributes_output.rs b/releases/rust/db_esdk/src/conversions/resolve_attributes_output.rs new file mode 100644 index 000000000..b2361c634 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/resolve_attributes_output.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: &crate::types::ResolveAttributesOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ResolveAttributesOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesOutput::ResolveAttributesOutput { + VirtualFields: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.virtual_fields.clone().unwrap(), + |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), +) +, + CompoundBeacons: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.compound_beacons.clone().unwrap(), + |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), +) +, + } +} + +#[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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesOutput, + >, +) -> crate::types::ResolveAttributesOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesOutput, +) -> crate::types::ResolveAttributesOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesOutput::ResolveAttributesOutput {..} => + crate::types::ResolveAttributesOutput::builder() + .set_virtual_fields(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.VirtualFields(), + |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), +) + )) + .set_compound_beacons(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.CompoundBeacons(), + |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), +) + )) + .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/db_esdk/src/conversions/scan_input_transform.rs b/releases/rust/db_esdk/src/conversions/scan_input_transform.rs new file mode 100644 index 000000000..3522c4761 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/scan_input_transform.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 _scan_input_transform_input; + + pub mod _scan_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/scan_input_transform/_scan_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/scan_input_transform/_scan_input_transform_input.rs new file mode 100644 index 000000000..832d3a502 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/scan_input_transform/_scan_input_transform_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::operation::scan_input_transform::ScanInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformInput::ScanInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformInput, + >, +) -> crate::operation::scan_input_transform::ScanInputTransformInput { + crate::operation::scan_input_transform::ScanInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/scan_input_transform/_scan_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/scan_input_transform/_scan_input_transform_output.rs new file mode 100644 index 000000000..cea32e028 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/scan_input_transform/_scan_input_transform_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::operation::scan_input_transform::ScanInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformOutput::ScanInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformOutput, + >, +) -> crate::operation::scan_input_transform::ScanInputTransformOutput { + crate::operation::scan_input_transform::ScanInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/scan_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/scan_input_transform_input.rs new file mode 100644 index 000000000..16241314b --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/scan_input_transform_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::types::ScanInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ScanInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformInput::ScanInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformInput, + >, +) -> crate::types::ScanInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformInput, +) -> crate::types::ScanInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformInput::ScanInputTransformInput {..} => + crate::types::ScanInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/scan_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/scan_input_transform_output.rs new file mode 100644 index 000000000..ecc5ff025 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/scan_input_transform_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::types::ScanInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ScanInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformOutput::ScanInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformOutput, + >, +) -> crate::types::ScanInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformOutput, +) -> crate::types::ScanInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformOutput::ScanInputTransformOutput {..} => + crate::types::ScanInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/scan_output_transform.rs b/releases/rust/db_esdk/src/conversions/scan_output_transform.rs new file mode 100644 index 000000000..c28b8aa5c --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/scan_output_transform.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 _scan_output_transform_input; + + pub mod _scan_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/scan_output_transform/_scan_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/scan_output_transform/_scan_output_transform_input.rs new file mode 100644 index 000000000..ff3cfc2c5 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/scan_output_transform/_scan_output_transform_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::operation::scan_output_transform::ScanOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformInput::ScanOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformInput, + >, +) -> crate::operation::scan_output_transform::ScanOutputTransformInput { + crate::operation::scan_output_transform::ScanOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/scan_output_transform/_scan_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/scan_output_transform/_scan_output_transform_output.rs new file mode 100644 index 000000000..85e3e99a6 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/scan_output_transform/_scan_output_transform_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::operation::scan_output_transform::ScanOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformOutput::ScanOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformOutput, + >, +) -> crate::operation::scan_output_transform::ScanOutputTransformOutput { + crate::operation::scan_output_transform::ScanOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/scan_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/scan_output_transform_input.rs new file mode 100644 index 000000000..60c37fe70 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/scan_output_transform_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::types::ScanOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ScanOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformInput::ScanOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformInput, + >, +) -> crate::types::ScanOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformInput, +) -> crate::types::ScanOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformInput::ScanOutputTransformInput {..} => + crate::types::ScanOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/scan_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/scan_output_transform_output.rs new file mode 100644 index 000000000..fd5281304 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/scan_output_transform_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::types::ScanOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::ScanOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformOutput::ScanOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformOutput, + >, +) -> crate::types::ScanOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformOutput, +) -> crate::types::ScanOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformOutput::ScanOutputTransformOutput {..} => + crate::types::ScanOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::scan::_scan_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/transact_get_items_input_transform.rs b/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform.rs new file mode 100644 index 000000000..e0adeea75 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform.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 _transact_get_items_input_transform_input; + + pub mod _transact_get_items_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform/_transact_get_items_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform/_transact_get_items_input_transform_input.rs new file mode 100644 index 000000000..635f4747f --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform/_transact_get_items_input_transform_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::operation::transact_get_items_input_transform::TransactGetItemsInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformInput::TransactGetItemsInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformInput, + >, +) -> crate::operation::transact_get_items_input_transform::TransactGetItemsInputTransformInput { + crate::operation::transact_get_items_input_transform::TransactGetItemsInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform/_transact_get_items_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform/_transact_get_items_input_transform_output.rs new file mode 100644 index 000000000..a043e758f --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform/_transact_get_items_input_transform_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::operation::transact_get_items_input_transform::TransactGetItemsInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformOutput::TransactGetItemsInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformOutput, + >, +) -> crate::operation::transact_get_items_input_transform::TransactGetItemsInputTransformOutput { + crate::operation::transact_get_items_input_transform::TransactGetItemsInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform_input.rs new file mode 100644 index 000000000..5f2dce84b --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform_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::types::TransactGetItemsInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::TransactGetItemsInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformInput::TransactGetItemsInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformInput, + >, +) -> crate::types::TransactGetItemsInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformInput, +) -> crate::types::TransactGetItemsInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformInput::TransactGetItemsInputTransformInput {..} => + crate::types::TransactGetItemsInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/transact_get_items_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform_output.rs new file mode 100644 index 000000000..599816f60 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_get_items_input_transform_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::types::TransactGetItemsInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::TransactGetItemsInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformOutput::TransactGetItemsInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformOutput, + >, +) -> crate::types::TransactGetItemsInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformOutput, +) -> crate::types::TransactGetItemsInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformOutput::TransactGetItemsInputTransformOutput {..} => + crate::types::TransactGetItemsInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/transact_get_items_output_transform.rs b/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform.rs new file mode 100644 index 000000000..5e29eb4bf --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform.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 _transact_get_items_output_transform_input; + + pub mod _transact_get_items_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform/_transact_get_items_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform/_transact_get_items_output_transform_input.rs new file mode 100644 index 000000000..79332cff9 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform/_transact_get_items_output_transform_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::operation::transact_get_items_output_transform::TransactGetItemsOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformInput::TransactGetItemsOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformInput, + >, +) -> crate::operation::transact_get_items_output_transform::TransactGetItemsOutputTransformInput { + crate::operation::transact_get_items_output_transform::TransactGetItemsOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform/_transact_get_items_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform/_transact_get_items_output_transform_output.rs new file mode 100644 index 000000000..33f034b8f --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform/_transact_get_items_output_transform_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::operation::transact_get_items_output_transform::TransactGetItemsOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformOutput::TransactGetItemsOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformOutput, + >, +) -> crate::operation::transact_get_items_output_transform::TransactGetItemsOutputTransformOutput { + crate::operation::transact_get_items_output_transform::TransactGetItemsOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform_input.rs new file mode 100644 index 000000000..7f33846c9 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform_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::types::TransactGetItemsOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::TransactGetItemsOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformInput::TransactGetItemsOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformInput, + >, +) -> crate::types::TransactGetItemsOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformInput, +) -> crate::types::TransactGetItemsOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformInput::TransactGetItemsOutputTransformInput {..} => + crate::types::TransactGetItemsOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/transact_get_items_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform_output.rs new file mode 100644 index 000000000..54436d43f --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_get_items_output_transform_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::types::TransactGetItemsOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::TransactGetItemsOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformOutput::TransactGetItemsOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformOutput, + >, +) -> crate::types::TransactGetItemsOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformOutput, +) -> crate::types::TransactGetItemsOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformOutput::TransactGetItemsOutputTransformOutput {..} => + crate::types::TransactGetItemsOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_get_items::_transact_get_items_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/transact_write_items_input_transform.rs b/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform.rs new file mode 100644 index 000000000..d22463100 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform.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 _transact_write_items_input_transform_input; + + pub mod _transact_write_items_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform/_transact_write_items_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform/_transact_write_items_input_transform_input.rs new file mode 100644 index 000000000..3c1d3d0af --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform/_transact_write_items_input_transform_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::operation::transact_write_items_input_transform::TransactWriteItemsInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformInput::TransactWriteItemsInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformInput, + >, +) -> crate::operation::transact_write_items_input_transform::TransactWriteItemsInputTransformInput { + crate::operation::transact_write_items_input_transform::TransactWriteItemsInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform/_transact_write_items_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform/_transact_write_items_input_transform_output.rs new file mode 100644 index 000000000..d8d5afe1b --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform/_transact_write_items_input_transform_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::operation::transact_write_items_input_transform::TransactWriteItemsInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformOutput::TransactWriteItemsInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformOutput, + >, +) -> crate::operation::transact_write_items_input_transform::TransactWriteItemsInputTransformOutput { + crate::operation::transact_write_items_input_transform::TransactWriteItemsInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform_input.rs new file mode 100644 index 000000000..e42e801cc --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform_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::types::TransactWriteItemsInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::TransactWriteItemsInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformInput::TransactWriteItemsInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformInput, + >, +) -> crate::types::TransactWriteItemsInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformInput, +) -> crate::types::TransactWriteItemsInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformInput::TransactWriteItemsInputTransformInput {..} => + crate::types::TransactWriteItemsInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/transact_write_items_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform_output.rs new file mode 100644 index 000000000..d4205e019 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_write_items_input_transform_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::types::TransactWriteItemsInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::TransactWriteItemsInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformOutput::TransactWriteItemsInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformOutput, + >, +) -> crate::types::TransactWriteItemsInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformOutput, +) -> crate::types::TransactWriteItemsInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformOutput::TransactWriteItemsInputTransformOutput {..} => + crate::types::TransactWriteItemsInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/transact_write_items_output_transform.rs b/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform.rs new file mode 100644 index 000000000..0db34027b --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform.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 _transact_write_items_output_transform_input; + + pub mod _transact_write_items_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform/_transact_write_items_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform/_transact_write_items_output_transform_input.rs new file mode 100644 index 000000000..2029c3dcb --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform/_transact_write_items_output_transform_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::operation::transact_write_items_output_transform::TransactWriteItemsOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformInput::TransactWriteItemsOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformInput, + >, +) -> crate::operation::transact_write_items_output_transform::TransactWriteItemsOutputTransformInput { + crate::operation::transact_write_items_output_transform::TransactWriteItemsOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform/_transact_write_items_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform/_transact_write_items_output_transform_output.rs new file mode 100644 index 000000000..9a4144825 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform/_transact_write_items_output_transform_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::operation::transact_write_items_output_transform::TransactWriteItemsOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformOutput::TransactWriteItemsOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformOutput, + >, +) -> crate::operation::transact_write_items_output_transform::TransactWriteItemsOutputTransformOutput { + crate::operation::transact_write_items_output_transform::TransactWriteItemsOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform_input.rs new file mode 100644 index 000000000..fea6a14f0 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform_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::types::TransactWriteItemsOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::TransactWriteItemsOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformInput::TransactWriteItemsOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformInput, + >, +) -> crate::types::TransactWriteItemsOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformInput, +) -> crate::types::TransactWriteItemsOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformInput::TransactWriteItemsOutputTransformInput {..} => + crate::types::TransactWriteItemsOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/transact_write_items_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform_output.rs new file mode 100644 index 000000000..8bd6ee8e8 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/transact_write_items_output_transform_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::types::TransactWriteItemsOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::TransactWriteItemsOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformOutput::TransactWriteItemsOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformOutput, + >, +) -> crate::types::TransactWriteItemsOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformOutput, +) -> crate::types::TransactWriteItemsOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformOutput::TransactWriteItemsOutputTransformOutput {..} => + crate::types::TransactWriteItemsOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::transact_write_items::_transact_write_items_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/conversions/update_item_input_transform.rs b/releases/rust/db_esdk/src/conversions/update_item_input_transform.rs new file mode 100644 index 000000000..3848df152 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/update_item_input_transform.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 _update_item_input_transform_input; + + pub mod _update_item_input_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/update_item_input_transform/_update_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/update_item_input_transform/_update_item_input_transform_input.rs new file mode 100644 index 000000000..b5962eed3 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/update_item_input_transform/_update_item_input_transform_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::operation::update_item_input_transform::UpdateItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformInput::UpdateItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::to_dafny(&value.sdk_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformInput, + >, +) -> crate::operation::update_item_input_transform::UpdateItemInputTransformInput { + crate::operation::update_item_input_transform::UpdateItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::from_dafny(dafny_value.sdkInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/update_item_input_transform/_update_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/update_item_input_transform/_update_item_input_transform_output.rs new file mode 100644 index 000000000..1cacdfbfd --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/update_item_input_transform/_update_item_input_transform_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::operation::update_item_input_transform::UpdateItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformOutput::UpdateItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::to_dafny(&value.transformed_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformOutput, + >, +) -> crate::operation::update_item_input_transform::UpdateItemInputTransformOutput { + crate::operation::update_item_input_transform::UpdateItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::from_dafny(dafny_value.transformedInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/update_item_input_transform_input.rs b/releases/rust/db_esdk/src/conversions/update_item_input_transform_input.rs new file mode 100644 index 000000000..a2816d63d --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/update_item_input_transform_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::types::UpdateItemInputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::UpdateItemInputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformInput::UpdateItemInputTransformInput { + sdkInput: crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::to_dafny(&value.sdk_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformInput, + >, +) -> crate::types::UpdateItemInputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformInput, +) -> crate::types::UpdateItemInputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformInput::UpdateItemInputTransformInput {..} => + crate::types::UpdateItemInputTransformInput::builder() + .set_sdk_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::from_dafny(dafny_value.sdkInput().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/db_esdk/src/conversions/update_item_input_transform_output.rs b/releases/rust/db_esdk/src/conversions/update_item_input_transform_output.rs new file mode 100644 index 000000000..a54833223 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/update_item_input_transform_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::types::UpdateItemInputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::UpdateItemInputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformOutput::UpdateItemInputTransformOutput { + transformedInput: crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::to_dafny(&value.transformed_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformOutput, + >, +) -> crate::types::UpdateItemInputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformOutput, +) -> crate::types::UpdateItemInputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformOutput::UpdateItemInputTransformOutput {..} => + crate::types::UpdateItemInputTransformOutput::builder() + .set_transformed_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::from_dafny(dafny_value.transformedInput().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/db_esdk/src/conversions/update_item_output_transform.rs b/releases/rust/db_esdk/src/conversions/update_item_output_transform.rs new file mode 100644 index 000000000..768506d50 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/update_item_output_transform.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 _update_item_output_transform_input; + + pub mod _update_item_output_transform_output; diff --git a/releases/rust/db_esdk/src/conversions/update_item_output_transform/_update_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/update_item_output_transform/_update_item_output_transform_input.rs new file mode 100644 index 000000000..0782ba2a3 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/update_item_output_transform/_update_item_output_transform_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::operation::update_item_output_transform::UpdateItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformInput::UpdateItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::to_dafny(&value.original_input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformInput, + >, +) -> crate::operation::update_item_output_transform::UpdateItemOutputTransformInput { + crate::operation::update_item_output_transform::UpdateItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::from_dafny(dafny_value.originalInput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/update_item_output_transform/_update_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/update_item_output_transform/_update_item_output_transform_output.rs new file mode 100644 index 000000000..6ce66cb24 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/update_item_output_transform/_update_item_output_transform_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::operation::update_item_output_transform::UpdateItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformOutput::UpdateItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_response::to_dafny(&value.transformed_output.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformOutput, + >, +) -> crate::operation::update_item_output_transform::UpdateItemOutputTransformOutput { + crate::operation::update_item_output_transform::UpdateItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_response::from_dafny(dafny_value.transformedOutput().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/conversions/update_item_output_transform_input.rs b/releases/rust/db_esdk/src/conversions/update_item_output_transform_input.rs new file mode 100644 index 000000000..cc1e2445c --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/update_item_output_transform_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::types::UpdateItemOutputTransformInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::UpdateItemOutputTransformInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformInput::UpdateItemOutputTransformInput { + sdkOutput: crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_response::to_dafny(&value.sdk_output.clone().unwrap()) +, + originalInput: crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::to_dafny(&value.original_input.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformInput, + >, +) -> crate::types::UpdateItemOutputTransformInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformInput, +) -> crate::types::UpdateItemOutputTransformInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformInput::UpdateItemOutputTransformInput {..} => + crate::types::UpdateItemOutputTransformInput::builder() + .set_sdk_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_response::from_dafny(dafny_value.sdkOutput().clone()) + )) + .set_original_input(Some( crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_request::from_dafny(dafny_value.originalInput().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/db_esdk/src/conversions/update_item_output_transform_output.rs b/releases/rust/db_esdk/src/conversions/update_item_output_transform_output.rs new file mode 100644 index 000000000..728d7a134 --- /dev/null +++ b/releases/rust/db_esdk/src/conversions/update_item_output_transform_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::types::UpdateItemOutputTransformOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::types::UpdateItemOutputTransformOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformOutput::UpdateItemOutputTransformOutput { + transformedOutput: crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_response::to_dafny(&value.transformed_output.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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformOutput, + >, +) -> crate::types::UpdateItemOutputTransformOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformOutput, +) -> crate::types::UpdateItemOutputTransformOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformOutput::UpdateItemOutputTransformOutput {..} => + crate::types::UpdateItemOutputTransformOutput::builder() + .set_transformed_output(Some( crate::deps::com_amazonaws_dynamodb::conversions::update_item::_update_item_response::from_dafny(dafny_value.transformedOutput().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/db_esdk/src/dafny_libraries.rs b/releases/rust/db_esdk/src/dafny_libraries.rs new file mode 100644 index 000000000..a5e7f437f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/ddb.rs b/releases/rust/db_esdk/src/ddb.rs new file mode 100644 index 000000000..2032916b5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps.rs b/releases/rust/db_esdk/src/deps.rs new file mode 100644 index 000000000..a289fd36d --- /dev/null +++ b/releases/rust/db_esdk/src/deps.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. +pub mod aws_cryptography_dbEncryptionSdk_dynamoDb; + + pub mod aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor; + + pub mod aws_cryptography_dbEncryptionSdk_structuredEncryption; + + 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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb.rs new file mode 100644 index 000000000..e118e5215 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb.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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client.rs new file mode 100644 index 000000000..785f5c48d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/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::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig, + ) -> Result { + let inner = + crate::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::_default::DynamoDbEncryption( + &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_encryption_config::_dynamo_db_encryption_config::to_dafny(conf), + ); + if matches!( + inner.as_ref(), + crate::_Wrappers_Compile::Result::Failure { .. } + ) { + return Err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::error::from_dafny(inner.as_ref().error().clone())); + } + Ok(Self { + dafny_client: ::dafny_runtime::upcast_object()(inner.Extract()) + }) + } +} + +mod create_dynamo_db_encryption_branch_key_id_supplier; + +mod get_encrypted_data_key_description; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client/create_dynamo_db_encryption_branch_key_id_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client/create_dynamo_db_encryption_branch_key_id_supplier.rs new file mode 100644 index 000000000..3833aa9a7 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client/create_dynamo_db_encryption_branch_key_id_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_dbEncryptionSdk_dynamoDb::client::Client { + /// Constructs a fluent builder for the [`CreateDynamoDbEncryptionBranchKeyIdSupplier`](crate::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`ddb_key_branch_key_id_supplier(impl Into>)`](crate::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierFluentBuilder::ddb_key_branch_key_id_supplier) / [`set_ddb_key_branch_key_id_supplier(Option)`](crate::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierFluentBuilder::set_ddb_key_branch_key_id_supplier): (undocumented)
+ /// - On success, responds with [`CreateDynamoDbEncryptionBranchKeyIdSupplierOutput`](crate::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput) with field(s): + /// - [`branch_key_id_supplier(Option)`](crate::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput::branch_key_id_supplier): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierError) + pub fn create_dynamo_db_encryption_branch_key_id_supplier(&self) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierFluentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client/get_encrypted_data_key_description.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client/get_encrypted_data_key_description.rs new file mode 100644 index 000000000..2d4e2be3d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/client/get_encrypted_data_key_description.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_dbEncryptionSdk_dynamoDb::client::Client { + /// Constructs a fluent builder for the [`GetEncryptedDataKeyDescription`](crate::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`input(impl Into>)`](crate::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionFluentBuilder::input) / [`set_input(Option)`](crate::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionFluentBuilder::set_input): (undocumented)
+ /// - On success, responds with [`GetEncryptedDataKeyDescriptionOutput`](crate::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput) with field(s): + /// - [`encrypted_data_key_description_output(Option<::std::vec::Vec>)`](crate::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput::encrypted_data_key_description_output): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionError) + pub fn get_encrypted_data_key_description(&self) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionFluentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions.rs new file mode 100644 index 000000000..a535c65cf --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions.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. +pub mod as_set; + + pub mod beacon_key_source; + + pub mod beacon_style; + + pub mod beacon_version; + + pub mod client; + + pub mod compound_beacon; + + pub mod constructor; + + pub mod constructor_part; + + pub mod create_dynamo_db_encryption_branch_key_id_supplier; + + pub mod create_dynamo_db_encryption_branch_key_id_supplier_input; + + pub mod create_dynamo_db_encryption_branch_key_id_supplier_output; + + pub mod dynamo_db_key_branch_key_id_supplier; + + pub mod dynamo_db_table_encryption_config; + + pub mod dynamo_db_tables_encryption_config; + + pub mod encrypted_data_key_description; + + pub mod encrypted_part; + + pub mod error; + + pub mod get_branch_key_id_from_ddb_key; + + pub mod get_branch_key_id_from_ddb_key_input; + + pub mod get_branch_key_id_from_ddb_key_output; + + pub mod get_encrypted_data_key_description; + + pub mod get_encrypted_data_key_description_input; + + pub mod get_encrypted_data_key_description_output; + + pub mod get_encrypted_data_key_description_union; + + pub mod get_prefix; + + pub mod get_segment; + + pub mod get_segments; + + pub mod get_substring; + + pub mod get_suffix; + + pub mod insert; + + pub mod legacy_dynamo_db_encryptor; + + pub mod legacy_override; + + pub mod legacy_policy; + + pub mod lower; + + pub mod multi_key_store; + + pub mod part_only; + + pub mod plaintext_override; + + pub mod search_config; + + pub mod shared; + + pub mod shared_set; + + pub mod signed_part; + + pub mod single_key_store; + + pub mod standard_beacon; + + pub mod upper; + + pub mod virtual_field; + + pub mod virtual_part; + + pub mod virtual_transform; + +pub mod dynamo_db_encryption_config; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/as_set.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/as_set.rs new file mode 100644 index 000000000..334b935ba --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/as_set.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_dbEncryptionSdk_dynamoDb::types::AsSet, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::AsSet, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::AsSet { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::AsSet::AsSet { + + } +} + +#[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::dbencryptionsdk::dynamodb::internaldafny::types::AsSet, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::AsSet, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::AsSet::AsSet {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/beacon_key_source.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/beacon_key_source.rs new file mode 100644 index 000000000..6c1785084 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/beacon_key_source.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_dbEncryptionSdk_dynamoDb::types::BeaconKeySource, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconKeySource, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource::Single(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconKeySource::single { + single: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::single_key_store::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource::Multi(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconKeySource::multi { + multi: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::multi_key_store::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::dbencryptionsdk::dynamodb::internaldafny::types::BeaconKeySource, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconKeySource::single { + single: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource::Single(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::single_key_store::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconKeySource::multi { + multi: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource::Multi(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::multi_key_store::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/beacon_style.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/beacon_style.rs new file mode 100644 index 000000000..988a27363 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/beacon_style.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_dbEncryptionSdk_dynamoDb::types::BeaconStyle, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconStyle, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::PartOnly(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconStyle::partOnly { + partOnly: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::part_only::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::Shared(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconStyle::shared { + shared: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::shared::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::AsSet(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconStyle::asSet { + asSet: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::as_set::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::SharedSet(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconStyle::sharedSet { + sharedSet: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::shared_set::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::dbencryptionsdk::dynamodb::internaldafny::types::BeaconStyle, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconStyle::partOnly { + partOnly: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::PartOnly(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::part_only::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconStyle::shared { + shared: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::Shared(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::shared::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconStyle::asSet { + asSet: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::AsSet(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::as_set::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconStyle::sharedSet { + sharedSet: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::SharedSet(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::shared_set::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/beacon_version.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/beacon_version.rs new file mode 100644 index 000000000..952dd9e55 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/beacon_version.rs @@ -0,0 +1,172 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify 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_dbEncryptionSdk_dynamoDb::types::BeaconVersion, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconVersion, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconVersion { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconVersion::BeaconVersion { + version: value.version.clone().unwrap(), + keyStore: crate::deps::aws_cryptography_keyStore::conversions::client::to_dafny(&value.key_store.clone().unwrap()) +, + keySource: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::beacon_key_source::to_dafny(&value.key_source.clone().unwrap()) +, + standardBeacons: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.standard_beacons.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::standard_beacon::to_dafny(&e.clone()) +, +) +, + compoundBeacons: ::std::rc::Rc::new(match &value.compound_beacons { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::compound_beacon::to_dafny(&e.clone()) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + virtualFields: ::std::rc::Rc::new(match &value.virtual_fields { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::virtual_field::to_dafny(&e.clone()) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + encryptedParts: ::std::rc::Rc::new(match &value.encrypted_parts { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::encrypted_part::to_dafny(&e.clone()) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + signedParts: ::std::rc::Rc::new(match &value.signed_parts { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::signed_part::to_dafny(&e.clone()) +, + ) + }, + 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::dbencryptionsdk::dynamodb::internaldafny::types::BeaconVersion, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconVersion, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconVersion::BeaconVersion {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion::builder() + .set_version(Some( dafny_value.version() .clone() )) + .set_key_store(Some( crate::deps::aws_cryptography_keyStore::conversions::client::from_dafny(dafny_value.keyStore().clone()) + )) + .set_key_source(Some( crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::beacon_key_source::from_dafny(dafny_value.keySource().clone()) + )) + .set_standard_beacons(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.standardBeacons(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::standard_beacon::from_dafny(e.clone()) +, +) + )) + .set_compound_beacons(match (*dafny_value.compoundBeacons()).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::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::compound_beacon::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_virtual_fields(match (*dafny_value.virtualFields()).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::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::virtual_field::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_encrypted_parts(match (*dafny_value.encryptedParts()).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::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::encrypted_part::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_signed_parts(match (*dafny_value.signedParts()).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::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::signed_part::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/client.rs new file mode 100644 index 000000000..121a55c52 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/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_dbEncryptionSdk_dynamoDb::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::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbEncryptionClient + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::client::Client { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::client::Client { dafny_client: dafny_value } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/compound_beacon.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/compound_beacon.rs new file mode 100644 index 000000000..698950aa9 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/compound_beacon.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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CompoundBeacon, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CompoundBeacon { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CompoundBeacon::CompoundBeacon { + name: crate::standard_library_conversions::ostring_to_dafny(&value.name) .Extract(), + split: crate::standard_library_conversions::ostring_to_dafny(&value.split) .Extract(), + encrypted: ::std::rc::Rc::new(match &value.encrypted { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::encrypted_part::to_dafny(&e.clone()) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + signed: ::std::rc::Rc::new(match &value.signed { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::signed_part::to_dafny(&e.clone()) +, + ) + }, + None => crate::r#_Wrappers_Compile::Option::None {} +}) +, + constructors: ::std::rc::Rc::new(match &value.constructors { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::constructor::to_dafny(&e.clone()) +, + ) + }, + 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::dbencryptionsdk::dynamodb::internaldafny::types::CompoundBeacon, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CompoundBeacon, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CompoundBeacon::CompoundBeacon {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon::builder() + .set_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.name()) )) + .set_split(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.split()) )) + .set_encrypted(match (*dafny_value.encrypted()).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::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::encrypted_part::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_signed(match (*dafny_value.signed()).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::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::signed_part::from_dafny(e.clone()) +, + ) + ), + _ => None +} +) + .set_constructors(match (*dafny_value.constructors()).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::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::constructor::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/constructor.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/constructor.rs new file mode 100644 index 000000000..da92186fb --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/constructor.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_dbEncryptionSdk_dynamoDb::types::Constructor, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Constructor, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Constructor, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Constructor { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Constructor::Constructor { + parts: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.parts.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::constructor_part::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::dbencryptionsdk::dynamodb::internaldafny::types::Constructor, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Constructor { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Constructor, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Constructor { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Constructor::Constructor {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Constructor::builder() + .set_parts(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.parts(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::constructor_part::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/constructor_part.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/constructor_part.rs new file mode 100644 index 000000000..e859d1c72 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/constructor_part.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_dbEncryptionSdk_dynamoDb::types::ConstructorPart, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::ConstructorPart, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::ConstructorPart, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::ConstructorPart { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::ConstructorPart::ConstructorPart { + name: crate::standard_library_conversions::ostring_to_dafny(&value.name) .Extract(), + required: value.required.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::dbencryptionsdk::dynamodb::internaldafny::types::ConstructorPart, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::ConstructorPart { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::ConstructorPart, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::ConstructorPart { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::ConstructorPart::ConstructorPart {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::ConstructorPart::builder() + .set_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.name()) )) + .set_required(Some( dafny_value.required() .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier.rs new file mode 100644 index 000000000..5d4bbccc2 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier.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_dynamo_db_encryption_branch_key_id_supplier_input; + + pub mod _create_dynamo_db_encryption_branch_key_id_supplier_output; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_supplier_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_supplier_input.rs new file mode 100644 index 000000000..fa98e4348 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_supplier_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_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput::CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + ddbKeyBranchKeyIdSupplier: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_key_branch_key_id_supplier::to_dafny(&value.ddb_key_branch_key_id_supplier.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierInput::builder() + .set_ddb_key_branch_key_id_supplier(Some( crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_key_branch_key_id_supplier::from_dafny(dafny_value.ddbKeyBranchKeyIdSupplier().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_supplier_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_supplier_output.rs new file mode 100644 index 000000000..c6c0a5aef --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_supplier_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_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + branchKeyIdSupplier: crate::deps::aws_cryptography_materialProviders::conversions::branch_key_id_supplier::to_dafny(&value.branch_key_id_supplier.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput::builder() + .set_branch_key_id_supplier(Some( crate::deps::aws_cryptography_materialProviders::conversions::branch_key_id_supplier::from_dafny(dafny_value.branchKeyIdSupplier().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier_input.rs new file mode 100644 index 000000000..153ce7654 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier_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_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput::CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + ddbKeyBranchKeyIdSupplier: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_key_branch_key_id_supplier::to_dafny(&value.ddb_key_branch_key_id_supplier.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::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput::CreateDynamoDbEncryptionBranchKeyIdSupplierInput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput::builder() + .set_ddb_key_branch_key_id_supplier(Some( crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_key_branch_key_id_supplier::from_dafny(dafny_value.ddbKeyBranchKeyIdSupplier().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier_output.rs new file mode 100644 index 000000000..e64d0c60c --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/create_dynamo_db_encryption_branch_key_id_supplier_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_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + branchKeyIdSupplier: crate::deps::aws_cryptography_materialProviders::conversions::branch_key_id_supplier::to_dafny(&value.branch_key_id_supplier.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::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput::builder() + .set_branch_key_id_supplier(Some( crate::deps::aws_cryptography_materialProviders::conversions::branch_key_id_supplier::from_dafny(dafny_value.branchKeyIdSupplier().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_encryption_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_encryption_config.rs new file mode 100644 index 000000000..973702312 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_encryption_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 _dynamo_db_encryption_config; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_encryption_config/_dynamo_db_encryption_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_encryption_config/_dynamo_db_encryption_config.rs new file mode 100644 index 000000000..154503b86 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_encryption_config/_dynamo_db_encryption_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_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbEncryptionConfig, +> { + ::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::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbEncryptionConfig, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig { + plain_from_dafny(&*dafny_value) +} + + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbEncryptionConfig { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbEncryptionConfig::DynamoDbEncryptionConfig { + + } +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbEncryptionConfig, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbEncryptionConfig::DynamoDbEncryptionConfig {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig::builder() + + .build() + .unwrap() + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_key_branch_key_id_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_key_branch_key_id_supplier.rs new file mode 100644 index 000000000..2e89a83fb --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_key_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_dbEncryptionSdk_dynamoDb::types::dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplierRef, +) -> ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbKeyBranchKeyIdSupplier, +> { + let wrap = DynamoDbKeyBranchKeyIdSupplierWrapper { + obj: value.clone(), + }; + let inner = ::std::rc::Rc::new(::std::cell::UnsafeCell::new(wrap)); + ::dafny_runtime::Object (Some(inner) ) +} + +pub struct DynamoDbKeyBranchKeyIdSupplierWrapper { + obj: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplierRef, +} + +impl ::dafny_runtime::UpcastObject for DynamoDbKeyBranchKeyIdSupplierWrapper { + ::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::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbKeyBranchKeyIdSupplier, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplierRef { + let wrap = IDynamoDbKeyBranchKeyIdSupplierDafnyWrapper { + obj: dafny_value.clone(), + }; + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplierRef { + inner: ::std::rc::Rc::new(::std::cell::RefCell::new(wrap)) + } +} + +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct IDynamoDbKeyBranchKeyIdSupplierDafnyWrapper { + pub(crate) obj: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbKeyBranchKeyIdSupplier, + >, +} + +impl crate::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbKeyBranchKeyIdSupplier + for DynamoDbKeyBranchKeyIdSupplierWrapper +{ + fn r#_GetBranchKeyIdFromDdbKey_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_dbEncryptionSdk_dynamoDb::conversions::get_branch_key_id_from_ddb_key::_get_branch_key_id_from_ddb_key_input::from_dafny(input.clone()); + let inner_result = self.obj.inner.borrow_mut().get_branch_key_id_from_ddb_key(inner_input); + let result = match inner_result { + Ok(x) => crate::r#_Wrappers_Compile::Result::Success { + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_branch_key_id_from_ddb_key::_get_branch_key_id_from_ddb_key_output::to_dafny(x.clone()), + }, + Err(x) => crate::r#_Wrappers_Compile::Result::Failure { + error: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::error::to_dafny(x), + }, + }; + ::std::rc::Rc::new(result) +} +} + +impl crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplier for IDynamoDbKeyBranchKeyIdSupplierDafnyWrapper +{ + fn get_branch_key_id_from_ddb_key( + &self, + input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput, +) -> Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, +> { + let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_branch_key_id_from_ddb_key::_get_branch_key_id_from_ddb_key_input::to_dafny(input); + let inner_result = ::dafny_runtime::md!(self.obj.clone()).GetBranchKeyIdFromDdbKey(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_branch_key_id_from_ddb_key::_get_branch_key_id_from_ddb_key_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } +} +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_table_encryption_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_table_encryption_config.rs new file mode 100644 index 000000000..d7eeed293 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_table_encryption_config.rs @@ -0,0 +1,173 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify 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_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTableEncryptionConfig, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTableEncryptionConfig { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig { + logicalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.logical_table_name) .Extract(), + partitionKeyName: crate::standard_library_conversions::ostring_to_dafny(&value.partition_key_name) .Extract(), + sortKeyName: crate::standard_library_conversions::ostring_to_dafny(&value.sort_key_name), + search: ::std::rc::Rc::new(match &value.search { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::search_config::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + attributeActionsOnEncrypt: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.attribute_actions_on_encrypt.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::to_dafny(v.clone()), +) +, + allowedUnsignedAttributes: ::std::rc::Rc::new(match &value.allowed_unsigned_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 {} +}) +, + allowedUnsignedAttributePrefix: crate::standard_library_conversions::ostring_to_dafny(&value.allowed_unsigned_attribute_prefix), + algorithmSuiteId: ::std::rc::Rc::new(match &value.algorithm_suite_id { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::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 { } +}) +, + cmm: ::std::rc::Rc::new(match &value.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 { } +}) +, + legacyOverride: ::std::rc::Rc::new(match &value.legacy_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::legacy_override::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + plaintextOverride: ::std::rc::Rc::new(match &value.plaintext_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::plaintext_override::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::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTableEncryptionConfig, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTableEncryptionConfig, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig::builder() + .set_logical_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.logicalTableName()) )) + .set_partition_key_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.partitionKeyName()) )) + .set_sort_key_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.sortKeyName().clone())) + .set_search(match (*dafny_value.search()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::search_config::from_dafny(value.clone())), + _ => None, +} +) + .set_attribute_actions_on_encrypt(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.attributeActionsOnEncrypt(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::from_dafny(v), +) + )) + .set_allowed_unsigned_attributes(match (*dafny_value.allowedUnsignedAttributes()).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_allowed_unsigned_attribute_prefix(crate::standard_library_conversions::ostring_from_dafny(dafny_value.allowedUnsignedAttributePrefix().clone())) + .set_algorithm_suite_id(match &**dafny_value.algorithmSuiteId() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::from_dafny(value) + ), + _ => 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_cmm(match (*dafny_value.cmm()).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_legacy_override(match (*dafny_value.legacyOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::legacy_override::from_dafny(value.clone())), + _ => None, +} +) + .set_plaintext_override(match &**dafny_value.plaintextOverride() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::plaintext_override::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_tables_encryption_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_tables_encryption_config.rs new file mode 100644 index 000000000..f9186ab30 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/dynamo_db_tables_encryption_config.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_dbEncryptionSdk_dynamoDb::types::DynamoDbTablesEncryptionConfig, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTablesEncryptionConfig, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig::DynamoDbTablesEncryptionConfig { + tableEncryptionConfigs: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.table_encryption_configs.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_table_encryption_config::to_dafny(&v.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::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTablesEncryptionConfig { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTablesEncryptionConfig { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig::DynamoDbTablesEncryptionConfig {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTablesEncryptionConfig::builder() + .set_table_encryption_configs(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.tableEncryptionConfigs(), + |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::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::dynamo_db_table_encryption_config::from_dafny(v.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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/encrypted_data_key_description.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/encrypted_data_key_description.rs new file mode 100644 index 000000000..db8550fb6 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/encrypted_data_key_description.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_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedDataKeyDescription, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedDataKeyDescription { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedDataKeyDescription::EncryptedDataKeyDescription { + keyProviderId: crate::standard_library_conversions::ostring_to_dafny(&value.key_provider_id) .Extract(), + keyProviderInfo: crate::standard_library_conversions::ostring_to_dafny(&value.key_provider_info), + branchKeyId: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_id), + branchKeyVersion: crate::standard_library_conversions::ostring_to_dafny(&value.branch_key_version), + } +} + +#[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::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedDataKeyDescription, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedDataKeyDescription, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedDataKeyDescription::EncryptedDataKeyDescription {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription::builder() + .set_key_provider_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyProviderId()) )) + .set_key_provider_info(crate::standard_library_conversions::ostring_from_dafny(dafny_value.keyProviderInfo().clone())) + .set_branch_key_id(crate::standard_library_conversions::ostring_from_dafny(dafny_value.branchKeyId().clone())) + .set_branch_key_version(crate::standard_library_conversions::ostring_from_dafny(dafny_value.branchKeyVersion().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/encrypted_part.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/encrypted_part.rs new file mode 100644 index 000000000..2a383570b --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/encrypted_part.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_dbEncryptionSdk_dynamoDb::types::EncryptedPart, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedPart, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedPart { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedPart::EncryptedPart { + name: crate::standard_library_conversions::ostring_to_dafny(&value.name) .Extract(), + prefix: crate::standard_library_conversions::ostring_to_dafny(&value.prefix) .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::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedPart, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedPart, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::EncryptedPart::EncryptedPart {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart::builder() + .set_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.name()) )) + .set_prefix(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.prefix()) )) + .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/error.rs new file mode 100644 index 000000000..319e3361e --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/error.rs @@ -0,0 +1,165 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// 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::dbencryptionsdk::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::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, +) -> ::std::rc::Rc { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::DynamoDbEncryptionException { message } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::DynamoDbEncryptionException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::AwsCryptographicPrimitivesError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::AwsCryptographyPrimitives { + AwsCryptographyPrimitives: crate::deps::aws_cryptography_primitives::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::DynamoDB_20120810Error { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::ComAmazonawsDynamodb { + ComAmazonawsDynamodb: crate::deps::com_amazonaws_dynamodb::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::AwsCryptographicMaterialProvidersError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::StructuredEncryptionError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkStructuredEncryption { + AwsCryptographyDbEncryptionSdkStructuredEncryption: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::KeyStoreError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::AwsCryptographyKeyStore { + AwsCryptographyKeyStore: crate::deps::aws_cryptography_keyStore::conversions::error::to_dafny(error), + }, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::CollectionOfErrors { list, message } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::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_dbEncryptionSdk_dynamoDb::types::error::Error::ValidationError(inner) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::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_dbEncryptionSdk_dynamoDb::types::error::Error::Opaque { obj } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::Opaque { + obj: ::dafny_runtime::Object(obj.0) + }, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::OpaqueWithText { obj, objMessage } => + crate::r#software::amazon::cryptography::dbencryptionsdk::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::dbencryptionsdk::dynamodb::internaldafny::types::Error, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error { + match ::std::borrow::Borrow::borrow(&dafny_value) { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::DynamoDbEncryptionException { message } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::DynamoDbEncryptionException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::AwsCryptographyPrimitives { AwsCryptographyPrimitives } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::AwsCryptographicPrimitivesError { + error: crate::deps::aws_cryptography_primitives::conversions::error::from_dafny(AwsCryptographyPrimitives.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::ComAmazonawsDynamodb { ComAmazonawsDynamodb } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::DynamoDB_20120810Error { + error: crate::deps::com_amazonaws_dynamodb::conversions::error::from_dafny(ComAmazonawsDynamodb.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::AwsCryptographyMaterialProviders { AwsCryptographyMaterialProviders } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::AwsCryptographicMaterialProvidersError { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny(AwsCryptographyMaterialProviders.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkStructuredEncryption { AwsCryptographyDbEncryptionSdkStructuredEncryption } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::StructuredEncryptionError { + error: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::from_dafny(AwsCryptographyDbEncryptionSdkStructuredEncryption.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::AwsCryptographyKeyStore { AwsCryptographyKeyStore } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::KeyStoreError { + error: crate::deps::aws_cryptography_keyStore::conversions::error::from_dafny(AwsCryptographyKeyStore.clone()), + }, + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::CollectionOfErrors { list, message } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::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::dbencryptionsdk::dynamodb::internaldafny::types::Error::Opaque { obj } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::Opaque { + obj: obj.clone() + }, + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::Opaque { obj } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::ValidationError); + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::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_dbEncryptionSdk_dynamoDb::types::error::Error::Opaque { + obj: obj.clone() + } + } + }, + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::OpaqueWithText { obj, objMessage } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::ValidationError); + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::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_dbEncryptionSdk_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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key.rs new file mode 100644 index 000000000..718409619 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_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_branch_key_id_from_ddb_key_input; + + pub mod _get_branch_key_id_from_ddb_key_output; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_key_input.rs new file mode 100644 index 000000000..92652b24e --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_key_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_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyInput::GetBranchKeyIdFromDdbKeyInput { + ddbKey: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.ddb_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.clone()) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput::builder() + .set_ddb_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.ddbKey(), + |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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_key_output.rs new file mode 100644 index 000000000..743ca5a47 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_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_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyOutput::GetBranchKeyIdFromDdbKeyOutput { + 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::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key_input.rs new file mode 100644 index 000000000..2b2142b7d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_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. +#[allow(dead_code)] +pub fn to_dafny( + value: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyInput::GetBranchKeyIdFromDdbKeyInput { + ddbKey: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.ddb_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.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::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyInput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyInput::GetBranchKeyIdFromDdbKeyInput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyInput::builder() + .set_ddb_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.ddbKey(), + |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() + } +} + +#[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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_key_output.rs new file mode 100644 index 000000000..a3be05953 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_branch_key_id_from_ddb_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_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyOutput::GetBranchKeyIdFromDdbKeyOutput { + 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::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyOutput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetBranchKeyIdFromDdbKeyOutput::GetBranchKeyIdFromDdbKeyOutput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyOutput::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description.rs new file mode 100644 index 000000000..3587e1f0b --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description.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_encrypted_data_key_description_input; + + pub mod _get_encrypted_data_key_description_output; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description/_get_encrypted_data_key_description_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description/_get_encrypted_data_key_description_input.rs new file mode 100644 index 000000000..dc70c0440 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description/_get_encrypted_data_key_description_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_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionInput::GetEncryptedDataKeyDescriptionInput { + input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_encrypted_data_key_description_union::to_dafny(&value.input.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionInput { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionInput::builder() + .set_input(Some( crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_encrypted_data_key_description_union::from_dafny(dafny_value.input().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description/_get_encrypted_data_key_description_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description/_get_encrypted_data_key_description_output.rs new file mode 100644 index 000000000..895e496ab --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description/_get_encrypted_data_key_description_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_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionOutput::GetEncryptedDataKeyDescriptionOutput { + EncryptedDataKeyDescriptionOutput: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_data_key_description_output.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::encrypted_data_key_description::to_dafny(&e.clone()) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput::builder() + .set_encrypted_data_key_description_output(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.EncryptedDataKeyDescriptionOutput(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::encrypted_data_key_description::from_dafny(e.clone()) +, +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description_input.rs new file mode 100644 index 000000000..6a077f12b --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description_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_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionInput::GetEncryptedDataKeyDescriptionInput { + input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_encrypted_data_key_description_union::to_dafny(&value.input.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::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionInput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionInput::GetEncryptedDataKeyDescriptionInput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionInput::builder() + .set_input(Some( crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_encrypted_data_key_description_union::from_dafny(dafny_value.input().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description_output.rs new file mode 100644 index 000000000..1bd02aef6 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description_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_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionOutput::GetEncryptedDataKeyDescriptionOutput { + EncryptedDataKeyDescriptionOutput: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_data_key_description_output.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::encrypted_data_key_description::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::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionOutput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionOutput::GetEncryptedDataKeyDescriptionOutput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionOutput::builder() + .set_encrypted_data_key_description_output(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.EncryptedDataKeyDescriptionOutput(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::encrypted_data_key_description::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description_union.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description_union.rs new file mode 100644 index 000000000..76bd85da5 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_encrypted_data_key_description_union.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_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionUnion, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Header(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionUnion::header { + header: crate::standard_library_conversions::blob_to_dafny(&x), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Item(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionUnion::item { + item: ::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.clone()) +, +) +, + }, + _ => panic!("Unknown union variant: {:?}", value), + }) +} + +#[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionUnion, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionUnion::header { + header: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Header(crate::standard_library_conversions::blob_from_dafny(x.clone())), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionUnion::item { + item: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Item(::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()) +, +) +), + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_prefix.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_prefix.rs new file mode 100644 index 000000000..f6638ea97 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_prefix.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_dbEncryptionSdk_dynamoDb::types::GetPrefix, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetPrefix, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetPrefix { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetPrefix::GetPrefix { + 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::dbencryptionsdk::dynamodb::internaldafny::types::GetPrefix, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetPrefix, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetPrefix::GetPrefix {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_segment.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_segment.rs new file mode 100644 index 000000000..df4851843 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_segment.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_dbEncryptionSdk_dynamoDb::types::GetSegment, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSegment, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSegment { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSegment::GetSegment { + split: crate::standard_library_conversions::ostring_to_dafny(&value.split) .Extract(), + index: value.index.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::dbencryptionsdk::dynamodb::internaldafny::types::GetSegment, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSegment, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSegment::GetSegment {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment::builder() + .set_split(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.split()) )) + .set_index(Some( dafny_value.index() .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_segments.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_segments.rs new file mode 100644 index 000000000..c70ed313a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_segments.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_dbEncryptionSdk_dynamoDb::types::GetSegments, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSegments, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSegments { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSegments::GetSegments { + split: crate::standard_library_conversions::ostring_to_dafny(&value.split) .Extract(), + low: value.low.clone().unwrap(), + high: value.high.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::dbencryptionsdk::dynamodb::internaldafny::types::GetSegments, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSegments, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSegments::GetSegments {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments::builder() + .set_split(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.split()) )) + .set_low(Some( dafny_value.low() .clone() )) + .set_high(Some( dafny_value.high() .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_substring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_substring.rs new file mode 100644 index 000000000..ce3bdc111 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_substring.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_dbEncryptionSdk_dynamoDb::types::GetSubstring, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSubstring, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSubstring { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSubstring::GetSubstring { + low: value.low.clone().unwrap(), + high: value.high.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::dbencryptionsdk::dynamodb::internaldafny::types::GetSubstring, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSubstring, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSubstring::GetSubstring {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring::builder() + .set_low(Some( dafny_value.low() .clone() )) + .set_high(Some( dafny_value.high() .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_suffix.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_suffix.rs new file mode 100644 index 000000000..df75faba0 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/get_suffix.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_dbEncryptionSdk_dynamoDb::types::GetSuffix, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSuffix, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSuffix { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSuffix::GetSuffix { + 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::dbencryptionsdk::dynamodb::internaldafny::types::GetSuffix, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSuffix, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetSuffix::GetSuffix {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/insert.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/insert.rs new file mode 100644 index 000000000..3f5edc58a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/insert.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_dbEncryptionSdk_dynamoDb::types::Insert, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Insert, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Insert { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Insert::Insert { + literal: crate::standard_library_conversions::ostring_to_dafny(&value.literal) .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::dbencryptionsdk::dynamodb::internaldafny::types::Insert, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Insert, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Insert::Insert {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert::builder() + .set_literal(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.literal()) )) + .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/legacy_dynamo_db_encryptor.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/legacy_dynamo_db_encryptor.rs new file mode 100644 index 000000000..c32e43481 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/legacy_dynamo_db_encryptor.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_dbEncryptionSdk_dynamoDb::types::legacy_dynamo_db_encryptor::LegacyDynamoDbEncryptorRef, +) -> ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::ILegacyDynamoDbEncryptor, +> { + let wrap = LegacyDynamoDbEncryptorWrapper { + obj: value.clone(), + }; + let inner = ::std::rc::Rc::new(::std::cell::UnsafeCell::new(wrap)); + ::dafny_runtime::Object (Some(inner) ) +} + +pub struct LegacyDynamoDbEncryptorWrapper { + obj: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::legacy_dynamo_db_encryptor::LegacyDynamoDbEncryptorRef, +} + +impl ::dafny_runtime::UpcastObject for LegacyDynamoDbEncryptorWrapper { + ::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::dbencryptionsdk::dynamodb::internaldafny::types::ILegacyDynamoDbEncryptor, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::legacy_dynamo_db_encryptor::LegacyDynamoDbEncryptorRef { + let wrap = ILegacyDynamoDbEncryptorDafnyWrapper { + obj: dafny_value.clone(), + }; + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::legacy_dynamo_db_encryptor::LegacyDynamoDbEncryptorRef { + inner: ::std::rc::Rc::new(::std::cell::RefCell::new(wrap)) + } +} + +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ILegacyDynamoDbEncryptorDafnyWrapper { + pub(crate) obj: ::dafny_runtime::Object< + dyn crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::ILegacyDynamoDbEncryptor, + >, +} + +impl crate::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::ILegacyDynamoDbEncryptor + for LegacyDynamoDbEncryptorWrapper +{ + +} + +impl crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::legacy_dynamo_db_encryptor::LegacyDynamoDbEncryptor for ILegacyDynamoDbEncryptorDafnyWrapper +{ + +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/legacy_override.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/legacy_override.rs new file mode 100644 index 000000000..9f8901bc6 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/legacy_override.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_dbEncryptionSdk_dynamoDb::types::LegacyOverride, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyOverride, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyOverride, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyOverride { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyOverride::LegacyOverride { + policy: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::legacy_policy::to_dafny(value.policy.clone().unwrap()), + encryptor: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::legacy_dynamo_db_encryptor::to_dafny(&value.encryptor.clone().unwrap()) +, + attributeActionsOnEncrypt: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.attribute_actions_on_encrypt.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::to_dafny(v.clone()), +) +, + defaultAttributeFlag: ::std::rc::Rc::new(match &value.default_attribute_flag { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::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::dbencryptionsdk::dynamodb::internaldafny::types::LegacyOverride, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyOverride { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyOverride, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyOverride { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyOverride::LegacyOverride {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyOverride::builder() + .set_policy(Some( crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::legacy_policy::from_dafny(dafny_value.policy()) )) + .set_encryptor(Some( crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::legacy_dynamo_db_encryptor::from_dafny(dafny_value.encryptor().clone()) + )) + .set_attribute_actions_on_encrypt(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.attributeActionsOnEncrypt(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::from_dafny(v), +) + )) + .set_default_attribute_flag(match &**dafny_value.defaultAttributeFlag() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/legacy_policy.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/legacy_policy.rs new file mode 100644 index 000000000..e6a156be1 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/legacy_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_dbEncryptionSdk_dynamoDb::types::LegacyPolicy, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyPolicy::ForceLegacyEncryptAllowLegacyDecrypt => crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyPolicy::FORCE_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT {}, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyPolicy::ForbidLegacyEncryptAllowLegacyDecrypt => crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyPolicy::FORBID_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT {}, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyPolicy::ForbidLegacyEncryptForbidLegacyDecrypt => crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyPolicy::FORBID_LEGACY_ENCRYPT_FORBID_LEGACY_DECRYPT {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyPolicy, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyPolicy { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyPolicy::FORCE_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT {} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyPolicy::ForceLegacyEncryptAllowLegacyDecrypt, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyPolicy::FORBID_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT {} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyPolicy::ForbidLegacyEncryptAllowLegacyDecrypt, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyPolicy::FORBID_LEGACY_ENCRYPT_FORBID_LEGACY_DECRYPT {} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyPolicy::ForbidLegacyEncryptForbidLegacyDecrypt, + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/lower.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/lower.rs new file mode 100644 index 000000000..83f159cfd --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/lower.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_dbEncryptionSdk_dynamoDb::types::Lower, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Lower, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Lower { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Lower::Lower { + + } +} + +#[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::dbencryptionsdk::dynamodb::internaldafny::types::Lower, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Lower, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Lower::Lower {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/multi_key_store.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/multi_key_store.rs new file mode 100644 index 000000000..070c00a87 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/multi_key_store.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: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::MultiKeyStore, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::MultiKeyStore { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::MultiKeyStore::MultiKeyStore { + keyFieldName: crate::standard_library_conversions::ostring_to_dafny(&value.key_field_name) .Extract(), + cacheTTL: value.cache_ttl.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 { } +}) +, + } +} + +#[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::dbencryptionsdk::dynamodb::internaldafny::types::MultiKeyStore, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::MultiKeyStore, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::MultiKeyStore::MultiKeyStore {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore::builder() + .set_key_field_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyFieldName()) )) + .set_cache_ttl(Some( dafny_value.cacheTTL() .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, +} +) + .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/part_only.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/part_only.rs new file mode 100644 index 000000000..96162b530 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/part_only.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_dbEncryptionSdk_dynamoDb::types::PartOnly, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PartOnly, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PartOnly { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PartOnly::PartOnly { + + } +} + +#[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::dbencryptionsdk::dynamodb::internaldafny::types::PartOnly, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PartOnly, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PartOnly::PartOnly {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/plaintext_override.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/plaintext_override.rs new file mode 100644 index 000000000..925b1488c --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/plaintext_override.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_dbEncryptionSdk_dynamoDb::types::PlaintextOverride, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PlaintextOverride::ForcePlaintextWriteAllowPlaintextRead => crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PlaintextOverride::FORCE_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ {}, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PlaintextOverride::ForbidPlaintextWriteAllowPlaintextRead => crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PlaintextOverride::FORBID_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ {}, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PlaintextOverride::ForbidPlaintextWriteForbidPlaintextRead => crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PlaintextOverride::FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PlaintextOverride, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PlaintextOverride { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PlaintextOverride::FORCE_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ {} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PlaintextOverride::ForcePlaintextWriteAllowPlaintextRead, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PlaintextOverride::FORBID_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ {} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PlaintextOverride::ForbidPlaintextWriteAllowPlaintextRead, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PlaintextOverride::FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ {} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PlaintextOverride::ForbidPlaintextWriteForbidPlaintextRead, + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/search_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/search_config.rs new file mode 100644 index 000000000..a0a73a6d4 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/search_config.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_dbEncryptionSdk_dynamoDb::types::SearchConfig, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SearchConfig, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SearchConfig { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SearchConfig::SearchConfig { + versions: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.versions.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::beacon_version::to_dafny(&e.clone()) +, +) +, + writeVersion: value.write_version.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::dbencryptionsdk::dynamodb::internaldafny::types::SearchConfig, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SearchConfig, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SearchConfig::SearchConfig {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig::builder() + .set_versions(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.versions(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::beacon_version::from_dafny(e.clone()) +, +) + )) + .set_write_version(Some( dafny_value.writeVersion() .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/shared.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/shared.rs new file mode 100644 index 000000000..a063f741a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/shared.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_dbEncryptionSdk_dynamoDb::types::Shared, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Shared, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Shared { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Shared::Shared { + other: crate::standard_library_conversions::ostring_to_dafny(&value.other) .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::dbencryptionsdk::dynamodb::internaldafny::types::Shared, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Shared, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Shared::Shared {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared::builder() + .set_other(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.other()) )) + .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/shared_set.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/shared_set.rs new file mode 100644 index 000000000..d599f35d7 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/shared_set.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_dbEncryptionSdk_dynamoDb::types::SharedSet, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SharedSet, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SharedSet { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SharedSet::SharedSet { + other: crate::standard_library_conversions::ostring_to_dafny(&value.other) .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::dbencryptionsdk::dynamodb::internaldafny::types::SharedSet, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SharedSet, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SharedSet::SharedSet {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet::builder() + .set_other(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.other()) )) + .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/signed_part.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/signed_part.rs new file mode 100644 index 000000000..21d67901e --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/signed_part.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_dbEncryptionSdk_dynamoDb::types::SignedPart, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SignedPart, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SignedPart, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SignedPart { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SignedPart::SignedPart { + name: crate::standard_library_conversions::ostring_to_dafny(&value.name) .Extract(), + prefix: crate::standard_library_conversions::ostring_to_dafny(&value.prefix) .Extract(), + loc: crate::standard_library_conversions::ostring_to_dafny(&value.loc), + } +} + +#[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::dbencryptionsdk::dynamodb::internaldafny::types::SignedPart, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SignedPart { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SignedPart, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SignedPart { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SignedPart::SignedPart {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SignedPart::builder() + .set_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.name()) )) + .set_prefix(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.prefix()) )) + .set_loc(crate::standard_library_conversions::ostring_from_dafny(dafny_value.loc().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/single_key_store.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/single_key_store.rs new file mode 100644 index 000000000..023dac908 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/single_key_store.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_dbEncryptionSdk_dynamoDb::types::SingleKeyStore, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SingleKeyStore, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SingleKeyStore { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SingleKeyStore::SingleKeyStore { + keyId: crate::standard_library_conversions::ostring_to_dafny(&value.key_id) .Extract(), + cacheTTL: value.cache_ttl.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::dbencryptionsdk::dynamodb::internaldafny::types::SingleKeyStore, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SingleKeyStore, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::SingleKeyStore::SingleKeyStore {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore::builder() + .set_key_id(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.keyId()) )) + .set_cache_ttl(Some( dafny_value.cacheTTL() .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/standard_beacon.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/standard_beacon.rs new file mode 100644 index 000000000..6c9c80e61 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/standard_beacon.rs @@ -0,0 +1,85 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify 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_dbEncryptionSdk_dynamoDb::types::StandardBeacon, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::StandardBeacon, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::StandardBeacon { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::StandardBeacon::StandardBeacon { + name: crate::standard_library_conversions::ostring_to_dafny(&value.name) .Extract(), + length: value.length.clone().unwrap(), + loc: crate::standard_library_conversions::ostring_to_dafny(&value.loc), + style: ::std::rc::Rc::new(match &value.style { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::beacon_style::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::dbencryptionsdk::dynamodb::internaldafny::types::StandardBeacon, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::StandardBeacon, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::StandardBeacon::StandardBeacon {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon::builder() + .set_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.name()) )) + .set_length(Some( dafny_value.length() .clone() )) + .set_loc(crate::standard_library_conversions::ostring_from_dafny(dafny_value.loc().clone())) + .set_style(match (*dafny_value.style()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::beacon_style::from_dafny(value.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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/upper.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/upper.rs new file mode 100644 index 000000000..7248c609b --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/upper.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_dbEncryptionSdk_dynamoDb::types::Upper, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Upper, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Upper { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Upper::Upper { + + } +} + +#[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::dbencryptionsdk::dynamodb::internaldafny::types::Upper, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Upper, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Upper::Upper {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/virtual_field.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/virtual_field.rs new file mode 100644 index 000000000..7eae0d8e1 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/virtual_field.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_dbEncryptionSdk_dynamoDb::types::VirtualField, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualField, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualField, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualField { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualField::VirtualField { + name: crate::standard_library_conversions::ostring_to_dafny(&value.name) .Extract(), + parts: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.parts.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::virtual_part::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::dbencryptionsdk::dynamodb::internaldafny::types::VirtualField, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualField { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualField, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualField { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualField::VirtualField {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualField::builder() + .set_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.name()) )) + .set_parts(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.parts(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::virtual_part::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/virtual_part.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/virtual_part.rs new file mode 100644 index 000000000..efc1c01c9 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/virtual_part.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: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualPart, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualPart { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualPart::VirtualPart { + loc: crate::standard_library_conversions::ostring_to_dafny(&value.loc) .Extract(), + trans: ::std::rc::Rc::new(match &value.trans { + Some(x) => crate::r#_Wrappers_Compile::Option::Some { value : + ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x, + |e| crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::virtual_transform::to_dafny(&e.clone()) +, + ) + }, + 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::dbencryptionsdk::dynamodb::internaldafny::types::VirtualPart, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualPart, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualPart::VirtualPart {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart::builder() + .set_loc(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.loc()) )) + .set_trans(match (*dafny_value.trans()).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::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::virtual_transform::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/virtual_transform.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/virtual_transform.rs new file mode 100644 index 000000000..a3d69f970 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/conversions/virtual_transform.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: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Upper(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::upper { + upper: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::upper::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Lower(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::lower { + lower: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::lower::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Insert(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::insert { + insert: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::insert::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Prefix(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::prefix { + prefix: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_prefix::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Suffix(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::suffix { + suffix: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_suffix::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Substring(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::substring { + substring: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_substring::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Segment(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::segment { + segment: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_segment::to_dafny(&x.clone()) +, + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Segments(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::segments { + segments: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_segments::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::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::upper { + upper: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Upper(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::upper::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::lower { + lower: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Lower(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::lower::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::insert { + insert: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Insert(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::insert::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::prefix { + prefix: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Prefix(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_prefix::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::suffix { + suffix: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Suffix(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_suffix::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::substring { + substring: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Substring(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_substring::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::segment { + segment: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Segment(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_segment::from_dafny(x.clone()) +), +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualTransform::segments { + segments: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Segments(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_segments::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/deps.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/deps.rs new file mode 100644 index 000000000..5fbbbaa0f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/error.rs new file mode 100644 index 000000000..4cddaa7c3 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/error/sealed_unhandled.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/error/sealed_unhandled.rs new file mode 100644 index 000000000..eae800729 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation.rs new file mode 100644 index 000000000..78f13264b --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation.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. +/// Types for the `CreateDynamoDbEncryptionBranchKeyIdSupplier` operation. +pub mod create_dynamo_db_encryption_branch_key_id_supplier; + +/// Types for the `GetBranchKeyIdFromDdbKey` operation. +pub mod get_branch_key_id_from_ddb_key; + +/// Types for the `GetEncryptedDataKeyDescription` operation. +pub mod get_encrypted_data_key_description; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier.rs new file mode 100644 index 000000000..c08454165 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier.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 `CreateDynamoDbEncryptionBranchKeyIdSupplier`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateDynamoDbEncryptionBranchKeyIdSupplier; +impl CreateDynamoDbEncryptionBranchKeyIdSupplier { + /// Creates a new `CreateDynamoDbEncryptionBranchKeyIdSupplier` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::client::Client, + input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, + > { + if input.ddb_key_branch_key_id_supplier.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ddb_key_branch_key_id_supplier", + "ddb_key_branch_key_id_supplier was not specified but it is required when building CreateDynamoDbEncryptionBranchKeyIdSupplierInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::wrap_validation_err); +} + let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::create_dynamo_db_encryption_branch_key_id_supplier::_create_dynamo_db_encryption_branch_key_id_supplier_input::to_dafny(input); + let inner_result = + ::dafny_runtime::md!(client.dafny_client.clone()).CreateDynamoDbEncryptionBranchKeyIdSupplier(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::create_dynamo_db_encryption_branch_key_id_supplier::_create_dynamo_db_encryption_branch_key_id_supplier_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::_create_dynamo_db_encryption_branch_key_id_supplier_output::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::_create_dynamo_db_encryption_branch_key_id_supplier_input::CreateDynamoDbEncryptionBranchKeyIdSupplierInput; + +pub(crate) mod _create_dynamo_db_encryption_branch_key_id_supplier_output; + +pub(crate) mod _create_dynamo_db_encryption_branch_key_id_supplier_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_supplier_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_supplier_input.rs new file mode 100644 index 000000000..b76009113 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_supplier_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 Branch Key Supplier from a DynamoDB Key Branch Key Id Supplier +pub struct CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + /// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub ddb_key_branch_key_id_supplier: ::std::option::Option, +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + /// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub fn ddb_key_branch_key_id_supplier(&self) -> &::std::option::Option { + &self.ddb_key_branch_key_id_supplier +} +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + /// Creates a new builder-style object to manufacture [`CreateDynamoDbEncryptionBranchKeyIdSupplierInput`](crate::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder::default() + } +} + +/// A builder for [`CreateDynamoDbEncryptionBranchKeyIdSupplierInput`](crate::operation::operation::CreateDynamoDbEncryptionBranchKeyIdSupplierInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder { + pub(crate) ddb_key_branch_key_id_supplier: ::std::option::Option, +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder { + /// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub fn ddb_key_branch_key_id_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.ddb_key_branch_key_id_supplier = ::std::option::Option::Some(input.into()); + self +} +/// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub fn set_ddb_key_branch_key_id_supplier(mut self, input: ::std::option::Option) -> Self { + self.ddb_key_branch_key_id_supplier = input; + self +} +/// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub fn get_ddb_key_branch_key_id_supplier(&self) -> &::std::option::Option { + &self.ddb_key_branch_key_id_supplier +} + /// Consumes the builder and constructs a [`CreateDynamoDbEncryptionBranchKeyIdSupplierInput`](crate::operation::operation::CreateDynamoDbEncryptionBranchKeyIdSupplierInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + ddb_key_branch_key_id_supplier: self.ddb_key_branch_key_id_supplier, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_supplier_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_supplier_output.rs new file mode 100644 index 000000000..d3af0c49d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier/_create_dynamo_db_encryption_branch_key_id_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)] +/// Outputs for creating a Branch Key Supplier from a DynamoDB Key Branch Key Id Supplier +pub struct CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + /// The Branch Key Supplier for use with the Hierarchical Keyring. +pub branch_key_id_supplier: ::std::option::Option, +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + /// The Branch Key Supplier for use with the Hierarchical Keyring. +pub fn branch_key_id_supplier(&self) -> &::std::option::Option { + &self.branch_key_id_supplier +} +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + /// Creates a new builder-style object to manufacture [`CreateDynamoDbEncryptionBranchKeyIdSupplierOutput`](crate::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierOutputBuilder::default() + } +} + +/// A builder for [`CreateDynamoDbEncryptionBranchKeyIdSupplierOutput`](crate::operation::operation::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateDynamoDbEncryptionBranchKeyIdSupplierOutputBuilder { + pub(crate) branch_key_id_supplier: ::std::option::Option, +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierOutputBuilder { + /// The Branch Key Supplier for use with the Hierarchical Keyring. +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 +} +/// The Branch Key Supplier for use with the Hierarchical Keyring. +pub fn set_branch_key_id_supplier(mut self, input: ::std::option::Option) -> Self { + self.branch_key_id_supplier = input; + self +} +/// The Branch Key Supplier for use with the Hierarchical Keyring. +pub fn get_branch_key_id_supplier(&self) -> &::std::option::Option { + &self.branch_key_id_supplier +} + /// Consumes the builder and constructs a [`CreateDynamoDbEncryptionBranchKeyIdSupplierOutput`](crate::operation::operation::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + branch_key_id_supplier: self.branch_key_id_supplier, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier/builders.rs new file mode 100644 index 000000000..c4061d101 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/create_dynamo_db_encryption_branch_key_id_supplier/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_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::_create_dynamo_db_encryption_branch_key_id_supplier_output::CreateDynamoDbEncryptionBranchKeyIdSupplierOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::_create_dynamo_db_encryption_branch_key_id_supplier_input::CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder; + +impl CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, + > { + let mut fluent_builder = client.create_dynamo_db_encryption_branch_key_id_supplier(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `CreateDynamoDbEncryptionBranchKeyIdSupplier`. +/// +/// Create a Branch Key Supplier for use with the Hierarchical Keyring that decides what Branch Key to use based on the primary key of the DynamoDB item being read or written. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct CreateDynamoDbEncryptionBranchKeyIdSupplierFluentBuilder { + client: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder, +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierFluentBuilder { + /// Creates a new `CreateDynamoDbEncryptionBranchKeyIdSupplier`. + pub(crate) fn new(client: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the CreateDynamoDbEncryptionBranchKeyIdSupplier as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, + > { + 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_dbEncryptionSdk_dynamoDb::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::create_dynamo_db_encryption_branch_key_id_supplier::CreateDynamoDbEncryptionBranchKeyIdSupplier::send(&self.client, input).await + } + + /// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub fn ddb_key_branch_key_id_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.ddb_key_branch_key_id_supplier(input.into()); + self +} +/// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub fn set_ddb_key_branch_key_id_supplier(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_ddb_key_branch_key_id_supplier(input); + self +} +/// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub fn get_ddb_key_branch_key_id_supplier(&self) -> &::std::option::Option { + self.inner.get_ddb_key_branch_key_id_supplier() +} +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key.rs new file mode 100644 index 000000000..f5cab0429 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key.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 `GetBranchKeyIdFromDdbKey`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetBranchKeyIdFromDdbKey; +impl GetBranchKeyIdFromDdbKey { + /// Creates a new `GetBranchKeyIdFromDdbKey` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + dynamo_db_key_branch_key_id_supplier: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplierRef, + input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, + > { + if input.ddb_key.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "ddb_key", + "ddb_key was not specified but it is required when building GetBranchKeyIdFromDdbKeyInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::wrap_validation_err); +} + dynamo_db_key_branch_key_id_supplier.inner.borrow_mut().get_branch_key_id_from_ddb_key(input) + } +} + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::_get_branch_key_id_from_ddb_key_output::GetBranchKeyIdFromDdbKeyOutput; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::_get_branch_key_id_from_ddb_key_input::GetBranchKeyIdFromDdbKeyInput; + +pub(crate) mod _get_branch_key_id_from_ddb_key_output; + +pub(crate) mod _get_branch_key_id_from_ddb_key_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_key_input.rs new file mode 100644 index 000000000..a0b25b61e --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_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 the Branch Key that should be used for wrapping and unwrapping data keys. +pub struct GetBranchKeyIdFromDdbKeyInput { + /// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub ddb_key: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl GetBranchKeyIdFromDdbKeyInput { + /// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub fn ddb_key(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.ddb_key +} +} +impl GetBranchKeyIdFromDdbKeyInput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyIdFromDdbKeyInput`](crate::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyInputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyIdFromDdbKeyInput`](crate::operation::operation::GetBranchKeyIdFromDdbKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyIdFromDdbKeyInputBuilder { + pub(crate) ddb_key: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl GetBranchKeyIdFromDdbKeyInputBuilder { + /// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub fn ddb_key(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.ddb_key = ::std::option::Option::Some(input.into()); + self +} +/// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub fn set_ddb_key(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.ddb_key = input; + self +} +/// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub fn get_ddb_key(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.ddb_key +} + /// Consumes the builder and constructs a [`GetBranchKeyIdFromDdbKeyInput`](crate::operation::operation::GetBranchKeyIdFromDdbKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput { + ddb_key: self.ddb_key, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_key_output.rs new file mode 100644 index 000000000..8d17d801e --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key/_get_branch_key_id_from_ddb_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 the Branch Key that should be used for wrapping and unwrapping data keys. +pub struct GetBranchKeyIdFromDdbKeyOutput { + /// The ID of the Branch Key that should be used to wrap and unwrap data keys for this item. +pub branch_key_id: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyIdFromDdbKeyOutput { + /// The ID of the Branch Key that should be used to wrap and unwrap data keys for this item. +pub fn branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} +} +impl GetBranchKeyIdFromDdbKeyOutput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyIdFromDdbKeyOutput`](crate::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyOutputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyIdFromDdbKeyOutput`](crate::operation::operation::GetBranchKeyIdFromDdbKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyIdFromDdbKeyOutputBuilder { + pub(crate) branch_key_id: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyIdFromDdbKeyOutputBuilder { + /// The ID of the Branch Key that should be used to wrap and unwrap data keys for this item. +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 ID of the Branch Key that should be used to wrap and unwrap data keys for this item. +pub fn set_branch_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_id = input; + self +} +/// The ID of the Branch Key that should be used to wrap and unwrap data keys for this item. +pub fn get_branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} + /// Consumes the builder and constructs a [`GetBranchKeyIdFromDdbKeyOutput`](crate::operation::operation::GetBranchKeyIdFromDdbKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput { + branch_key_id: self.branch_key_id, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_key/builders.rs new file mode 100644 index 000000000..4af0753ec --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_branch_key_id_from_ddb_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_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::_get_branch_key_id_from_ddb_key_output::GetBranchKeyIdFromDdbKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::_get_branch_key_id_from_ddb_key_input::GetBranchKeyIdFromDdbKeyInputBuilder; + +impl GetBranchKeyIdFromDdbKeyInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + dynamo_db_key_branch_key_id_supplier: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplierRef, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, + > { + let mut fluent_builder = dynamo_db_key_branch_key_id_supplier.get_branch_key_id_from_ddb_key(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetBranchKeyIdFromDdbKey`. +/// +/// Get the Branch Key that should be used for wrapping and unwrapping data keys based on the primary key of the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetBranchKeyIdFromDdbKeyFluentBuilder { + dynamo_db_key_branch_key_id_supplier: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplierRef, + pub(crate) inner: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyInputBuilder, +} +impl GetBranchKeyIdFromDdbKeyFluentBuilder { + /// Creates a new `GetBranchKeyIdFromDdbKey`. + pub(crate) fn new(dynamo_db_key_branch_key_id_supplier: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplierRef) -> Self { + Self { + dynamo_db_key_branch_key_id_supplier, + inner: ::std::default::Default::default(), + } + } + /// Access the GetBranchKeyIdFromDdbKey as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::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_dbEncryptionSdk_dynamoDb::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKey::send(&self.dynamo_db_key_branch_key_id_supplier, input).await + } + + /// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub fn ddb_key(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.inner = self.inner.ddb_key(input.into()); + self +} +/// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub fn set_ddb_key(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.inner = self.inner.set_ddb_key(input); + self +} +/// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub fn get_ddb_key(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + self.inner.get_ddb_key() +} +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description.rs new file mode 100644 index 000000000..dbec11ba7 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_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. +/// Orchestration and serialization glue logic for `GetEncryptedDataKeyDescription`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetEncryptedDataKeyDescription; +impl GetEncryptedDataKeyDescription { + /// Creates a new `GetEncryptedDataKeyDescription` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::client::Client, + input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, + > { + if input.input.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "input", + "input was not specified but it is required when building GetEncryptedDataKeyDescriptionInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error::wrap_validation_err); +} + let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_encrypted_data_key_description::_get_encrypted_data_key_description_input::to_dafny(input); + let inner_result = + ::dafny_runtime::md!(client.dafny_client.clone()).GetEncryptedDataKeyDescription(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::get_encrypted_data_key_description::_get_encrypted_data_key_description_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::_get_encrypted_data_key_description_output::GetEncryptedDataKeyDescriptionOutput; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::_get_encrypted_data_key_description_input::GetEncryptedDataKeyDescriptionInput; + +pub(crate) mod _get_encrypted_data_key_description_output; + +pub(crate) mod _get_encrypted_data_key_description_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description/_get_encrypted_data_key_description_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description/_get_encrypted_data_key_description_input.rs new file mode 100644 index 000000000..f26909f5f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description/_get_encrypted_data_key_description_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)] +/// Input for getting encrypted data key description. +pub struct GetEncryptedDataKeyDescriptionInput { + #[allow(missing_docs)] +pub input: ::std::option::Option, +} +impl GetEncryptedDataKeyDescriptionInput { + #[allow(missing_docs)] +pub fn input(&self) -> &::std::option::Option { + &self.input +} +} +impl GetEncryptedDataKeyDescriptionInput { + /// Creates a new builder-style object to manufacture [`GetEncryptedDataKeyDescriptionInput`](crate::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionInputBuilder::default() + } +} + +/// A builder for [`GetEncryptedDataKeyDescriptionInput`](crate::operation::operation::GetEncryptedDataKeyDescriptionInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetEncryptedDataKeyDescriptionInputBuilder { + pub(crate) input: ::std::option::Option, +} +impl GetEncryptedDataKeyDescriptionInputBuilder { + #[allow(missing_docs)] +pub fn input(mut self, input: impl ::std::convert::Into) -> Self { + self.input = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_input(mut self, input: ::std::option::Option) -> Self { + self.input = input; + self +} +#[allow(missing_docs)] +pub fn get_input(&self) -> &::std::option::Option { + &self.input +} + /// Consumes the builder and constructs a [`GetEncryptedDataKeyDescriptionInput`](crate::operation::operation::GetEncryptedDataKeyDescriptionInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionInput { + input: self.input, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description/_get_encrypted_data_key_description_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description/_get_encrypted_data_key_description_output.rs new file mode 100644 index 000000000..71cc028ff --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description/_get_encrypted_data_key_description_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)] +/// Output for getting encrypted data key description. +pub struct GetEncryptedDataKeyDescriptionOutput { + /// A list of encrypted data key description. +pub encrypted_data_key_description_output: ::std::option::Option<::std::vec::Vec>, +} +impl GetEncryptedDataKeyDescriptionOutput { + /// A list of encrypted data key description. +pub fn encrypted_data_key_description_output(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_key_description_output +} +} +impl GetEncryptedDataKeyDescriptionOutput { + /// Creates a new builder-style object to manufacture [`GetEncryptedDataKeyDescriptionOutput`](crate::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionOutputBuilder::default() + } +} + +/// A builder for [`GetEncryptedDataKeyDescriptionOutput`](crate::operation::operation::GetEncryptedDataKeyDescriptionOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetEncryptedDataKeyDescriptionOutputBuilder { + pub(crate) encrypted_data_key_description_output: ::std::option::Option<::std::vec::Vec>, +} +impl GetEncryptedDataKeyDescriptionOutputBuilder { + /// A list of encrypted data key description. +pub fn encrypted_data_key_description_output(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_data_key_description_output = ::std::option::Option::Some(input.into()); + self +} +/// A list of encrypted data key description. +pub fn set_encrypted_data_key_description_output(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_data_key_description_output = input; + self +} +/// A list of encrypted data key description. +pub fn get_encrypted_data_key_description_output(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_key_description_output +} + /// Consumes the builder and constructs a [`GetEncryptedDataKeyDescriptionOutput`](crate::operation::operation::GetEncryptedDataKeyDescriptionOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput { + encrypted_data_key_description_output: self.encrypted_data_key_description_output, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description/builders.rs new file mode 100644 index 000000000..797d37913 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/operation/get_encrypted_data_key_description/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_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::_get_encrypted_data_key_description_output::GetEncryptedDataKeyDescriptionOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::_get_encrypted_data_key_description_input::GetEncryptedDataKeyDescriptionInputBuilder; + +impl GetEncryptedDataKeyDescriptionInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, + > { + let mut fluent_builder = client.get_encrypted_data_key_description(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetEncryptedDataKeyDescription`. +/// +/// Returns encrypted data key description. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetEncryptedDataKeyDescriptionFluentBuilder { + client: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionInputBuilder, +} +impl GetEncryptedDataKeyDescriptionFluentBuilder { + /// Creates a new `GetEncryptedDataKeyDescription`. + pub(crate) fn new(client: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the GetEncryptedDataKeyDescription as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::builders::GetEncryptedDataKeyDescriptionInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescriptionOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::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_dbEncryptionSdk_dynamoDb::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_encrypted_data_key_description::GetEncryptedDataKeyDescription::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn input(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.input(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_input(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_input(input); + self +} +#[allow(missing_docs)] +pub fn get_input(&self) -> &::std::option::Option { + self.inner.get_input() +} +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types.rs new file mode 100644 index 000000000..98a189074 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types.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. +/// Types for the `DynamoDbEncryptionConfig` +pub mod dynamo_db_encryption_config; + +pub mod builders; + +pub mod dynamo_db_key_branch_key_id_supplier; +pub use dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplier; +pub mod legacy_dynamo_db_encryptor; +pub use legacy_dynamo_db_encryptor::LegacyDynamoDbEncryptor; + +mod _as_set; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_as_set::AsSet; +mod _beacon_version; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_beacon_version::BeaconVersion; +mod _compound_beacon; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_compound_beacon::CompoundBeacon; +mod _constructor; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_constructor::Constructor; +mod _constructor_part; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_constructor_part::ConstructorPart; +mod _create_dynamo_db_encryption_branch_key_id_supplier_input; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_create_dynamo_db_encryption_branch_key_id_supplier_input::CreateDynamoDbEncryptionBranchKeyIdSupplierInput; +mod _create_dynamo_db_encryption_branch_key_id_supplier_output; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_create_dynamo_db_encryption_branch_key_id_supplier_output::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput; +mod _dynamo_db_table_encryption_config; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_dynamo_db_table_encryption_config::DynamoDbTableEncryptionConfig; +mod _dynamo_db_tables_encryption_config; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig; +mod _encrypted_data_key_description; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_encrypted_data_key_description::EncryptedDataKeyDescription; +mod _encrypted_part; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_encrypted_part::EncryptedPart; +mod _get_branch_key_id_from_ddb_key_input; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_branch_key_id_from_ddb_key_input::GetBranchKeyIdFromDdbKeyInput; +mod _get_branch_key_id_from_ddb_key_output; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_branch_key_id_from_ddb_key_output::GetBranchKeyIdFromDdbKeyOutput; +mod _get_encrypted_data_key_description_input; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_encrypted_data_key_description_input::GetEncryptedDataKeyDescriptionInput; +mod _get_encrypted_data_key_description_output; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_encrypted_data_key_description_output::GetEncryptedDataKeyDescriptionOutput; +mod _get_prefix; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_prefix::GetPrefix; +mod _get_segment; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_segment::GetSegment; +mod _get_segments; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_segments::GetSegments; +mod _get_substring; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_substring::GetSubstring; +mod _get_suffix; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_suffix::GetSuffix; +mod _insert; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_insert::Insert; +mod _legacy_override; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_legacy_override::LegacyOverride; +mod _lower; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_lower::Lower; +mod _multi_key_store; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_multi_key_store::MultiKeyStore; +mod _part_only; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_part_only::PartOnly; +mod _search_config; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_search_config::SearchConfig; +mod _shared; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_shared::Shared; +mod _shared_set; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_shared_set::SharedSet; +mod _signed_part; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_signed_part::SignedPart; +mod _single_key_store; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_single_key_store::SingleKeyStore; +mod _standard_beacon; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_standard_beacon::StandardBeacon; +mod _upper; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_upper::Upper; +mod _virtual_field; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_virtual_field::VirtualField; +mod _virtual_part; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_virtual_part::VirtualPart; + +pub mod error; + +mod _legacy_policy; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_legacy_policy::LegacyPolicy; +mod _plaintext_override; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_plaintext_override::PlaintextOverride; + +mod _beacon_key_source; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_beacon_key_source::BeaconKeySource; +mod _beacon_style; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_beacon_style::BeaconStyle; +mod _get_encrypted_data_key_description_union; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_encrypted_data_key_description_union::GetEncryptedDataKeyDescriptionUnion; +mod _virtual_transform; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_virtual_transform::VirtualTransform; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_as_set.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_as_set.rs new file mode 100644 index 000000000..22334b99f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_as_set.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)] +/// Attribute must be a Set. Beacon value will also be a Set. +pub struct AsSet { + +} +impl AsSet { + +} +impl AsSet { + /// Creates a new builder-style object to manufacture [`AsSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::AsSetBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::AsSetBuilder::default() + } +} + +/// A builder for [`AsSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AsSetBuilder { + +} +impl AsSetBuilder { + + /// Consumes the builder and constructs a [`AsSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet { + + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_beacon_key_source.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_beacon_key_source.rs new file mode 100644 index 000000000..9fa95ada8 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_beacon_key_source.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 BeaconKeySource { + #[allow(missing_docs)] +Single(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore), +#[allow(missing_docs)] +Multi(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore), + /// 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 BeaconKeySource { + /// Tries to convert the enum instance into [`Single`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource::Single), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_single(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource::Single(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Multi`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource::Multi), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_multi(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource::Multi(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`Single`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource::Single). +pub fn is_single(&self) -> ::std::primitive::bool { + self.as_single().is_ok() +} +/// Returns true if this is a [`Multi`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconKeySource::Multi). +pub fn is_multi(&self) -> ::std::primitive::bool { + self.as_multi().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_beacon_style.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_beacon_style.rs new file mode 100644 index 000000000..72ce4a656 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_beacon_style.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 BeaconStyle { + #[allow(missing_docs)] +PartOnly(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly), +#[allow(missing_docs)] +Shared(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared), +#[allow(missing_docs)] +AsSet(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet), +#[allow(missing_docs)] +SharedSet(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet), + /// 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 BeaconStyle { + /// Tries to convert the enum instance into [`PartOnly`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::PartOnly), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_part_only(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::PartOnly(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_dbEncryptionSdk_dynamoDb::types::BeaconStyle::Shared), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_shared(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::Shared(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`AsSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::AsSet), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_as_set(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::AsSet, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::AsSet(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`SharedSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::SharedSet), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_shared_set(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::SharedSet(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`PartOnly`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::PartOnly). +pub fn is_part_only(&self) -> ::std::primitive::bool { + self.as_part_only().is_ok() +} +/// Returns true if this is a [`Shared`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::Shared). +pub fn is_shared(&self) -> ::std::primitive::bool { + self.as_shared().is_ok() +} +/// Returns true if this is a [`AsSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::AsSet). +pub fn is_as_set(&self) -> ::std::primitive::bool { + self.as_as_set().is_ok() +} +/// Returns true if this is a [`SharedSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconStyle::SharedSet). +pub fn is_shared_set(&self) -> ::std::primitive::bool { + self.as_shared_set().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_beacon_version.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_beacon_version.rs new file mode 100644 index 000000000..268c3f5d4 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_beacon_version.rs @@ -0,0 +1,212 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This 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 for a particular version of searchable encryption. Currently the only supported version is '1'. +pub struct BeaconVersion { + /// The Compound Beacons to be written with items. +pub compound_beacons: ::std::option::Option<::std::vec::Vec>, +/// The list of Encrypted Parts that may be included in any compound beacon. +pub encrypted_parts: ::std::option::Option<::std::vec::Vec>, +/// The configuration for what beacon key(s) to use. +pub key_source: ::std::option::Option, +/// The Key Store that contains the Beacon Keys to use with searchable encryption. +pub key_store: ::std::option::Option, +/// The list of Signed Parts that may be included in any compound beacon. +pub signed_parts: ::std::option::Option<::std::vec::Vec>, +/// The Standard Beacons to be written with items. +pub standard_beacons: ::std::option::Option<::std::vec::Vec>, +/// The version of searchable encryption configured. This must be '1'. +pub version: ::std::option::Option<::std::primitive::i32>, +/// The Virtual Fields to be calculated, supporting other searchable enryption configurations. +pub virtual_fields: ::std::option::Option<::std::vec::Vec>, +} +impl BeaconVersion { + /// The Compound Beacons to be written with items. +pub fn compound_beacons(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.compound_beacons +} +/// The list of Encrypted Parts that may be included in any compound beacon. +pub fn encrypted_parts(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_parts +} +/// The configuration for what beacon key(s) to use. +pub fn key_source(&self) -> &::std::option::Option { + &self.key_source +} +/// The Key Store that contains the Beacon Keys to use with searchable encryption. +pub fn key_store(&self) -> &::std::option::Option { + &self.key_store +} +/// The list of Signed Parts that may be included in any compound beacon. +pub fn signed_parts(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.signed_parts +} +/// The Standard Beacons to be written with items. +pub fn standard_beacons(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.standard_beacons +} +/// The version of searchable encryption configured. This must be '1'. +pub fn version(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.version +} +/// The Virtual Fields to be calculated, supporting other searchable enryption configurations. +pub fn virtual_fields(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.virtual_fields +} +} +impl BeaconVersion { + /// Creates a new builder-style object to manufacture [`BeaconVersion`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::BeaconVersionBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::BeaconVersionBuilder::default() + } +} + +/// A builder for [`BeaconVersion`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct BeaconVersionBuilder { + pub(crate) compound_beacons: ::std::option::Option<::std::vec::Vec>, +pub(crate) encrypted_parts: ::std::option::Option<::std::vec::Vec>, +pub(crate) key_source: ::std::option::Option, +pub(crate) key_store: ::std::option::Option, +pub(crate) signed_parts: ::std::option::Option<::std::vec::Vec>, +pub(crate) standard_beacons: ::std::option::Option<::std::vec::Vec>, +pub(crate) version: ::std::option::Option<::std::primitive::i32>, +pub(crate) virtual_fields: ::std::option::Option<::std::vec::Vec>, +} +impl BeaconVersionBuilder { + /// The Compound Beacons to be written with items. +pub fn compound_beacons(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.compound_beacons = ::std::option::Option::Some(input.into()); + self +} +/// The Compound Beacons to be written with items. +pub fn set_compound_beacons(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.compound_beacons = input; + self +} +/// The Compound Beacons to be written with items. +pub fn get_compound_beacons(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.compound_beacons +} +/// The list of Encrypted Parts that may be included in any compound beacon. +pub fn encrypted_parts(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_parts = ::std::option::Option::Some(input.into()); + self +} +/// The list of Encrypted Parts that may be included in any compound beacon. +pub fn set_encrypted_parts(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_parts = input; + self +} +/// The list of Encrypted Parts that may be included in any compound beacon. +pub fn get_encrypted_parts(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_parts +} +/// The configuration for what beacon key(s) to use. +pub fn key_source(mut self, input: impl ::std::convert::Into) -> Self { + self.key_source = ::std::option::Option::Some(input.into()); + self +} +/// The configuration for what beacon key(s) to use. +pub fn set_key_source(mut self, input: ::std::option::Option) -> Self { + self.key_source = input; + self +} +/// The configuration for what beacon key(s) to use. +pub fn get_key_source(&self) -> &::std::option::Option { + &self.key_source +} +/// The Key Store that contains the Beacon Keys to use with searchable encryption. +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 that contains the Beacon Keys to use with searchable encryption. +pub fn set_key_store(mut self, input: ::std::option::Option) -> Self { + self.key_store = input; + self +} +/// The Key Store that contains the Beacon Keys to use with searchable encryption. +pub fn get_key_store(&self) -> &::std::option::Option { + &self.key_store +} +/// The list of Signed Parts that may be included in any compound beacon. +pub fn signed_parts(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.signed_parts = ::std::option::Option::Some(input.into()); + self +} +/// The list of Signed Parts that may be included in any compound beacon. +pub fn set_signed_parts(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.signed_parts = input; + self +} +/// The list of Signed Parts that may be included in any compound beacon. +pub fn get_signed_parts(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.signed_parts +} +/// The Standard Beacons to be written with items. +pub fn standard_beacons(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.standard_beacons = ::std::option::Option::Some(input.into()); + self +} +/// The Standard Beacons to be written with items. +pub fn set_standard_beacons(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.standard_beacons = input; + self +} +/// The Standard Beacons to be written with items. +pub fn get_standard_beacons(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.standard_beacons +} +/// The version of searchable encryption configured. This must be '1'. +pub fn version(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.version = ::std::option::Option::Some(input.into()); + self +} +/// The version of searchable encryption configured. This must be '1'. +pub fn set_version(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.version = input; + self +} +/// The version of searchable encryption configured. This must be '1'. +pub fn get_version(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.version +} +/// The Virtual Fields to be calculated, supporting other searchable enryption configurations. +pub fn virtual_fields(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.virtual_fields = ::std::option::Option::Some(input.into()); + self +} +/// The Virtual Fields to be calculated, supporting other searchable enryption configurations. +pub fn set_virtual_fields(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.virtual_fields = input; + self +} +/// The Virtual Fields to be calculated, supporting other searchable enryption configurations. +pub fn get_virtual_fields(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.virtual_fields +} + /// Consumes the builder and constructs a [`BeaconVersion`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::BeaconVersion { + compound_beacons: self.compound_beacons, +encrypted_parts: self.encrypted_parts, +key_source: self.key_source, +key_store: self.key_store, +signed_parts: self.signed_parts, +standard_beacons: self.standard_beacons, +version: self.version, +virtual_fields: self.virtual_fields, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_compound_beacon.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_compound_beacon.rs new file mode 100644 index 000000000..bdc88a87b --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_compound_beacon.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 for a Compound Beacon. +pub struct CompoundBeacon { + /// The ordered list of constructors that may be used to create the Compound Beacon. Each constructor is checked, in order, to see if it can construct the beacon. The first constructor that can construct the beacon is used. If no constructor can construct the beacon, the Compound Beacon is not written to the item. +pub constructors: ::std::option::Option<::std::vec::Vec>, +/// The list of Encrypted Parts that may be included in the compound beacon. +pub encrypted: ::std::option::Option<::std::vec::Vec>, +/// The name of the Compound Beacon. +pub name: ::std::option::Option<::std::string::String>, +/// The list of Signed Parts that may be included in the compound beacon. +pub signed: ::std::option::Option<::std::vec::Vec>, +/// The characters used to split parts of a compound beacon. The split character should be a character that does not appear in any Signed Part or Prefix used by the Compound Beacon. +pub split: ::std::option::Option<::std::string::String>, +} +impl CompoundBeacon { + /// The ordered list of constructors that may be used to create the Compound Beacon. Each constructor is checked, in order, to see if it can construct the beacon. The first constructor that can construct the beacon is used. If no constructor can construct the beacon, the Compound Beacon is not written to the item. +pub fn constructors(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.constructors +} +/// The list of Encrypted Parts that may be included in the compound beacon. +pub fn encrypted(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted +} +/// The name of the Compound Beacon. +pub fn name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// The list of Signed Parts that may be included in the compound beacon. +pub fn signed(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.signed +} +/// The characters used to split parts of a compound beacon. The split character should be a character that does not appear in any Signed Part or Prefix used by the Compound Beacon. +pub fn split(&self) -> &::std::option::Option<::std::string::String> { + &self.split +} +} +impl CompoundBeacon { + /// Creates a new builder-style object to manufacture [`CompoundBeacon`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::CompoundBeaconBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::CompoundBeaconBuilder::default() + } +} + +/// A builder for [`CompoundBeacon`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CompoundBeaconBuilder { + pub(crate) constructors: ::std::option::Option<::std::vec::Vec>, +pub(crate) encrypted: ::std::option::Option<::std::vec::Vec>, +pub(crate) name: ::std::option::Option<::std::string::String>, +pub(crate) signed: ::std::option::Option<::std::vec::Vec>, +pub(crate) split: ::std::option::Option<::std::string::String>, +} +impl CompoundBeaconBuilder { + /// The ordered list of constructors that may be used to create the Compound Beacon. Each constructor is checked, in order, to see if it can construct the beacon. The first constructor that can construct the beacon is used. If no constructor can construct the beacon, the Compound Beacon is not written to the item. +pub fn constructors(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.constructors = ::std::option::Option::Some(input.into()); + self +} +/// The ordered list of constructors that may be used to create the Compound Beacon. Each constructor is checked, in order, to see if it can construct the beacon. The first constructor that can construct the beacon is used. If no constructor can construct the beacon, the Compound Beacon is not written to the item. +pub fn set_constructors(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.constructors = input; + self +} +/// The ordered list of constructors that may be used to create the Compound Beacon. Each constructor is checked, in order, to see if it can construct the beacon. The first constructor that can construct the beacon is used. If no constructor can construct the beacon, the Compound Beacon is not written to the item. +pub fn get_constructors(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.constructors +} +/// The list of Encrypted Parts that may be included in the compound beacon. +pub fn encrypted(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted = ::std::option::Option::Some(input.into()); + self +} +/// The list of Encrypted Parts that may be included in the compound beacon. +pub fn set_encrypted(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted = input; + self +} +/// The list of Encrypted Parts that may be included in the compound beacon. +pub fn get_encrypted(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted +} +/// The name of the Compound Beacon. +pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.name = ::std::option::Option::Some(input.into()); + self +} +/// The name of the Compound Beacon. +pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.name = input; + self +} +/// The name of the Compound Beacon. +pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// The list of Signed Parts that may be included in the compound beacon. +pub fn signed(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.signed = ::std::option::Option::Some(input.into()); + self +} +/// The list of Signed Parts that may be included in the compound beacon. +pub fn set_signed(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.signed = input; + self +} +/// The list of Signed Parts that may be included in the compound beacon. +pub fn get_signed(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.signed +} +/// The characters used to split parts of a compound beacon. The split character should be a character that does not appear in any Signed Part or Prefix used by the Compound Beacon. +pub fn split(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.split = ::std::option::Option::Some(input.into()); + self +} +/// The characters used to split parts of a compound beacon. The split character should be a character that does not appear in any Signed Part or Prefix used by the Compound Beacon. +pub fn set_split(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.split = input; + self +} +/// The characters used to split parts of a compound beacon. The split character should be a character that does not appear in any Signed Part or Prefix used by the Compound Beacon. +pub fn get_split(&self) -> &::std::option::Option<::std::string::String> { + &self.split +} + /// Consumes the builder and constructs a [`CompoundBeacon`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CompoundBeacon { + constructors: self.constructors, +encrypted: self.encrypted, +name: self.name, +signed: self.signed, +split: self.split, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_constructor.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_constructor.rs new file mode 100644 index 000000000..5fbec8a45 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_constructor.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 configuration for a particular Compound Beacon construction. +pub struct Constructor { + /// The ordered list of parts for a particular Compound Beacon construction. If the item contains all required Parts, a Compound beacon will be written using each Part that exists on the item, in the order specified. +pub parts: ::std::option::Option<::std::vec::Vec>, +} +impl Constructor { + /// The ordered list of parts for a particular Compound Beacon construction. If the item contains all required Parts, a Compound beacon will be written using each Part that exists on the item, in the order specified. +pub fn parts(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.parts +} +} +impl Constructor { + /// Creates a new builder-style object to manufacture [`Constructor`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Constructor). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::ConstructorBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::ConstructorBuilder::default() + } +} + +/// A builder for [`Constructor`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Constructor). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ConstructorBuilder { + pub(crate) parts: ::std::option::Option<::std::vec::Vec>, +} +impl ConstructorBuilder { + /// The ordered list of parts for a particular Compound Beacon construction. If the item contains all required Parts, a Compound beacon will be written using each Part that exists on the item, in the order specified. +pub fn parts(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.parts = ::std::option::Option::Some(input.into()); + self +} +/// The ordered list of parts for a particular Compound Beacon construction. If the item contains all required Parts, a Compound beacon will be written using each Part that exists on the item, in the order specified. +pub fn set_parts(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.parts = input; + self +} +/// The ordered list of parts for a particular Compound Beacon construction. If the item contains all required Parts, a Compound beacon will be written using each Part that exists on the item, in the order specified. +pub fn get_parts(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.parts +} + /// Consumes the builder and constructs a [`Constructor`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Constructor). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Constructor, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Constructor { + parts: self.parts, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_constructor_part.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_constructor_part.rs new file mode 100644 index 000000000..4fd4fae82 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_constructor_part.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 part of a Compound Becaon Construction. +pub struct ConstructorPart { + /// The name of the Encrypted Part or Signed Part for which this constructor part gets a value. +pub name: ::std::option::Option<::std::string::String>, +/// Whether this Encrypted Part or Signed Part is required for this construction to succeed. +pub required: ::std::option::Option<::std::primitive::bool>, +} +impl ConstructorPart { + /// The name of the Encrypted Part or Signed Part for which this constructor part gets a value. +pub fn name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// Whether this Encrypted Part or Signed Part is required for this construction to succeed. +pub fn required(&self) -> &::std::option::Option<::std::primitive::bool> { + &self.required +} +} +impl ConstructorPart { + /// Creates a new builder-style object to manufacture [`ConstructorPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::ConstructorPart). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::ConstructorPartBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::ConstructorPartBuilder::default() + } +} + +/// A builder for [`ConstructorPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::ConstructorPart). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ConstructorPartBuilder { + pub(crate) name: ::std::option::Option<::std::string::String>, +pub(crate) required: ::std::option::Option<::std::primitive::bool>, +} +impl ConstructorPartBuilder { + /// The name of the Encrypted Part or Signed Part for which this constructor part gets a value. +pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.name = ::std::option::Option::Some(input.into()); + self +} +/// The name of the Encrypted Part or Signed Part for which this constructor part gets a value. +pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.name = input; + self +} +/// The name of the Encrypted Part or Signed Part for which this constructor part gets a value. +pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// Whether this Encrypted Part or Signed Part is required for this construction to succeed. +pub fn required(mut self, input: impl ::std::convert::Into<::std::primitive::bool>) -> Self { + self.required = ::std::option::Option::Some(input.into()); + self +} +/// Whether this Encrypted Part or Signed Part is required for this construction to succeed. +pub fn set_required(mut self, input: ::std::option::Option<::std::primitive::bool>) -> Self { + self.required = input; + self +} +/// Whether this Encrypted Part or Signed Part is required for this construction to succeed. +pub fn get_required(&self) -> &::std::option::Option<::std::primitive::bool> { + &self.required +} + /// Consumes the builder and constructs a [`ConstructorPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::ConstructorPart). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::ConstructorPart, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::ConstructorPart { + name: self.name, +required: self.required, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_create_dynamo_db_encryption_branch_key_id_supplier_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_create_dynamo_db_encryption_branch_key_id_supplier_input.rs new file mode 100644 index 000000000..def5fd6dc --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_create_dynamo_db_encryption_branch_key_id_supplier_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 Branch Key Supplier from a DynamoDB Key Branch Key Id Supplier +pub struct CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + /// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub ddb_key_branch_key_id_supplier: ::std::option::Option, +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + /// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub fn ddb_key_branch_key_id_supplier(&self) -> &::std::option::Option { + &self.ddb_key_branch_key_id_supplier +} +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + /// Creates a new builder-style object to manufacture [`CreateDynamoDbEncryptionBranchKeyIdSupplierInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder::default() + } +} + +/// A builder for [`CreateDynamoDbEncryptionBranchKeyIdSupplierInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder { + pub(crate) ddb_key_branch_key_id_supplier: ::std::option::Option, +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder { + /// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub fn ddb_key_branch_key_id_supplier(mut self, input: impl ::std::convert::Into) -> Self { + self.ddb_key_branch_key_id_supplier = ::std::option::Option::Some(input.into()); + self +} +/// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub fn set_ddb_key_branch_key_id_supplier(mut self, input: ::std::option::Option) -> Self { + self.ddb_key_branch_key_id_supplier = input; + self +} +/// An implementation of the DynamoDbKeyBranchKeyIdSupplier interface, which determines what Branch Key to use for data key wrapping/unwrapping based on the DynamoDB item being written/read. +pub fn get_ddb_key_branch_key_id_supplier(&self) -> &::std::option::Option { + &self.ddb_key_branch_key_id_supplier +} + /// Consumes the builder and constructs a [`CreateDynamoDbEncryptionBranchKeyIdSupplierInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + ddb_key_branch_key_id_supplier: self.ddb_key_branch_key_id_supplier, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_create_dynamo_db_encryption_branch_key_id_supplier_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_create_dynamo_db_encryption_branch_key_id_supplier_output.rs new file mode 100644 index 000000000..ed995b237 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_create_dynamo_db_encryption_branch_key_id_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)] +/// Outputs for creating a Branch Key Supplier from a DynamoDB Key Branch Key Id Supplier +pub struct CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + /// The Branch Key Supplier for use with the Hierarchical Keyring. +pub branch_key_id_supplier: ::std::option::Option, +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + /// The Branch Key Supplier for use with the Hierarchical Keyring. +pub fn branch_key_id_supplier(&self) -> &::std::option::Option { + &self.branch_key_id_supplier +} +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + /// Creates a new builder-style object to manufacture [`CreateDynamoDbEncryptionBranchKeyIdSupplierOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::CreateDynamoDbEncryptionBranchKeyIdSupplierOutputBuilder::default() + } +} + +/// A builder for [`CreateDynamoDbEncryptionBranchKeyIdSupplierOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CreateDynamoDbEncryptionBranchKeyIdSupplierOutputBuilder { + pub(crate) branch_key_id_supplier: ::std::option::Option, +} +impl CreateDynamoDbEncryptionBranchKeyIdSupplierOutputBuilder { + /// The Branch Key Supplier for use with the Hierarchical Keyring. +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 +} +/// The Branch Key Supplier for use with the Hierarchical Keyring. +pub fn set_branch_key_id_supplier(mut self, input: ::std::option::Option) -> Self { + self.branch_key_id_supplier = input; + self +} +/// The Branch Key Supplier for use with the Hierarchical Keyring. +pub fn get_branch_key_id_supplier(&self) -> &::std::option::Option { + &self.branch_key_id_supplier +} + /// Consumes the builder and constructs a [`CreateDynamoDbEncryptionBranchKeyIdSupplierOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + branch_key_id_supplier: self.branch_key_id_supplier, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_dynamo_db_table_encryption_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_dynamo_db_table_encryption_config.rs new file mode 100644 index 000000000..830b05a44 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_dynamo_db_table_encryption_config.rs @@ -0,0 +1,300 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This 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 for client-side encryption for a particular DynamoDB table. +pub struct DynamoDbTableEncryptionConfig { + /// An ID for the algorithm suite to use during encryption and decryption. +pub algorithm_suite_id: ::std::option::Option, +/// A prefix such that, if during decryption any attribute has a name with this prefix, it is treated as unsigned. +pub allowed_unsigned_attribute_prefix: ::std::option::Option<::std::string::String>, +/// A list of attribute names such that, if encountered during decryption, those attributes are treated as unsigned. +pub allowed_unsigned_attributes: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// A map that describes what attributes should be encrypted and/or signed on encrypt. This map must contain all attributes that might be encountered during encryption. +pub attribute_actions_on_encrypt: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +/// The Cryptographic Materials Manager that is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub cmm: ::std::option::Option, +/// The Keyring that should be used to wrap and unwrap data keys. If specified a Default Cryptographic Materials Manager with this Keyring is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub keyring: ::std::option::Option, +/// A configuration that override encryption and/or decryption to instead perform legacy encryption and/or decryption. Used as part of migration from version 2.x to version 3.x. +pub legacy_override: ::std::option::Option, +/// The logical table name for this table. This is the name that is cryptographically bound with your data. This can be the same as the actual DynamoDB table name. It's purpose is to be distinct from the DynamoDB table name so that the data may still be authenticated if being read from different (but logically similar) tables, such as a backup table. +pub logical_table_name: ::std::option::Option<::std::string::String>, +/// The name of the partition key on this table. +pub partition_key_name: ::std::option::Option<::std::string::String>, +/// A configuration that override encryption and/or decryption to instead passthrough and write and/or read plaintext. Used to update plaintext tables to fully use client-side encryption. +pub plaintext_override: ::std::option::Option, +/// The configuration for searchable encryption. +pub search: ::std::option::Option, +/// If this table contains a sort key, the name of the sort key on this table. +pub sort_key_name: ::std::option::Option<::std::string::String>, +} +impl DynamoDbTableEncryptionConfig { + /// An ID for the algorithm suite to use during encryption and decryption. +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +/// A prefix such that, if during decryption any attribute has a name with this prefix, it is treated as unsigned. +pub fn allowed_unsigned_attribute_prefix(&self) -> &::std::option::Option<::std::string::String> { + &self.allowed_unsigned_attribute_prefix +} +/// A list of attribute names such that, if encountered during decryption, those attributes are treated as unsigned. +pub fn allowed_unsigned_attributes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.allowed_unsigned_attributes +} +/// A map that describes what attributes should be encrypted and/or signed on encrypt. This map must contain all attributes that might be encountered during encryption. +pub fn attribute_actions_on_encrypt(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.attribute_actions_on_encrypt +} +/// The Cryptographic Materials Manager that is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn cmm(&self) -> &::std::option::Option { + &self.cmm +} +/// The Keyring that should be used to wrap and unwrap data keys. If specified a Default Cryptographic Materials Manager with this Keyring is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +/// A configuration that override encryption and/or decryption to instead perform legacy encryption and/or decryption. Used as part of migration from version 2.x to version 3.x. +pub fn legacy_override(&self) -> &::std::option::Option { + &self.legacy_override +} +/// The logical table name for this table. This is the name that is cryptographically bound with your data. This can be the same as the actual DynamoDB table name. It's purpose is to be distinct from the DynamoDB table name so that the data may still be authenticated if being read from different (but logically similar) tables, such as a backup table. +pub fn logical_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.logical_table_name +} +/// The name of the partition key on this table. +pub fn partition_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.partition_key_name +} +/// A configuration that override encryption and/or decryption to instead passthrough and write and/or read plaintext. Used to update plaintext tables to fully use client-side encryption. +pub fn plaintext_override(&self) -> &::std::option::Option { + &self.plaintext_override +} +/// The configuration for searchable encryption. +pub fn search(&self) -> &::std::option::Option { + &self.search +} +/// If this table contains a sort key, the name of the sort key on this table. +pub fn sort_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.sort_key_name +} +} +impl DynamoDbTableEncryptionConfig { + /// Creates a new builder-style object to manufacture [`DynamoDbTableEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::DynamoDbTableEncryptionConfigBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::DynamoDbTableEncryptionConfigBuilder::default() + } +} + +/// A builder for [`DynamoDbTableEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DynamoDbTableEncryptionConfigBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) allowed_unsigned_attribute_prefix: ::std::option::Option<::std::string::String>, +pub(crate) allowed_unsigned_attributes: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) attribute_actions_on_encrypt: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +pub(crate) cmm: ::std::option::Option, +pub(crate) keyring: ::std::option::Option, +pub(crate) legacy_override: ::std::option::Option, +pub(crate) logical_table_name: ::std::option::Option<::std::string::String>, +pub(crate) partition_key_name: ::std::option::Option<::std::string::String>, +pub(crate) plaintext_override: ::std::option::Option, +pub(crate) search: ::std::option::Option, +pub(crate) sort_key_name: ::std::option::Option<::std::string::String>, +} +impl DynamoDbTableEncryptionConfigBuilder { + /// An ID for the algorithm suite to use during encryption and decryption. +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite_id = ::std::option::Option::Some(input.into()); + self +} +/// An ID for the algorithm suite to use during encryption and decryption. +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite_id = input; + self +} +/// An ID for the algorithm suite to use during encryption and decryption. +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +/// A prefix such that, if during decryption any attribute has a name with this prefix, it is treated as unsigned. +pub fn allowed_unsigned_attribute_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.allowed_unsigned_attribute_prefix = ::std::option::Option::Some(input.into()); + self +} +/// A prefix such that, if during decryption any attribute has a name with this prefix, it is treated as unsigned. +pub fn set_allowed_unsigned_attribute_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.allowed_unsigned_attribute_prefix = input; + self +} +/// A prefix such that, if during decryption any attribute has a name with this prefix, it is treated as unsigned. +pub fn get_allowed_unsigned_attribute_prefix(&self) -> &::std::option::Option<::std::string::String> { + &self.allowed_unsigned_attribute_prefix +} +/// A list of attribute names such that, if encountered during decryption, those attributes are treated as unsigned. +pub fn allowed_unsigned_attributes(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.allowed_unsigned_attributes = ::std::option::Option::Some(input.into()); + self +} +/// A list of attribute names such that, if encountered during decryption, those attributes are treated as unsigned. +pub fn set_allowed_unsigned_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.allowed_unsigned_attributes = input; + self +} +/// A list of attribute names such that, if encountered during decryption, those attributes are treated as unsigned. +pub fn get_allowed_unsigned_attributes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.allowed_unsigned_attributes +} +/// A map that describes what attributes should be encrypted and/or signed on encrypt. This map must contain all attributes that might be encountered during encryption. +pub fn attribute_actions_on_encrypt(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.attribute_actions_on_encrypt = ::std::option::Option::Some(input.into()); + self +} +/// A map that describes what attributes should be encrypted and/or signed on encrypt. This map must contain all attributes that might be encountered during encryption. +pub fn set_attribute_actions_on_encrypt(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.attribute_actions_on_encrypt = input; + self +} +/// A map that describes what attributes should be encrypted and/or signed on encrypt. This map must contain all attributes that might be encountered during encryption. +pub fn get_attribute_actions_on_encrypt(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.attribute_actions_on_encrypt +} +/// The Cryptographic Materials Manager that is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.cmm = ::std::option::Option::Some(input.into()); + self +} +/// The Cryptographic Materials Manager that is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.cmm = input; + self +} +/// The Cryptographic Materials Manager that is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn get_cmm(&self) -> &::std::option::Option { + &self.cmm +} +/// The Keyring that should be used to wrap and unwrap data keys. If specified a Default Cryptographic Materials Manager with this Keyring is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The Keyring that should be used to wrap and unwrap data keys. If specified a Default Cryptographic Materials Manager with this Keyring is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The Keyring that should be used to wrap and unwrap data keys. If specified a Default Cryptographic Materials Manager with this Keyring is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} +/// A configuration that override encryption and/or decryption to instead perform legacy encryption and/or decryption. Used as part of migration from version 2.x to version 3.x. +pub fn legacy_override(mut self, input: impl ::std::convert::Into) -> Self { + self.legacy_override = ::std::option::Option::Some(input.into()); + self +} +/// A configuration that override encryption and/or decryption to instead perform legacy encryption and/or decryption. Used as part of migration from version 2.x to version 3.x. +pub fn set_legacy_override(mut self, input: ::std::option::Option) -> Self { + self.legacy_override = input; + self +} +/// A configuration that override encryption and/or decryption to instead perform legacy encryption and/or decryption. Used as part of migration from version 2.x to version 3.x. +pub fn get_legacy_override(&self) -> &::std::option::Option { + &self.legacy_override +} +/// The logical table name for this table. This is the name that is cryptographically bound with your data. This can be the same as the actual DynamoDB table name. It's purpose is to be distinct from the DynamoDB table name so that the data may still be authenticated if being read from different (but logically similar) tables, such as a backup table. +pub fn logical_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.logical_table_name = ::std::option::Option::Some(input.into()); + self +} +/// The logical table name for this table. This is the name that is cryptographically bound with your data. This can be the same as the actual DynamoDB table name. It's purpose is to be distinct from the DynamoDB table name so that the data may still be authenticated if being read from different (but logically similar) tables, such as a backup table. +pub fn set_logical_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.logical_table_name = input; + self +} +/// The logical table name for this table. This is the name that is cryptographically bound with your data. This can be the same as the actual DynamoDB table name. It's purpose is to be distinct from the DynamoDB table name so that the data may still be authenticated if being read from different (but logically similar) tables, such as a backup table. +pub fn get_logical_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.logical_table_name +} +/// The name of the partition key on this table. +pub fn partition_key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.partition_key_name = ::std::option::Option::Some(input.into()); + self +} +/// The name of the partition key on this table. +pub fn set_partition_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.partition_key_name = input; + self +} +/// The name of the partition key on this table. +pub fn get_partition_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.partition_key_name +} +/// A configuration that override encryption and/or decryption to instead passthrough and write and/or read plaintext. Used to update plaintext tables to fully use client-side encryption. +pub fn plaintext_override(mut self, input: impl ::std::convert::Into) -> Self { + self.plaintext_override = ::std::option::Option::Some(input.into()); + self +} +/// A configuration that override encryption and/or decryption to instead passthrough and write and/or read plaintext. Used to update plaintext tables to fully use client-side encryption. +pub fn set_plaintext_override(mut self, input: ::std::option::Option) -> Self { + self.plaintext_override = input; + self +} +/// A configuration that override encryption and/or decryption to instead passthrough and write and/or read plaintext. Used to update plaintext tables to fully use client-side encryption. +pub fn get_plaintext_override(&self) -> &::std::option::Option { + &self.plaintext_override +} +/// The configuration for searchable encryption. +pub fn search(mut self, input: impl ::std::convert::Into) -> Self { + self.search = ::std::option::Option::Some(input.into()); + self +} +/// The configuration for searchable encryption. +pub fn set_search(mut self, input: ::std::option::Option) -> Self { + self.search = input; + self +} +/// The configuration for searchable encryption. +pub fn get_search(&self) -> &::std::option::Option { + &self.search +} +/// If this table contains a sort key, the name of the sort key on this table. +pub fn sort_key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.sort_key_name = ::std::option::Option::Some(input.into()); + self +} +/// If this table contains a sort key, the name of the sort key on this table. +pub fn set_sort_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.sort_key_name = input; + self +} +/// If this table contains a sort key, the name of the sort key on this table. +pub fn get_sort_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.sort_key_name +} + /// Consumes the builder and constructs a [`DynamoDbTableEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig { + algorithm_suite_id: self.algorithm_suite_id, +allowed_unsigned_attribute_prefix: self.allowed_unsigned_attribute_prefix, +allowed_unsigned_attributes: self.allowed_unsigned_attributes, +attribute_actions_on_encrypt: self.attribute_actions_on_encrypt, +cmm: self.cmm, +keyring: self.keyring, +legacy_override: self.legacy_override, +logical_table_name: self.logical_table_name, +partition_key_name: self.partition_key_name, +plaintext_override: self.plaintext_override, +search: self.search, +sort_key_name: self.sort_key_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_dynamo_db_tables_encryption_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_dynamo_db_tables_encryption_config.rs new file mode 100644 index 000000000..c59b8058a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_dynamo_db_tables_encryption_config.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 configuration for client-side encryption with multiple DynamoDB table. +pub struct DynamoDbTablesEncryptionConfig { + /// A map of DynamoDB table name to its configuration for client-side encryption. +pub table_encryption_configs: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig>>, +} +impl DynamoDbTablesEncryptionConfig { + /// A map of DynamoDB table name to its configuration for client-side encryption. +pub fn table_encryption_configs(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig>> { + &self.table_encryption_configs +} +} +impl DynamoDbTablesEncryptionConfig { + /// Creates a new builder-style object to manufacture [`DynamoDbTablesEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTablesEncryptionConfig). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::DynamoDbTablesEncryptionConfigBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::DynamoDbTablesEncryptionConfigBuilder::default() + } +} + +/// A builder for [`DynamoDbTablesEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTablesEncryptionConfig). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DynamoDbTablesEncryptionConfigBuilder { + pub(crate) table_encryption_configs: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig>>, +} +impl DynamoDbTablesEncryptionConfigBuilder { + /// A map of DynamoDB table name to its configuration for client-side encryption. +pub fn table_encryption_configs(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig>>) -> Self { + self.table_encryption_configs = ::std::option::Option::Some(input.into()); + self +} +/// A map of DynamoDB table name to its configuration for client-side encryption. +pub fn set_table_encryption_configs(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig>>) -> Self { + self.table_encryption_configs = input; + self +} +/// A map of DynamoDB table name to its configuration for client-side encryption. +pub fn get_table_encryption_configs(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig>> { + &self.table_encryption_configs +} + /// Consumes the builder and constructs a [`DynamoDbTablesEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTablesEncryptionConfig). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTablesEncryptionConfig, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTablesEncryptionConfig { + table_encryption_configs: self.table_encryption_configs, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_encrypted_data_key_description.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_encrypted_data_key_description.rs new file mode 100644 index 000000000..34258e11d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_encrypted_data_key_description.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 EncryptedDataKeyDescription { + /// Branch key id of the encrypted data key. +pub branch_key_id: ::std::option::Option<::std::string::String>, +/// Branch key version of the encrypted data key. +pub branch_key_version: ::std::option::Option<::std::string::String>, +/// Key provider id of the encrypted data key. +pub key_provider_id: ::std::option::Option<::std::string::String>, +/// Key provider information of the encrypted data key. +pub key_provider_info: ::std::option::Option<::std::string::String>, +} +impl EncryptedDataKeyDescription { + /// Branch key id of the encrypted data key. +pub fn branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} +/// Branch key version of the encrypted data key. +pub fn branch_key_version(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_version +} +/// Key provider id of the encrypted data key. +pub fn key_provider_id(&self) -> &::std::option::Option<::std::string::String> { + &self.key_provider_id +} +/// Key provider information of the encrypted data key. +pub fn key_provider_info(&self) -> &::std::option::Option<::std::string::String> { + &self.key_provider_info +} +} +impl EncryptedDataKeyDescription { + /// Creates a new builder-style object to manufacture [`EncryptedDataKeyDescription`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::EncryptedDataKeyDescriptionBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::EncryptedDataKeyDescriptionBuilder::default() + } +} + +/// A builder for [`EncryptedDataKeyDescription`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptedDataKeyDescriptionBuilder { + pub(crate) branch_key_id: ::std::option::Option<::std::string::String>, +pub(crate) branch_key_version: ::std::option::Option<::std::string::String>, +pub(crate) key_provider_id: ::std::option::Option<::std::string::String>, +pub(crate) key_provider_info: ::std::option::Option<::std::string::String>, +} +impl EncryptedDataKeyDescriptionBuilder { + /// Branch key id of the encrypted data key. +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 +} +/// Branch key id of the encrypted data key. +pub fn set_branch_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_id = input; + self +} +/// Branch key id of the encrypted data key. +pub fn get_branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} +/// Branch key version of the encrypted data key. +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 +} +/// Branch key version of the encrypted data key. +pub fn set_branch_key_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_version = input; + self +} +/// Branch key version of the encrypted data key. +pub fn get_branch_key_version(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_version +} +/// Key provider id of the encrypted data key. +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 +} +/// Key provider id of the encrypted data key. +pub fn set_key_provider_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_provider_id = input; + self +} +/// Key provider id of the encrypted data key. +pub fn get_key_provider_id(&self) -> &::std::option::Option<::std::string::String> { + &self.key_provider_id +} +/// Key provider information of the encrypted data key. +pub fn key_provider_info(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_provider_info = ::std::option::Option::Some(input.into()); + self +} +/// Key provider information of the encrypted data key. +pub fn set_key_provider_info(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_provider_info = input; + self +} +/// Key provider information of the encrypted data key. +pub fn get_key_provider_info(&self) -> &::std::option::Option<::std::string::String> { + &self.key_provider_info +} + /// Consumes the builder and constructs a [`EncryptedDataKeyDescription`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedDataKeyDescription { + branch_key_id: self.branch_key_id, +branch_key_version: self.branch_key_version, +key_provider_id: self.key_provider_id, +key_provider_info: self.key_provider_info, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_encrypted_part.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_encrypted_part.rs new file mode 100644 index 000000000..409462f55 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_encrypted_part.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 part of a Compound Beacon that contains a beacon over encrypted data. +pub struct EncryptedPart { + /// The name of the Standard Beacon, whose value this Part will hold. +pub name: ::std::option::Option<::std::string::String>, +/// The prefix that is written with this Encrypted Part. +pub prefix: ::std::option::Option<::std::string::String>, +} +impl EncryptedPart { + /// The name of the Standard Beacon, whose value this Part will hold. +pub fn name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// The prefix that is written with this Encrypted Part. +pub fn prefix(&self) -> &::std::option::Option<::std::string::String> { + &self.prefix +} +} +impl EncryptedPart { + /// Creates a new builder-style object to manufacture [`EncryptedPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::EncryptedPartBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::EncryptedPartBuilder::default() + } +} + +/// A builder for [`EncryptedPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptedPartBuilder { + pub(crate) name: ::std::option::Option<::std::string::String>, +pub(crate) prefix: ::std::option::Option<::std::string::String>, +} +impl EncryptedPartBuilder { + /// The name of the Standard Beacon, whose value this Part will hold. +pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.name = ::std::option::Option::Some(input.into()); + self +} +/// The name of the Standard Beacon, whose value this Part will hold. +pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.name = input; + self +} +/// The name of the Standard Beacon, whose value this Part will hold. +pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// The prefix that is written with this Encrypted Part. +pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.prefix = ::std::option::Option::Some(input.into()); + self +} +/// The prefix that is written with this Encrypted Part. +pub fn set_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.prefix = input; + self +} +/// The prefix that is written with this Encrypted Part. +pub fn get_prefix(&self) -> &::std::option::Option<::std::string::String> { + &self.prefix +} + /// Consumes the builder and constructs a [`EncryptedPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::EncryptedPart { + name: self.name, +prefix: self.prefix, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_branch_key_id_from_ddb_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_branch_key_id_from_ddb_key_input.rs new file mode 100644 index 000000000..895b64aec --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_branch_key_id_from_ddb_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 the Branch Key that should be used for wrapping and unwrapping data keys. +pub struct GetBranchKeyIdFromDdbKeyInput { + /// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub ddb_key: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl GetBranchKeyIdFromDdbKeyInput { + /// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub fn ddb_key(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.ddb_key +} +} +impl GetBranchKeyIdFromDdbKeyInput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyIdFromDdbKeyInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetBranchKeyIdFromDdbKeyInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetBranchKeyIdFromDdbKeyInputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyIdFromDdbKeyInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyIdFromDdbKeyInputBuilder { + pub(crate) ddb_key: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl GetBranchKeyIdFromDdbKeyInputBuilder { + /// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub fn ddb_key(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.ddb_key = ::std::option::Option::Some(input.into()); + self +} +/// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub fn set_ddb_key(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.ddb_key = input; + self +} +/// The partition and sort (if it exists) attributes on the item being read or written, along with the values of any attributes configured as SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT. +pub fn get_ddb_key(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.ddb_key +} + /// Consumes the builder and constructs a [`GetBranchKeyIdFromDdbKeyInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyInput { + ddb_key: self.ddb_key, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_branch_key_id_from_ddb_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_branch_key_id_from_ddb_key_output.rs new file mode 100644 index 000000000..e9e5ee13b --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_branch_key_id_from_ddb_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 the Branch Key that should be used for wrapping and unwrapping data keys. +pub struct GetBranchKeyIdFromDdbKeyOutput { + /// The ID of the Branch Key that should be used to wrap and unwrap data keys for this item. +pub branch_key_id: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyIdFromDdbKeyOutput { + /// The ID of the Branch Key that should be used to wrap and unwrap data keys for this item. +pub fn branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} +} +impl GetBranchKeyIdFromDdbKeyOutput { + /// Creates a new builder-style object to manufacture [`GetBranchKeyIdFromDdbKeyOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetBranchKeyIdFromDdbKeyOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetBranchKeyIdFromDdbKeyOutputBuilder::default() + } +} + +/// A builder for [`GetBranchKeyIdFromDdbKeyOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetBranchKeyIdFromDdbKeyOutputBuilder { + pub(crate) branch_key_id: ::std::option::Option<::std::string::String>, +} +impl GetBranchKeyIdFromDdbKeyOutputBuilder { + /// The ID of the Branch Key that should be used to wrap and unwrap data keys for this item. +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 ID of the Branch Key that should be used to wrap and unwrap data keys for this item. +pub fn set_branch_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.branch_key_id = input; + self +} +/// The ID of the Branch Key that should be used to wrap and unwrap data keys for this item. +pub fn get_branch_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.branch_key_id +} + /// Consumes the builder and constructs a [`GetBranchKeyIdFromDdbKeyOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetBranchKeyIdFromDdbKeyOutput { + branch_key_id: self.branch_key_id, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_encrypted_data_key_description_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_encrypted_data_key_description_input.rs new file mode 100644 index 000000000..92e32f7c2 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_encrypted_data_key_description_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)] +/// Input for getting encrypted data key description. +pub struct GetEncryptedDataKeyDescriptionInput { + #[allow(missing_docs)] +pub input: ::std::option::Option, +} +impl GetEncryptedDataKeyDescriptionInput { + #[allow(missing_docs)] +pub fn input(&self) -> &::std::option::Option { + &self.input +} +} +impl GetEncryptedDataKeyDescriptionInput { + /// Creates a new builder-style object to manufacture [`GetEncryptedDataKeyDescriptionInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetEncryptedDataKeyDescriptionInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetEncryptedDataKeyDescriptionInputBuilder::default() + } +} + +/// A builder for [`GetEncryptedDataKeyDescriptionInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetEncryptedDataKeyDescriptionInputBuilder { + pub(crate) input: ::std::option::Option, +} +impl GetEncryptedDataKeyDescriptionInputBuilder { + #[allow(missing_docs)] +pub fn input(mut self, input: impl ::std::convert::Into) -> Self { + self.input = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_input(mut self, input: ::std::option::Option) -> Self { + self.input = input; + self +} +#[allow(missing_docs)] +pub fn get_input(&self) -> &::std::option::Option { + &self.input +} + /// Consumes the builder and constructs a [`GetEncryptedDataKeyDescriptionInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionInput { + input: self.input, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_encrypted_data_key_description_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_encrypted_data_key_description_output.rs new file mode 100644 index 000000000..0ebba4c14 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_encrypted_data_key_description_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)] +/// Output for getting encrypted data key description. +pub struct GetEncryptedDataKeyDescriptionOutput { + /// A list of encrypted data key description. +pub encrypted_data_key_description_output: ::std::option::Option<::std::vec::Vec>, +} +impl GetEncryptedDataKeyDescriptionOutput { + /// A list of encrypted data key description. +pub fn encrypted_data_key_description_output(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_key_description_output +} +} +impl GetEncryptedDataKeyDescriptionOutput { + /// Creates a new builder-style object to manufacture [`GetEncryptedDataKeyDescriptionOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetEncryptedDataKeyDescriptionOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetEncryptedDataKeyDescriptionOutputBuilder::default() + } +} + +/// A builder for [`GetEncryptedDataKeyDescriptionOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetEncryptedDataKeyDescriptionOutputBuilder { + pub(crate) encrypted_data_key_description_output: ::std::option::Option<::std::vec::Vec>, +} +impl GetEncryptedDataKeyDescriptionOutputBuilder { + /// A list of encrypted data key description. +pub fn encrypted_data_key_description_output(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_data_key_description_output = ::std::option::Option::Some(input.into()); + self +} +/// A list of encrypted data key description. +pub fn set_encrypted_data_key_description_output(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_data_key_description_output = input; + self +} +/// A list of encrypted data key description. +pub fn get_encrypted_data_key_description_output(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_key_description_output +} + /// Consumes the builder and constructs a [`GetEncryptedDataKeyDescriptionOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionOutput { + encrypted_data_key_description_output: self.encrypted_data_key_description_output, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_encrypted_data_key_description_union.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_encrypted_data_key_description_union.rs new file mode 100644 index 000000000..a8e17fa5f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_encrypted_data_key_description_union.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 GetEncryptedDataKeyDescriptionUnion { + /// A binary header value. +Header(::aws_smithy_types::Blob), +/// A DynamoDB item. +Item(::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>), + /// 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 GetEncryptedDataKeyDescriptionUnion { + /// Tries to convert the enum instance into [`Header`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Header), extracting the inner [`::aws_smithy_types::Blob`](::aws_smithy_types::Blob). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_header(&self) -> ::std::result::Result<&::aws_smithy_types::Blob, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Header(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Item`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Item), extracting the inner [`::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>`](::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_item(&self) -> ::std::result::Result<&::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Item(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`Header`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Header). +pub fn is_header(&self) -> ::std::primitive::bool { + self.as_header().is_ok() +} +/// Returns true if this is a [`Item`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion::Item). +pub fn is_item(&self) -> ::std::primitive::bool { + self.as_item().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_prefix.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_prefix.rs new file mode 100644 index 000000000..d1cd1b5e7 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_prefix.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 Virtual Part Transformation that gets the prefix of a string. +pub struct GetPrefix { + /// If positive, the number of characters to return from the front. If negative, the absolute number of characters to exclude from the end. e.g. GetPrefix(-1) returns all but the last character. +pub length: ::std::option::Option<::std::primitive::i32>, +} +impl GetPrefix { + /// If positive, the number of characters to return from the front. If negative, the absolute number of characters to exclude from the end. e.g. GetPrefix(-1) returns all but the last character. +pub fn length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} +} +impl GetPrefix { + /// Creates a new builder-style object to manufacture [`GetPrefix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetPrefixBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetPrefixBuilder::default() + } +} + +/// A builder for [`GetPrefix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetPrefixBuilder { + pub(crate) length: ::std::option::Option<::std::primitive::i32>, +} +impl GetPrefixBuilder { + /// If positive, the number of characters to return from the front. If negative, the absolute number of characters to exclude from the end. e.g. GetPrefix(-1) returns all but the last character. +pub fn length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.length = ::std::option::Option::Some(input.into()); + self +} +/// If positive, the number of characters to return from the front. If negative, the absolute number of characters to exclude from the end. e.g. GetPrefix(-1) returns all but the last character. +pub fn set_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.length = input; + self +} +/// If positive, the number of characters to return from the front. If negative, the absolute number of characters to exclude from the end. e.g. GetPrefix(-1) returns all but the last character. +pub fn get_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} + /// Consumes the builder and constructs a [`GetPrefix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix { + length: self.length, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_segment.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_segment.rs new file mode 100644 index 000000000..67389e35e --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_segment.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)] +/// The Virtual Part Transformation that splits a string and gets a particular segment of that split. +pub struct GetSegment { + /// The index of the split string result to return. 0 represents the segment before the first split character. -1 respresents the segment after the last split character. +pub index: ::std::option::Option<::std::primitive::i32>, +/// The characters to split on. +pub split: ::std::option::Option<::std::string::String>, +} +impl GetSegment { + /// The index of the split string result to return. 0 represents the segment before the first split character. -1 respresents the segment after the last split character. +pub fn index(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.index +} +/// The characters to split on. +pub fn split(&self) -> &::std::option::Option<::std::string::String> { + &self.split +} +} +impl GetSegment { + /// Creates a new builder-style object to manufacture [`GetSegment`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetSegmentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetSegmentBuilder::default() + } +} + +/// A builder for [`GetSegment`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetSegmentBuilder { + pub(crate) index: ::std::option::Option<::std::primitive::i32>, +pub(crate) split: ::std::option::Option<::std::string::String>, +} +impl GetSegmentBuilder { + /// The index of the split string result to return. 0 represents the segment before the first split character. -1 respresents the segment after the last split character. +pub fn index(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.index = ::std::option::Option::Some(input.into()); + self +} +/// The index of the split string result to return. 0 represents the segment before the first split character. -1 respresents the segment after the last split character. +pub fn set_index(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.index = input; + self +} +/// The index of the split string result to return. 0 represents the segment before the first split character. -1 respresents the segment after the last split character. +pub fn get_index(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.index +} +/// The characters to split on. +pub fn split(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.split = ::std::option::Option::Some(input.into()); + self +} +/// The characters to split on. +pub fn set_split(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.split = input; + self +} +/// The characters to split on. +pub fn get_split(&self) -> &::std::option::Option<::std::string::String> { + &self.split +} + /// Consumes the builder and constructs a [`GetSegment`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment { + index: self.index, +split: self.split, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_segments.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_segments.rs new file mode 100644 index 000000000..08a88b6c4 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_segments.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)] +/// The Virtual Part Transformation that splits a string and gets a range of segments of that split. +pub struct GetSegments { + /// The index to stop the segments at, exclusive. Negative numbers count from the end. -1 is the last segment. +pub high: ::std::option::Option<::std::primitive::i32>, +/// The index to start the segments from, inclusive. Negative numbers count from the end. -1 is the last segment. +pub low: ::std::option::Option<::std::primitive::i32>, +/// The characters to split on. +pub split: ::std::option::Option<::std::string::String>, +} +impl GetSegments { + /// The index to stop the segments at, exclusive. Negative numbers count from the end. -1 is the last segment. +pub fn high(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.high +} +/// The index to start the segments from, inclusive. Negative numbers count from the end. -1 is the last segment. +pub fn low(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.low +} +/// The characters to split on. +pub fn split(&self) -> &::std::option::Option<::std::string::String> { + &self.split +} +} +impl GetSegments { + /// Creates a new builder-style object to manufacture [`GetSegments`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetSegmentsBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetSegmentsBuilder::default() + } +} + +/// A builder for [`GetSegments`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetSegmentsBuilder { + pub(crate) high: ::std::option::Option<::std::primitive::i32>, +pub(crate) low: ::std::option::Option<::std::primitive::i32>, +pub(crate) split: ::std::option::Option<::std::string::String>, +} +impl GetSegmentsBuilder { + /// The index to stop the segments at, exclusive. Negative numbers count from the end. -1 is the last segment. +pub fn high(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.high = ::std::option::Option::Some(input.into()); + self +} +/// The index to stop the segments at, exclusive. Negative numbers count from the end. -1 is the last segment. +pub fn set_high(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.high = input; + self +} +/// The index to stop the segments at, exclusive. Negative numbers count from the end. -1 is the last segment. +pub fn get_high(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.high +} +/// The index to start the segments from, inclusive. Negative numbers count from the end. -1 is the last segment. +pub fn low(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.low = ::std::option::Option::Some(input.into()); + self +} +/// The index to start the segments from, inclusive. Negative numbers count from the end. -1 is the last segment. +pub fn set_low(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.low = input; + self +} +/// The index to start the segments from, inclusive. Negative numbers count from the end. -1 is the last segment. +pub fn get_low(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.low +} +/// The characters to split on. +pub fn split(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.split = ::std::option::Option::Some(input.into()); + self +} +/// The characters to split on. +pub fn set_split(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.split = input; + self +} +/// The characters to split on. +pub fn get_split(&self) -> &::std::option::Option<::std::string::String> { + &self.split +} + /// Consumes the builder and constructs a [`GetSegments`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments { + high: self.high, +low: self.low, +split: self.split, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_substring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_substring.rs new file mode 100644 index 000000000..97ba942ca --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_substring.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)] +/// The Virtual Part Transformation that gets a substring from a string. +pub struct GetSubstring { + /// The index to stop the substring at, exclusive. Negative numbers count from the end. -1 is the last character of a string. +pub high: ::std::option::Option<::std::primitive::i32>, +/// The index to start the substring from, inclusive. Negative numbers count from the end. -1 is the last character of a string. +pub low: ::std::option::Option<::std::primitive::i32>, +} +impl GetSubstring { + /// The index to stop the substring at, exclusive. Negative numbers count from the end. -1 is the last character of a string. +pub fn high(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.high +} +/// The index to start the substring from, inclusive. Negative numbers count from the end. -1 is the last character of a string. +pub fn low(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.low +} +} +impl GetSubstring { + /// Creates a new builder-style object to manufacture [`GetSubstring`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetSubstringBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetSubstringBuilder::default() + } +} + +/// A builder for [`GetSubstring`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetSubstringBuilder { + pub(crate) high: ::std::option::Option<::std::primitive::i32>, +pub(crate) low: ::std::option::Option<::std::primitive::i32>, +} +impl GetSubstringBuilder { + /// The index to stop the substring at, exclusive. Negative numbers count from the end. -1 is the last character of a string. +pub fn high(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.high = ::std::option::Option::Some(input.into()); + self +} +/// The index to stop the substring at, exclusive. Negative numbers count from the end. -1 is the last character of a string. +pub fn set_high(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.high = input; + self +} +/// The index to stop the substring at, exclusive. Negative numbers count from the end. -1 is the last character of a string. +pub fn get_high(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.high +} +/// The index to start the substring from, inclusive. Negative numbers count from the end. -1 is the last character of a string. +pub fn low(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.low = ::std::option::Option::Some(input.into()); + self +} +/// The index to start the substring from, inclusive. Negative numbers count from the end. -1 is the last character of a string. +pub fn set_low(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.low = input; + self +} +/// The index to start the substring from, inclusive. Negative numbers count from the end. -1 is the last character of a string. +pub fn get_low(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.low +} + /// Consumes the builder and constructs a [`GetSubstring`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring { + high: self.high, +low: self.low, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_suffix.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_suffix.rs new file mode 100644 index 000000000..99fa3f135 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_get_suffix.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 Virtual Part Transformation that gets the suffix of a string. +pub struct GetSuffix { + /// If positive, the number of characters to return from the end. If negative, the absolute number of characters to exclude from the front. e.g. GetSuffix(-1) returns all but the first character. +pub length: ::std::option::Option<::std::primitive::i32>, +} +impl GetSuffix { + /// If positive, the number of characters to return from the end. If negative, the absolute number of characters to exclude from the front. e.g. GetSuffix(-1) returns all but the first character. +pub fn length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} +} +impl GetSuffix { + /// Creates a new builder-style object to manufacture [`GetSuffix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetSuffixBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::GetSuffixBuilder::default() + } +} + +/// A builder for [`GetSuffix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct GetSuffixBuilder { + pub(crate) length: ::std::option::Option<::std::primitive::i32>, +} +impl GetSuffixBuilder { + /// If positive, the number of characters to return from the end. If negative, the absolute number of characters to exclude from the front. e.g. GetSuffix(-1) returns all but the first character. +pub fn length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.length = ::std::option::Option::Some(input.into()); + self +} +/// If positive, the number of characters to return from the end. If negative, the absolute number of characters to exclude from the front. e.g. GetSuffix(-1) returns all but the first character. +pub fn set_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.length = input; + self +} +/// If positive, the number of characters to return from the end. If negative, the absolute number of characters to exclude from the front. e.g. GetSuffix(-1) returns all but the first character. +pub fn get_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} + /// Consumes the builder and constructs a [`GetSuffix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix { + length: self.length, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_insert.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_insert.rs new file mode 100644 index 000000000..aec5dcfb2 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_insert.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 Virtual Part Transformation that appends a literal string. +pub struct Insert { + /// The literal string to append. +pub literal: ::std::option::Option<::std::string::String>, +} +impl Insert { + /// The literal string to append. +pub fn literal(&self) -> &::std::option::Option<::std::string::String> { + &self.literal +} +} +impl Insert { + /// Creates a new builder-style object to manufacture [`Insert`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::InsertBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::InsertBuilder::default() + } +} + +/// A builder for [`Insert`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct InsertBuilder { + pub(crate) literal: ::std::option::Option<::std::string::String>, +} +impl InsertBuilder { + /// The literal string to append. +pub fn literal(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.literal = ::std::option::Option::Some(input.into()); + self +} +/// The literal string to append. +pub fn set_literal(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.literal = input; + self +} +/// The literal string to append. +pub fn get_literal(&self) -> &::std::option::Option<::std::string::String> { + &self.literal +} + /// Consumes the builder and constructs a [`Insert`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert { + literal: self.literal, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_legacy_override.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_legacy_override.rs new file mode 100644 index 000000000..34866b67a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_legacy_override.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)] +/// A configuration for overriding encryption and/or decryption to instead perform legacy encryption and decryption. +pub struct LegacyOverride { + /// Overrides which attributes are encrypted and/or signed for any items read or written with legacy behavior. +pub attribute_actions_on_encrypt: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +/// This input is not used in the Java Client and should not be specified. +pub default_attribute_flag: ::std::option::Option, +/// A configuration for the legacy DynamoDB Encryption Client's Encryptor. +pub encryptor: ::std::option::Option, +/// A policy which configurates whether legacy behavior overrides encryption and/or decryption. +pub policy: ::std::option::Option, +} +impl LegacyOverride { + /// Overrides which attributes are encrypted and/or signed for any items read or written with legacy behavior. +pub fn attribute_actions_on_encrypt(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.attribute_actions_on_encrypt +} +/// This input is not used in the Java Client and should not be specified. +pub fn default_attribute_flag(&self) -> &::std::option::Option { + &self.default_attribute_flag +} +/// A configuration for the legacy DynamoDB Encryption Client's Encryptor. +pub fn encryptor(&self) -> &::std::option::Option { + &self.encryptor +} +/// A policy which configurates whether legacy behavior overrides encryption and/or decryption. +pub fn policy(&self) -> &::std::option::Option { + &self.policy +} +} +impl LegacyOverride { + /// Creates a new builder-style object to manufacture [`LegacyOverride`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyOverride). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::LegacyOverrideBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::LegacyOverrideBuilder::default() + } +} + +/// A builder for [`LegacyOverride`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyOverride). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct LegacyOverrideBuilder { + pub(crate) attribute_actions_on_encrypt: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +pub(crate) default_attribute_flag: ::std::option::Option, +pub(crate) encryptor: ::std::option::Option, +pub(crate) policy: ::std::option::Option, +} +impl LegacyOverrideBuilder { + /// Overrides which attributes are encrypted and/or signed for any items read or written with legacy behavior. +pub fn attribute_actions_on_encrypt(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.attribute_actions_on_encrypt = ::std::option::Option::Some(input.into()); + self +} +/// Overrides which attributes are encrypted and/or signed for any items read or written with legacy behavior. +pub fn set_attribute_actions_on_encrypt(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.attribute_actions_on_encrypt = input; + self +} +/// Overrides which attributes are encrypted and/or signed for any items read or written with legacy behavior. +pub fn get_attribute_actions_on_encrypt(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.attribute_actions_on_encrypt +} +/// This input is not used in the Java Client and should not be specified. +pub fn default_attribute_flag(mut self, input: impl ::std::convert::Into) -> Self { + self.default_attribute_flag = ::std::option::Option::Some(input.into()); + self +} +/// This input is not used in the Java Client and should not be specified. +pub fn set_default_attribute_flag(mut self, input: ::std::option::Option) -> Self { + self.default_attribute_flag = input; + self +} +/// This input is not used in the Java Client and should not be specified. +pub fn get_default_attribute_flag(&self) -> &::std::option::Option { + &self.default_attribute_flag +} +/// A configuration for the legacy DynamoDB Encryption Client's Encryptor. +pub fn encryptor(mut self, input: impl ::std::convert::Into) -> Self { + self.encryptor = ::std::option::Option::Some(input.into()); + self +} +/// A configuration for the legacy DynamoDB Encryption Client's Encryptor. +pub fn set_encryptor(mut self, input: ::std::option::Option) -> Self { + self.encryptor = input; + self +} +/// A configuration for the legacy DynamoDB Encryption Client's Encryptor. +pub fn get_encryptor(&self) -> &::std::option::Option { + &self.encryptor +} +/// A policy which configurates whether legacy behavior overrides encryption and/or decryption. +pub fn policy(mut self, input: impl ::std::convert::Into) -> Self { + self.policy = ::std::option::Option::Some(input.into()); + self +} +/// A policy which configurates whether legacy behavior overrides encryption and/or decryption. +pub fn set_policy(mut self, input: ::std::option::Option) -> Self { + self.policy = input; + self +} +/// A policy which configurates whether legacy behavior overrides encryption and/or decryption. +pub fn get_policy(&self) -> &::std::option::Option { + &self.policy +} + /// Consumes the builder and constructs a [`LegacyOverride`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyOverride). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyOverride, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::LegacyOverride { + attribute_actions_on_encrypt: self.attribute_actions_on_encrypt, +default_attribute_flag: self.default_attribute_flag, +encryptor: self.encryptor, +policy: self.policy, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_legacy_policy.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_legacy_policy.rs new file mode 100644 index 000000000..fc3e716dd --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_legacy_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 LegacyPolicy { + ForceLegacyEncryptAllowLegacyDecrypt, +ForbidLegacyEncryptAllowLegacyDecrypt, +ForbidLegacyEncryptForbidLegacyDecrypt, +} + +impl ::std::fmt::Display for LegacyPolicy { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + LegacyPolicy::ForceLegacyEncryptAllowLegacyDecrypt => write!(f, "FORCE_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT"), +LegacyPolicy::ForbidLegacyEncryptAllowLegacyDecrypt => write!(f, "FORBID_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT"), +LegacyPolicy::ForbidLegacyEncryptForbidLegacyDecrypt => write!(f, "FORBID_LEGACY_ENCRYPT_FORBID_LEGACY_DECRYPT"), + } + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_lower.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_lower.rs new file mode 100644 index 000000000..6f8b00193 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_lower.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)] +/// The Virtual Part Transformation that converts ASCII characters to lower case. +pub struct Lower { + +} +impl Lower { + +} +impl Lower { + /// Creates a new builder-style object to manufacture [`Lower`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::LowerBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::LowerBuilder::default() + } +} + +/// A builder for [`Lower`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct LowerBuilder { + +} +impl LowerBuilder { + + /// Consumes the builder and constructs a [`Lower`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower { + + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_multi_key_store.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_multi_key_store.rs new file mode 100644 index 000000000..95d49b4ee --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_multi_key_store.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)] +/// The configuration for using multiple Beacon Keys. +pub struct MultiKeyStore { + /// Which type of local cache to use. +pub cache: ::std::option::Option, +/// How long (in seconds) the beacon key material is cached locally before it is re-retrieved from DynamoDB and re-authed with AWS KMS. +pub cache_ttl: ::std::option::Option<::std::primitive::i32>, +/// The name of the field that stores the Beacon Key. This may be a Virtual Field. +pub key_field_name: ::std::option::Option<::std::string::String>, +} +impl MultiKeyStore { + /// Which type of local cache to use. +pub fn cache(&self) -> &::std::option::Option { + &self.cache +} +/// How long (in seconds) the beacon key material is cached locally before it is re-retrieved from DynamoDB and re-authed with AWS KMS. +pub fn cache_ttl(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.cache_ttl +} +/// The name of the field that stores the Beacon Key. This may be a Virtual Field. +pub fn key_field_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_field_name +} +} +impl MultiKeyStore { + /// Creates a new builder-style object to manufacture [`MultiKeyStore`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::MultiKeyStoreBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::MultiKeyStoreBuilder::default() + } +} + +/// A builder for [`MultiKeyStore`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct MultiKeyStoreBuilder { + pub(crate) cache: ::std::option::Option, +pub(crate) cache_ttl: ::std::option::Option<::std::primitive::i32>, +pub(crate) key_field_name: ::std::option::Option<::std::string::String>, +} +impl MultiKeyStoreBuilder { + /// 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 +} +/// How long (in seconds) the beacon key material is cached locally before it is re-retrieved from DynamoDB and re-authed with AWS KMS. +pub fn cache_ttl(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.cache_ttl = ::std::option::Option::Some(input.into()); + self +} +/// How long (in seconds) the beacon key material is cached locally before it is re-retrieved from DynamoDB and re-authed with AWS KMS. +pub fn set_cache_ttl(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.cache_ttl = input; + self +} +/// How long (in seconds) the beacon key material is cached locally before it is re-retrieved from DynamoDB and re-authed with AWS KMS. +pub fn get_cache_ttl(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.cache_ttl +} +/// The name of the field that stores the Beacon Key. This may be a Virtual Field. +pub fn key_field_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_field_name = ::std::option::Option::Some(input.into()); + self +} +/// The name of the field that stores the Beacon Key. This may be a Virtual Field. +pub fn set_key_field_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_field_name = input; + self +} +/// The name of the field that stores the Beacon Key. This may be a Virtual Field. +pub fn get_key_field_name(&self) -> &::std::option::Option<::std::string::String> { + &self.key_field_name +} + /// Consumes the builder and constructs a [`MultiKeyStore`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::MultiKeyStore { + cache: self.cache, +cache_ttl: self.cache_ttl, +key_field_name: self.key_field_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_part_only.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_part_only.rs new file mode 100644 index 000000000..d11e93d84 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_part_only.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)] +/// Attribute must be used as part of a Compound Beacon, never alone. +pub struct PartOnly { + +} +impl PartOnly { + +} +impl PartOnly { + /// Creates a new builder-style object to manufacture [`PartOnly`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::PartOnlyBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::PartOnlyBuilder::default() + } +} + +/// A builder for [`PartOnly`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct PartOnlyBuilder { + +} +impl PartOnlyBuilder { + + /// Consumes the builder and constructs a [`PartOnly`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::PartOnly { + + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_plaintext_override.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_plaintext_override.rs new file mode 100644 index 000000000..fa3da4575 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_plaintext_override.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 PlaintextOverride { + ForcePlaintextWriteAllowPlaintextRead, +ForbidPlaintextWriteAllowPlaintextRead, +ForbidPlaintextWriteForbidPlaintextRead, +} + +impl ::std::fmt::Display for PlaintextOverride { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + PlaintextOverride::ForcePlaintextWriteAllowPlaintextRead => write!(f, "FORCE_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ"), +PlaintextOverride::ForbidPlaintextWriteAllowPlaintextRead => write!(f, "FORBID_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ"), +PlaintextOverride::ForbidPlaintextWriteForbidPlaintextRead => write!(f, "FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ"), + } + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_search_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_search_config.rs new file mode 100644 index 000000000..c23b05749 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_search_config.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)] +/// The configuration for searchable encryption. +pub struct SearchConfig { + /// The versions of searchable encryption to support reading. Currently must contain a single configuration with version '1'. +pub versions: ::std::option::Option<::std::vec::Vec>, +/// The searchable encryption version to use when writing new items. Must be '1'. +pub write_version: ::std::option::Option<::std::primitive::i32>, +} +impl SearchConfig { + /// The versions of searchable encryption to support reading. Currently must contain a single configuration with version '1'. +pub fn versions(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.versions +} +/// The searchable encryption version to use when writing new items. Must be '1'. +pub fn write_version(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.write_version +} +} +impl SearchConfig { + /// Creates a new builder-style object to manufacture [`SearchConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::SearchConfigBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::SearchConfigBuilder::default() + } +} + +/// A builder for [`SearchConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct SearchConfigBuilder { + pub(crate) versions: ::std::option::Option<::std::vec::Vec>, +pub(crate) write_version: ::std::option::Option<::std::primitive::i32>, +} +impl SearchConfigBuilder { + /// The versions of searchable encryption to support reading. Currently must contain a single configuration with version '1'. +pub fn versions(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.versions = ::std::option::Option::Some(input.into()); + self +} +/// The versions of searchable encryption to support reading. Currently must contain a single configuration with version '1'. +pub fn set_versions(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.versions = input; + self +} +/// The versions of searchable encryption to support reading. Currently must contain a single configuration with version '1'. +pub fn get_versions(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.versions +} +/// The searchable encryption version to use when writing new items. Must be '1'. +pub fn write_version(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.write_version = ::std::option::Option::Some(input.into()); + self +} +/// The searchable encryption version to use when writing new items. Must be '1'. +pub fn set_write_version(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.write_version = input; + self +} +/// The searchable encryption version to use when writing new items. Must be '1'. +pub fn get_write_version(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.write_version +} + /// Consumes the builder and constructs a [`SearchConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SearchConfig { + versions: self.versions, +write_version: self.write_version, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_shared.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_shared.rs new file mode 100644 index 000000000..5672b1253 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_shared.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)] +/// This beacon should calculate values like another beacon, so they can be compared. +pub struct Shared { + /// Calculate beacon values as for this beacon. +pub other: ::std::option::Option<::std::string::String>, +} +impl Shared { + /// Calculate beacon values as for this beacon. +pub fn other(&self) -> &::std::option::Option<::std::string::String> { + &self.other +} +} +impl Shared { + /// Creates a new builder-style object to manufacture [`Shared`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::SharedBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::SharedBuilder::default() + } +} + +/// A builder for [`Shared`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct SharedBuilder { + pub(crate) other: ::std::option::Option<::std::string::String>, +} +impl SharedBuilder { + /// Calculate beacon values as for this beacon. +pub fn other(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.other = ::std::option::Option::Some(input.into()); + self +} +/// Calculate beacon values as for this beacon. +pub fn set_other(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.other = input; + self +} +/// Calculate beacon values as for this beacon. +pub fn get_other(&self) -> &::std::option::Option<::std::string::String> { + &self.other +} + /// Consumes the builder and constructs a [`Shared`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Shared { + other: self.other, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_shared_set.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_shared_set.rs new file mode 100644 index 000000000..1ba51c1ca --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_shared_set.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)] +/// Both Shared and AsSet. +pub struct SharedSet { + /// Calculate beacon values as for this beacon. +pub other: ::std::option::Option<::std::string::String>, +} +impl SharedSet { + /// Calculate beacon values as for this beacon. +pub fn other(&self) -> &::std::option::Option<::std::string::String> { + &self.other +} +} +impl SharedSet { + /// Creates a new builder-style object to manufacture [`SharedSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::SharedSetBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::SharedSetBuilder::default() + } +} + +/// A builder for [`SharedSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct SharedSetBuilder { + pub(crate) other: ::std::option::Option<::std::string::String>, +} +impl SharedSetBuilder { + /// Calculate beacon values as for this beacon. +pub fn other(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.other = ::std::option::Option::Some(input.into()); + self +} +/// Calculate beacon values as for this beacon. +pub fn set_other(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.other = input; + self +} +/// Calculate beacon values as for this beacon. +pub fn get_other(&self) -> &::std::option::Option<::std::string::String> { + &self.other +} + /// Consumes the builder and constructs a [`SharedSet`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SharedSet { + other: self.other, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_signed_part.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_signed_part.rs new file mode 100644 index 000000000..8a192bdcb --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_signed_part.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)] +/// A part of a Compound Beacon that contains signed plaintext data. +pub struct SignedPart { + /// The DynamoDB document path to the value for this Signed Part. If not provided, the 'name' is used for the location. +pub loc: ::std::option::Option<::std::string::String>, +/// The name for this Signed Part. +pub name: ::std::option::Option<::std::string::String>, +/// The prefix that is written with this Signed Part. +pub prefix: ::std::option::Option<::std::string::String>, +} +impl SignedPart { + /// The DynamoDB document path to the value for this Signed Part. If not provided, the 'name' is used for the location. +pub fn loc(&self) -> &::std::option::Option<::std::string::String> { + &self.loc +} +/// The name for this Signed Part. +pub fn name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// The prefix that is written with this Signed Part. +pub fn prefix(&self) -> &::std::option::Option<::std::string::String> { + &self.prefix +} +} +impl SignedPart { + /// Creates a new builder-style object to manufacture [`SignedPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SignedPart). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::SignedPartBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::SignedPartBuilder::default() + } +} + +/// A builder for [`SignedPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SignedPart). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct SignedPartBuilder { + pub(crate) loc: ::std::option::Option<::std::string::String>, +pub(crate) name: ::std::option::Option<::std::string::String>, +pub(crate) prefix: ::std::option::Option<::std::string::String>, +} +impl SignedPartBuilder { + /// The DynamoDB document path to the value for this Signed Part. If not provided, the 'name' is used for the location. +pub fn loc(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.loc = ::std::option::Option::Some(input.into()); + self +} +/// The DynamoDB document path to the value for this Signed Part. If not provided, the 'name' is used for the location. +pub fn set_loc(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.loc = input; + self +} +/// The DynamoDB document path to the value for this Signed Part. If not provided, the 'name' is used for the location. +pub fn get_loc(&self) -> &::std::option::Option<::std::string::String> { + &self.loc +} +/// The name for this Signed Part. +pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.name = ::std::option::Option::Some(input.into()); + self +} +/// The name for this Signed Part. +pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.name = input; + self +} +/// The name for this Signed Part. +pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// The prefix that is written with this Signed Part. +pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.prefix = ::std::option::Option::Some(input.into()); + self +} +/// The prefix that is written with this Signed Part. +pub fn set_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.prefix = input; + self +} +/// The prefix that is written with this Signed Part. +pub fn get_prefix(&self) -> &::std::option::Option<::std::string::String> { + &self.prefix +} + /// Consumes the builder and constructs a [`SignedPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SignedPart). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SignedPart, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SignedPart { + loc: self.loc, +name: self.name, +prefix: self.prefix, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_single_key_store.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_single_key_store.rs new file mode 100644 index 000000000..a71eeeb3a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_single_key_store.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)] +/// The configuration for using a single Beacon Key. +pub struct SingleKeyStore { + /// How long (in seconds) the beacon key material is cached locally before it is re-retrieved from DynamoDB and re-authed with AWS KMS. +pub cache_ttl: ::std::option::Option<::std::primitive::i32>, +/// The Beacon Key ID. +pub key_id: ::std::option::Option<::std::string::String>, +} +impl SingleKeyStore { + /// How long (in seconds) the beacon key material is cached locally before it is re-retrieved from DynamoDB and re-authed with AWS KMS. +pub fn cache_ttl(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.cache_ttl +} +/// The Beacon Key ID. +pub fn key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.key_id +} +} +impl SingleKeyStore { + /// Creates a new builder-style object to manufacture [`SingleKeyStore`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::SingleKeyStoreBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::SingleKeyStoreBuilder::default() + } +} + +/// A builder for [`SingleKeyStore`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct SingleKeyStoreBuilder { + pub(crate) cache_ttl: ::std::option::Option<::std::primitive::i32>, +pub(crate) key_id: ::std::option::Option<::std::string::String>, +} +impl SingleKeyStoreBuilder { + /// How long (in seconds) the beacon key material is cached locally before it is re-retrieved from DynamoDB and re-authed with AWS KMS. +pub fn cache_ttl(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.cache_ttl = ::std::option::Option::Some(input.into()); + self +} +/// How long (in seconds) the beacon key material is cached locally before it is re-retrieved from DynamoDB and re-authed with AWS KMS. +pub fn set_cache_ttl(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.cache_ttl = input; + self +} +/// How long (in seconds) the beacon key material is cached locally before it is re-retrieved from DynamoDB and re-authed with AWS KMS. +pub fn get_cache_ttl(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.cache_ttl +} +/// The Beacon Key ID. +pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key_id = ::std::option::Option::Some(input.into()); + self +} +/// The Beacon Key ID. +pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key_id = input; + self +} +/// The Beacon Key ID. +pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.key_id +} + /// Consumes the builder and constructs a [`SingleKeyStore`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::SingleKeyStore { + cache_ttl: self.cache_ttl, +key_id: self.key_id, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_standard_beacon.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_standard_beacon.rs new file mode 100644 index 000000000..1e0cdd4d5 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_standard_beacon.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)] +/// The configuration for a Standard Beacon. +pub struct StandardBeacon { + /// The length of the calculated beacon. +pub length: ::std::option::Option<::std::primitive::i32>, +/// The DynamoDB document path to the value this beacon will calculate over. If not specified, the beacon will calculate values for the attribute with the name specified in 'name'. +pub loc: ::std::option::Option<::std::string::String>, +/// The name for this Standard Beacon. +pub name: ::std::option::Option<::std::string::String>, +/// Optional augmented behavior. +pub style: ::std::option::Option, +} +impl StandardBeacon { + /// The length of the calculated beacon. +pub fn length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} +/// The DynamoDB document path to the value this beacon will calculate over. If not specified, the beacon will calculate values for the attribute with the name specified in 'name'. +pub fn loc(&self) -> &::std::option::Option<::std::string::String> { + &self.loc +} +/// The name for this Standard Beacon. +pub fn name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// Optional augmented behavior. +pub fn style(&self) -> &::std::option::Option { + &self.style +} +} +impl StandardBeacon { + /// Creates a new builder-style object to manufacture [`StandardBeacon`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::StandardBeaconBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::StandardBeaconBuilder::default() + } +} + +/// A builder for [`StandardBeacon`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct StandardBeaconBuilder { + pub(crate) length: ::std::option::Option<::std::primitive::i32>, +pub(crate) loc: ::std::option::Option<::std::string::String>, +pub(crate) name: ::std::option::Option<::std::string::String>, +pub(crate) style: ::std::option::Option, +} +impl StandardBeaconBuilder { + /// The length of the calculated beacon. +pub fn length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self { + self.length = ::std::option::Option::Some(input.into()); + self +} +/// The length of the calculated beacon. +pub fn set_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self { + self.length = input; + self +} +/// The length of the calculated beacon. +pub fn get_length(&self) -> &::std::option::Option<::std::primitive::i32> { + &self.length +} +/// The DynamoDB document path to the value this beacon will calculate over. If not specified, the beacon will calculate values for the attribute with the name specified in 'name'. +pub fn loc(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.loc = ::std::option::Option::Some(input.into()); + self +} +/// The DynamoDB document path to the value this beacon will calculate over. If not specified, the beacon will calculate values for the attribute with the name specified in 'name'. +pub fn set_loc(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.loc = input; + self +} +/// The DynamoDB document path to the value this beacon will calculate over. If not specified, the beacon will calculate values for the attribute with the name specified in 'name'. +pub fn get_loc(&self) -> &::std::option::Option<::std::string::String> { + &self.loc +} +/// The name for this Standard Beacon. +pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.name = ::std::option::Option::Some(input.into()); + self +} +/// The name for this Standard Beacon. +pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.name = input; + self +} +/// The name for this Standard Beacon. +pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// Optional augmented behavior. +pub fn style(mut self, input: impl ::std::convert::Into) -> Self { + self.style = ::std::option::Option::Some(input.into()); + self +} +/// Optional augmented behavior. +pub fn set_style(mut self, input: ::std::option::Option) -> Self { + self.style = input; + self +} +/// Optional augmented behavior. +pub fn get_style(&self) -> &::std::option::Option { + &self.style +} + /// Consumes the builder and constructs a [`StandardBeacon`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::StandardBeacon { + length: self.length, +loc: self.loc, +name: self.name, +style: self.style, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_upper.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_upper.rs new file mode 100644 index 000000000..b573e4a1f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_upper.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)] +/// The Virtual Part Transformation that converts ASCII characters to upper case. +pub struct Upper { + +} +impl Upper { + +} +impl Upper { + /// Creates a new builder-style object to manufacture [`Upper`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::UpperBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::UpperBuilder::default() + } +} + +/// A builder for [`Upper`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct UpperBuilder { + +} +impl UpperBuilder { + + /// Consumes the builder and constructs a [`Upper`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper { + + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_virtual_field.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_virtual_field.rs new file mode 100644 index 000000000..e95519a57 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_virtual_field.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)] +/// The configuration for a Virtual Field. A Virtual Field is a field constructed from parts of other fields for use with beacons, but never itself stored on items. +pub struct VirtualField { + /// The name of the Virtual Field. +pub name: ::std::option::Option<::std::string::String>, +/// The list of ordered parts that make up a Virtual Field. +pub parts: ::std::option::Option<::std::vec::Vec>, +} +impl VirtualField { + /// The name of the Virtual Field. +pub fn name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// The list of ordered parts that make up a Virtual Field. +pub fn parts(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.parts +} +} +impl VirtualField { + /// Creates a new builder-style object to manufacture [`VirtualField`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualField). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::VirtualFieldBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::VirtualFieldBuilder::default() + } +} + +/// A builder for [`VirtualField`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualField). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct VirtualFieldBuilder { + pub(crate) name: ::std::option::Option<::std::string::String>, +pub(crate) parts: ::std::option::Option<::std::vec::Vec>, +} +impl VirtualFieldBuilder { + /// The name of the Virtual Field. +pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.name = ::std::option::Option::Some(input.into()); + self +} +/// The name of the Virtual Field. +pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.name = input; + self +} +/// The name of the Virtual Field. +pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { + &self.name +} +/// The list of ordered parts that make up a Virtual Field. +pub fn parts(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.parts = ::std::option::Option::Some(input.into()); + self +} +/// The list of ordered parts that make up a Virtual Field. +pub fn set_parts(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.parts = input; + self +} +/// The list of ordered parts that make up a Virtual Field. +pub fn get_parts(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.parts +} + /// Consumes the builder and constructs a [`VirtualField`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualField). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualField, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualField { + name: self.name, +parts: self.parts, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_virtual_part.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_virtual_part.rs new file mode 100644 index 000000000..11a3df973 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_virtual_part.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 Virtual Part is the configuration of a transformation on an existing field in an item. +pub struct VirtualPart { + /// The DynamoDB document path to the value for this part. +pub loc: ::std::option::Option<::std::string::String>, +/// A list of transformations performed on the value for this part. +pub trans: ::std::option::Option<::std::vec::Vec>, +} +impl VirtualPart { + /// The DynamoDB document path to the value for this part. +pub fn loc(&self) -> &::std::option::Option<::std::string::String> { + &self.loc +} +/// A list of transformations performed on the value for this part. +pub fn trans(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.trans +} +} +impl VirtualPart { + /// Creates a new builder-style object to manufacture [`VirtualPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::VirtualPartBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::builders::VirtualPartBuilder::default() + } +} + +/// A builder for [`VirtualPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct VirtualPartBuilder { + pub(crate) loc: ::std::option::Option<::std::string::String>, +pub(crate) trans: ::std::option::Option<::std::vec::Vec>, +} +impl VirtualPartBuilder { + /// The DynamoDB document path to the value for this part. +pub fn loc(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.loc = ::std::option::Option::Some(input.into()); + self +} +/// The DynamoDB document path to the value for this part. +pub fn set_loc(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.loc = input; + self +} +/// The DynamoDB document path to the value for this part. +pub fn get_loc(&self) -> &::std::option::Option<::std::string::String> { + &self.loc +} +/// A list of transformations performed on the value for this part. +pub fn trans(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.trans = ::std::option::Option::Some(input.into()); + self +} +/// A list of transformations performed on the value for this part. +pub fn set_trans(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.trans = input; + self +} +/// A list of transformations performed on the value for this part. +pub fn get_trans(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.trans +} + /// Consumes the builder and constructs a [`VirtualPart`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualPart { + loc: self.loc, +trans: self.trans, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_virtual_transform.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_virtual_transform.rs new file mode 100644 index 000000000..6233ebe55 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/_virtual_transform.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. +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +#[allow(missing_docs)] +pub enum VirtualTransform { + #[allow(missing_docs)] +Upper(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper), +#[allow(missing_docs)] +Lower(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower), +#[allow(missing_docs)] +Insert(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert), +#[allow(missing_docs)] +Prefix(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix), +#[allow(missing_docs)] +Suffix(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix), +#[allow(missing_docs)] +Substring(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring), +#[allow(missing_docs)] +Segment(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment), +#[allow(missing_docs)] +Segments(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments), + /// 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 VirtualTransform { + /// Tries to convert the enum instance into [`Upper`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Upper), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_upper(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Upper, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Upper(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Lower`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Lower), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_lower(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Lower, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Lower(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Insert`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Insert), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_insert(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::Insert, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Insert(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Prefix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Prefix), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_prefix(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetPrefix, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Prefix(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Suffix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Suffix), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_suffix(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSuffix, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Suffix(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Substring`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Substring), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_substring(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSubstring, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Substring(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Segment`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Segment), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_segment(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegment, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Segment(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} +/// Tries to convert the enum instance into [`Segments`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Segments), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_segments(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetSegments, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Segments(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`Upper`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Upper). +pub fn is_upper(&self) -> ::std::primitive::bool { + self.as_upper().is_ok() +} +/// Returns true if this is a [`Lower`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Lower). +pub fn is_lower(&self) -> ::std::primitive::bool { + self.as_lower().is_ok() +} +/// Returns true if this is a [`Insert`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Insert). +pub fn is_insert(&self) -> ::std::primitive::bool { + self.as_insert().is_ok() +} +/// Returns true if this is a [`Prefix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Prefix). +pub fn is_prefix(&self) -> ::std::primitive::bool { + self.as_prefix().is_ok() +} +/// Returns true if this is a [`Suffix`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Suffix). +pub fn is_suffix(&self) -> ::std::primitive::bool { + self.as_suffix().is_ok() +} +/// Returns true if this is a [`Substring`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Substring). +pub fn is_substring(&self) -> ::std::primitive::bool { + self.as_substring().is_ok() +} +/// Returns true if this is a [`Segment`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Segment). +pub fn is_segment(&self) -> ::std::primitive::bool { + self.as_segment().is_ok() +} +/// Returns true if this is a [`Segments`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::VirtualTransform::Segments). +pub fn is_segments(&self) -> ::std::primitive::bool { + self.as_segments().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/builders.rs new file mode 100644 index 000000000..a0a7e6050 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/builders.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. +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_as_set::AsSetBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_beacon_version::BeaconVersionBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_compound_beacon::CompoundBeaconBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_constructor::ConstructorBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_constructor_part::ConstructorPartBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_create_dynamo_db_encryption_branch_key_id_supplier_input::CreateDynamoDbEncryptionBranchKeyIdSupplierInputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_create_dynamo_db_encryption_branch_key_id_supplier_output::CreateDynamoDbEncryptionBranchKeyIdSupplierOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_dynamo_db_table_encryption_config::DynamoDbTableEncryptionConfigBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfigBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_encrypted_data_key_description::EncryptedDataKeyDescriptionBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_encrypted_part::EncryptedPartBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_branch_key_id_from_ddb_key_input::GetBranchKeyIdFromDdbKeyInputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_branch_key_id_from_ddb_key_output::GetBranchKeyIdFromDdbKeyOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_encrypted_data_key_description_input::GetEncryptedDataKeyDescriptionInputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_encrypted_data_key_description_output::GetEncryptedDataKeyDescriptionOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_prefix::GetPrefixBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_segment::GetSegmentBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_segments::GetSegmentsBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_substring::GetSubstringBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_get_suffix::GetSuffixBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_insert::InsertBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_legacy_override::LegacyOverrideBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_lower::LowerBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_multi_key_store::MultiKeyStoreBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_part_only::PartOnlyBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_search_config::SearchConfigBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_shared::SharedBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_shared_set::SharedSetBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_signed_part::SignedPartBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_single_key_store::SingleKeyStoreBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_standard_beacon::StandardBeaconBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_upper::UpperBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_virtual_field::VirtualFieldBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::_virtual_part::VirtualPartBuilder; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/dynamo_db_encryption_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/dynamo_db_encryption_config.rs new file mode 100644 index 000000000..db34d5fb5 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/dynamo_db_encryption_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 DynamoDbEncryptionConfig { + +} +impl DynamoDbEncryptionConfig { + +} +impl DynamoDbEncryptionConfig { + /// Creates a new builder-style object to manufacture [`DynamoDbEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbEncryptionConfig). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfigBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfigBuilder::default() + } +} + +/// A builder for [`DynamoDbEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbEncryptionConfig). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DynamoDbEncryptionConfigBuilder { + +} +impl DynamoDbEncryptionConfigBuilder { + + /// Consumes the builder and constructs a [`DynamoDbEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbEncryptionConfig). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig { + + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/dynamo_db_key_branch_key_id_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/dynamo_db_key_branch_key_id_supplier.rs new file mode 100644 index 000000000..2922c7429 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/dynamo_db_key_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 DynamoDbKeyBranchKeyIdSupplier { + fn get_branch_key_id_from_ddb_key( + &self, + input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput, + ) -> Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error, + >; +} + +#[derive(::std::clone::Clone)] +/// A reference to a DynamoDbKeyBranchKeyIdSupplier +pub struct DynamoDbKeyBranchKeyIdSupplierRef { + pub inner: ::std::rc::Rc> +} + +impl From for DynamoDbKeyBranchKeyIdSupplierRef { + fn from(value: T) -> Self { + Self { inner: std::rc::Rc::new(std::cell::RefCell::new(value)) } + } +} + +impl ::std::cmp::PartialEq for DynamoDbKeyBranchKeyIdSupplierRef { + fn eq(&self, other: &DynamoDbKeyBranchKeyIdSupplierRef) -> bool { + ::std::rc::Rc::ptr_eq(&self.inner, &other.inner) + } +} + +impl ::std::fmt::Debug for DynamoDbKeyBranchKeyIdSupplierRef { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "") + } +} + +mod get_branch_key_id_from_ddb_key; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/dynamo_db_key_branch_key_id_supplier/get_branch_key_id_from_ddb_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/dynamo_db_key_branch_key_id_supplier/get_branch_key_id_from_ddb_key.rs new file mode 100644 index 000000000..fcb51aff2 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/dynamo_db_key_branch_key_id_supplier/get_branch_key_id_from_ddb_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_dbEncryptionSdk_dynamoDb::types::dynamo_db_key_branch_key_id_supplier::DynamoDbKeyBranchKeyIdSupplierRef { + /// Constructs a fluent builder for the [`GetBranchKeyIdFromDdbKey`](crate::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`ddb_key(impl Into>>)`](crate::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyFluentBuilder::ddb_key) / [`set_ddb_key(Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>)`](crate::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyFluentBuilder::set_ddb_key): (undocumented)
+ /// - On success, responds with [`GetBranchKeyIdFromDdbKeyOutput`](crate::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput) with field(s): + /// - [`branch_key_id(Option<::std::string::String>)`](crate::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput::branch_key_id): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyError) + pub fn get_branch_key_id_from_ddb_key(&self) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyFluentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::builders::GetBranchKeyIdFromDdbKeyFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/error.rs new file mode 100644 index 000000000..243dd226f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/error.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. +#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)] +pub enum Error { + #[allow(missing_docs)] +DynamoDbEncryptionException { + 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, +}, + +AwsCryptographicMaterialProvidersError { + error: crate::deps::aws_cryptography_materialProviders::types::error::Error, +}, + +StructuredEncryptionError { + error: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/legacy_dynamo_db_encryptor.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/legacy_dynamo_db_encryptor.rs new file mode 100644 index 000000000..9cc14d68a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb/types/legacy_dynamo_db_encryptor.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(missing_docs)] +pub trait LegacyDynamoDbEncryptor { + +} + +#[derive(::std::clone::Clone)] +/// A reference to a LegacyDynamoDbEncryptor +pub struct LegacyDynamoDbEncryptorRef { + pub inner: ::std::rc::Rc> +} + +impl From for LegacyDynamoDbEncryptorRef { + fn from(value: T) -> Self { + Self { inner: std::rc::Rc::new(std::cell::RefCell::new(value)) } + } +} + +impl ::std::cmp::PartialEq for LegacyDynamoDbEncryptorRef { + fn eq(&self, other: &LegacyDynamoDbEncryptorRef) -> bool { + ::std::rc::Rc::ptr_eq(&self.inner, &other.inner) + } +} + +impl ::std::fmt::Debug for LegacyDynamoDbEncryptorRef { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "") + } +} + diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor.rs new file mode 100644 index 000000000..e118e5215 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor.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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client.rs new file mode 100644 index 000000000..c8e95aaa0 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/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::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig, + ) -> Result { + let inner = + crate::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::_default::DynamoDbItemEncryptor( + &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::dynamo_db_item_encryptor_config::_dynamo_db_item_encryptor_config::to_dafny(conf), + ); + if matches!( + inner.as_ref(), + crate::_Wrappers_Compile::Result::Failure { .. } + ) { + return Err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::error::from_dafny(inner.as_ref().error().clone())); + } + Ok(Self { + dafny_client: ::dafny_runtime::upcast_object()(inner.Extract()) + }) + } +} + +mod encrypt_item; + +mod decrypt_item; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client/decrypt_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client/decrypt_item.rs new file mode 100644 index 000000000..47b1f042a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client/decrypt_item.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_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client { + /// Constructs a fluent builder for the [`DecryptItem`](crate::operation::decrypt_item::builders::DecryptItemFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`encrypted_item(impl Into>>)`](crate::operation::decrypt_item::builders::DecryptItemFluentBuilder::encrypted_item) / [`set_encrypted_item(Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>)`](crate::operation::decrypt_item::builders::DecryptItemFluentBuilder::set_encrypted_item): (undocumented)
+ /// - On success, responds with [`DecryptItemOutput`](crate::operation::decrypt_item::DecryptItemOutput) with field(s): + /// - [`parsed_header(Option)`](crate::operation::decrypt_item::DecryptItemOutput::parsed_header): (undocumented) + /// - [`plaintext_item(Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>)`](crate::operation::decrypt_item::DecryptItemOutput::plaintext_item): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::decrypt_item::DecryptItemError) + pub fn decrypt_item(&self) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::builders::DecryptItemFluentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::builders::DecryptItemFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client/encrypt_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client/encrypt_item.rs new file mode 100644 index 000000000..fdeeba1ae --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/client/encrypt_item.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_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client { + /// Constructs a fluent builder for the [`EncryptItem`](crate::operation::encrypt_item::builders::EncryptItemFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`plaintext_item(impl Into>>)`](crate::operation::encrypt_item::builders::EncryptItemFluentBuilder::plaintext_item) / [`set_plaintext_item(Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>)`](crate::operation::encrypt_item::builders::EncryptItemFluentBuilder::set_plaintext_item): (undocumented)
+ /// - On success, responds with [`EncryptItemOutput`](crate::operation::encrypt_item::EncryptItemOutput) with field(s): + /// - [`encrypted_item(Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>)`](crate::operation::encrypt_item::EncryptItemOutput::encrypted_item): (undocumented) + /// - [`parsed_header(Option)`](crate::operation::encrypt_item::EncryptItemOutput::parsed_header): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::encrypt_item::EncryptItemError) + pub fn encrypt_item(&self) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::builders::EncryptItemFluentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::builders::EncryptItemFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions.rs new file mode 100644 index 000000000..64d48f658 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/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_item; + + pub mod decrypt_item_input; + + pub mod decrypt_item_output; + + pub mod encrypt_item; + + pub mod encrypt_item_input; + + pub mod encrypt_item_output; + + pub mod error; + + pub mod parsed_header; + +pub mod dynamo_db_item_encryptor_config; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/client.rs new file mode 100644 index 000000000..51a70a157 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/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_dbEncryptionSdk_dynamoDb_itemEncryptor::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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::IDynamoDbItemEncryptorClient + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client { dafny_client: dafny_value } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item.rs new file mode 100644 index 000000000..f628e2ceb --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item.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_item_input; + + pub mod _decrypt_item_output; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item/_decrypt_item_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item/_decrypt_item_input.rs new file mode 100644 index 000000000..657b41afb --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item/_decrypt_item_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_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemInput::DecryptItemInput { + encryptedItem: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encrypted_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.clone()) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemInput { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemInput::builder() + .set_encrypted_item(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptedItem(), + |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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item/_decrypt_item_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item/_decrypt_item_output.rs new file mode 100644 index 000000000..01ca95278 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item/_decrypt_item_output.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: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemOutput::DecryptItemOutput { + plaintextItem: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.plaintext_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.clone()) +, +) +, + parsedHeader: ::std::rc::Rc::new(match &value.parsed_header { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::parsed_header::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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemOutput { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemOutput::builder() + .set_plaintext_item(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.plaintextItem(), + |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_parsed_header(match (*dafny_value.parsedHeader()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::parsed_header::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item_input.rs new file mode 100644 index 000000000..9f1539f8c --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item_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_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemInput::DecryptItemInput { + encryptedItem: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encrypted_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.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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemInput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemInput::DecryptItemInput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemInput::builder() + .set_encrypted_item(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptedItem(), + |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() + } +} + +#[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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item_output.rs new file mode 100644 index 000000000..c87ea52ba --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/decrypt_item_output.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: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemOutput::DecryptItemOutput { + plaintextItem: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.plaintext_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.clone()) +, +) +, + parsedHeader: ::std::rc::Rc::new(match &value.parsed_header { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::parsed_header::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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemOutput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemOutput::DecryptItemOutput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemOutput::builder() + .set_plaintext_item(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.plaintextItem(), + |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_parsed_header(match (*dafny_value.parsedHeader()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::parsed_header::from_dafny(value.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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/dynamo_db_item_encryptor_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/dynamo_db_item_encryptor_config.rs new file mode 100644 index 000000000..22feea225 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/dynamo_db_item_encryptor_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 _dynamo_db_item_encryptor_config; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/dynamo_db_item_encryptor_config/_dynamo_db_item_encryptor_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/dynamo_db_item_encryptor_config/_dynamo_db_item_encryptor_config.rs new file mode 100644 index 000000000..79bcd4bca --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/dynamo_db_item_encryptor_config/_dynamo_db_item_encryptor_config.rs @@ -0,0 +1,136 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify 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_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DynamoDbItemEncryptorConfig, +> { + ::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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DynamoDbItemEncryptorConfig, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig { + plain_from_dafny(&*dafny_value) +} + + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DynamoDbItemEncryptorConfig { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig { + logicalTableName: crate::standard_library_conversions::ostring_to_dafny(&value.logical_table_name) .Extract(), + partitionKeyName: crate::standard_library_conversions::ostring_to_dafny(&value.partition_key_name) .Extract(), + sortKeyName: crate::standard_library_conversions::ostring_to_dafny(&value.sort_key_name), + attributeActionsOnEncrypt: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.attribute_actions_on_encrypt.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::to_dafny(v.clone()), +) +, + allowedUnsignedAttributes: ::std::rc::Rc::new(match &value.allowed_unsigned_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 {} +}) +, + allowedUnsignedAttributePrefix: crate::standard_library_conversions::ostring_to_dafny(&value.allowed_unsigned_attribute_prefix), + algorithmSuiteId: ::std::rc::Rc::new(match &value.algorithm_suite_id { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::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 { } +}) +, + cmm: ::std::rc::Rc::new(match &value.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 { } +}) +, + legacyOverride: ::std::rc::Rc::new(match &value.legacy_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::legacy_override::to_dafny(&x.clone()) }, + None => crate::_Wrappers_Compile::Option::None { } +}) +, + plaintextOverride: ::std::rc::Rc::new(match &value.plaintext_override { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::plaintext_override::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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DynamoDbItemEncryptorConfig, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig::builder() + .set_logical_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.logicalTableName()) )) + .set_partition_key_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.partitionKeyName()) )) + .set_sort_key_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.sortKeyName().clone())) + .set_attribute_actions_on_encrypt(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.attributeActionsOnEncrypt(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::from_dafny(v), +) + )) + .set_allowed_unsigned_attributes(match (*dafny_value.allowedUnsignedAttributes()).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_allowed_unsigned_attribute_prefix(crate::standard_library_conversions::ostring_from_dafny(dafny_value.allowedUnsignedAttributePrefix().clone())) + .set_algorithm_suite_id(match &**dafny_value.algorithmSuiteId() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::from_dafny(value) + ), + _ => 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_cmm(match (*dafny_value.cmm()).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_legacy_override(match (*dafny_value.legacyOverride()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::legacy_override::from_dafny(value.clone())), + _ => None, +} +) + .set_plaintext_override(match &**dafny_value.plaintextOverride() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::plaintext_override::from_dafny(value) + ), + _ => None, +} +) + .build() + .unwrap() + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item.rs new file mode 100644 index 000000000..b01e59a07 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item.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_item_input; + + pub mod _encrypt_item_output; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item/_encrypt_item_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item/_encrypt_item_input.rs new file mode 100644 index 000000000..59ff734f0 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item/_encrypt_item_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_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemInput::EncryptItemInput { + plaintextItem: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.plaintext_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.clone()) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemInput { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemInput::builder() + .set_plaintext_item(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.plaintextItem(), + |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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item/_encrypt_item_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item/_encrypt_item_output.rs new file mode 100644 index 000000000..18f2810bc --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item/_encrypt_item_output.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: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemOutput::EncryptItemOutput { + encryptedItem: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encrypted_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.clone()) +, +) +, + parsedHeader: ::std::rc::Rc::new(match &value.parsed_header { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::parsed_header::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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemOutput { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemOutput::builder() + .set_encrypted_item(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptedItem(), + |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_parsed_header(match (*dafny_value.parsedHeader()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::parsed_header::from_dafny(value.clone())), + _ => None, +} +) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item_input.rs new file mode 100644 index 000000000..6bcb293ed --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item_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_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemInput::EncryptItemInput { + plaintextItem: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.plaintext_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.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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemInput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemInput::EncryptItemInput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemInput::builder() + .set_plaintext_item(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.plaintextItem(), + |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() + } +} + +#[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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item_output.rs new file mode 100644 index 000000000..93917f602 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/encrypt_item_output.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: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemOutput::EncryptItemOutput { + encryptedItem: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encrypted_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.clone()) +, +) +, + parsedHeader: ::std::rc::Rc::new(match &value.parsed_header { + Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::parsed_header::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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemOutput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemOutput::EncryptItemOutput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemOutput::builder() + .set_encrypted_item(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptedItem(), + |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_parsed_header(match (*dafny_value.parsedHeader()).as_ref() { + crate::r#_Wrappers_Compile::Option::Some { value } => + Some(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::parsed_header::from_dafny(value.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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/error.rs new file mode 100644 index 000000000..bf61e2534 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/error.rs @@ -0,0 +1,165 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// 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::dbencryptionsdk::dynamodb::itemencryptor::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_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error, +) -> ::std::rc::Rc { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::DynamoDbItemEncryptorException { message } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::DynamoDbItemEncryptorException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::AwsCryptographicPrimitivesError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::AwsCryptographyPrimitives { + AwsCryptographyPrimitives: crate::deps::aws_cryptography_primitives::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::DynamoDB_20120810Error { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::ComAmazonawsDynamodb { + ComAmazonawsDynamodb: crate::deps::com_amazonaws_dynamodb::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::AwsCryptographicMaterialProvidersError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::StructuredEncryptionError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkStructuredEncryption { + AwsCryptographyDbEncryptionSdkStructuredEncryption: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::DynamoDbEncryptionError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkDynamoDb { + AwsCryptographyDbEncryptionSdkDynamoDb: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::error::to_dafny(error), + }, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::CollectionOfErrors { list, message } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::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_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::ValidationError(inner) => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::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_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::Opaque { obj } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::Opaque { + obj: ::dafny_runtime::Object(obj.0) + }, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::OpaqueWithText { obj, objMessage } => + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error { + match ::std::borrow::Borrow::borrow(&dafny_value) { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::DynamoDbItemEncryptorException { message } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::DynamoDbItemEncryptorException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::AwsCryptographyPrimitives { AwsCryptographyPrimitives } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::AwsCryptographicPrimitivesError { + error: crate::deps::aws_cryptography_primitives::conversions::error::from_dafny(AwsCryptographyPrimitives.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::ComAmazonawsDynamodb { ComAmazonawsDynamodb } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::DynamoDB_20120810Error { + error: crate::deps::com_amazonaws_dynamodb::conversions::error::from_dafny(ComAmazonawsDynamodb.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::AwsCryptographyMaterialProviders { AwsCryptographyMaterialProviders } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::AwsCryptographicMaterialProvidersError { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny(AwsCryptographyMaterialProviders.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkStructuredEncryption { AwsCryptographyDbEncryptionSdkStructuredEncryption } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::StructuredEncryptionError { + error: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::from_dafny(AwsCryptographyDbEncryptionSdkStructuredEncryption.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkDynamoDb { AwsCryptographyDbEncryptionSdkDynamoDb } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::DynamoDbEncryptionError { + error: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::conversions::error::from_dafny(AwsCryptographyDbEncryptionSdkDynamoDb.clone()), + }, + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::CollectionOfErrors { list, message } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::Opaque { obj } => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::Opaque { + obj: obj.clone() + }, + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::Opaque { obj } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::ValidationError); + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::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_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::Opaque { + obj: obj.clone() + } + } + }, + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::OpaqueWithText { obj, objMessage } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::ValidationError); + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::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_dbEncryptionSdk_dynamoDb_itemEncryptor::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/parsed_header.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/parsed_header.rs new file mode 100644 index 000000000..ac7a5e01e --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/conversions/parsed_header.rs @@ -0,0 +1,122 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify 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_dbEncryptionSdk_dynamoDb_itemEncryptor::types::ParsedHeader, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::ParsedHeader, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::ParsedHeader, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::ParsedHeader { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::ParsedHeader::ParsedHeader { + attributeActionsOnEncrypt: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.attribute_actions_on_encrypt.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::to_dafny(v.clone()), +) +, + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::to_dafny(value.algorithm_suite_id.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()) +, +) +, + storedEncryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.stored_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), +) +, + 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), +) +, + selectorContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.selector_context.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.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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::ParsedHeader, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::ParsedHeader { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::ParsedHeader, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::ParsedHeader { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::ParsedHeader::ParsedHeader {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::ParsedHeader::builder() + .set_attribute_actions_on_encrypt(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.attributeActionsOnEncrypt(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::from_dafny(v), +) + )) + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId()) )) + .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_stored_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.storedEncryptionContext(), + |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_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_selector_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.selectorContext(), + |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() + } +} + +#[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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/deps.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/deps.rs new file mode 100644 index 000000000..5fbbbaa0f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/error.rs new file mode 100644 index 000000000..4cddaa7c3 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/error/sealed_unhandled.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/error/sealed_unhandled.rs new file mode 100644 index 000000000..eae800729 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation.rs new file mode 100644 index 000000000..34930a80d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation.rs @@ -0,0 +1,8 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// 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 `DecryptItem` operation. +pub mod decrypt_item; + +/// Types for the `EncryptItem` operation. +pub mod encrypt_item; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item.rs new file mode 100644 index 000000000..61c9a2abd --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item.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 `DecryptItem`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct DecryptItem; +impl DecryptItem { + /// Creates a new `DecryptItem` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client, + input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error, + > { + if input.encrypted_item.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_item", + "encrypted_item was not specified but it is required when building DecryptItemInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::wrap_validation_err); +} + let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::decrypt_item::_decrypt_item_input::to_dafny(input); + let inner_result = + ::dafny_runtime::md!(client.dafny_client.clone()).DecryptItem(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::decrypt_item::_decrypt_item_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::_decrypt_item_output::DecryptItemOutput; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::_decrypt_item_input::DecryptItemInput; + +pub(crate) mod _decrypt_item_output; + +pub(crate) mod _decrypt_item_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item/_decrypt_item_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item/_decrypt_item_input.rs new file mode 100644 index 000000000..73bb5e0ba --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item/_decrypt_item_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 decrypting a DynamoDB Item. +pub struct DecryptItemInput { + /// The encrypted DynamoDB item to decrypt. +pub encrypted_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl DecryptItemInput { + /// The encrypted DynamoDB item to decrypt. +pub fn encrypted_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.encrypted_item +} +} +impl DecryptItemInput { + /// Creates a new builder-style object to manufacture [`DecryptItemInput`](crate::operation::decrypt_item::builders::DecryptItemInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::builders::DecryptItemInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::builders::DecryptItemInputBuilder::default() + } +} + +/// A builder for [`DecryptItemInput`](crate::operation::operation::DecryptItemInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptItemInputBuilder { + pub(crate) encrypted_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl DecryptItemInputBuilder { + /// The encrypted DynamoDB item to decrypt. +pub fn encrypted_item(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.encrypted_item = ::std::option::Option::Some(input.into()); + self +} +/// The encrypted DynamoDB item to decrypt. +pub fn set_encrypted_item(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.encrypted_item = input; + self +} +/// The encrypted DynamoDB item to decrypt. +pub fn get_encrypted_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.encrypted_item +} + /// Consumes the builder and constructs a [`DecryptItemInput`](crate::operation::operation::DecryptItemInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemInput { + encrypted_item: self.encrypted_item, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item/_decrypt_item_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item/_decrypt_item_output.rs new file mode 100644 index 000000000..fdb871200 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item/_decrypt_item_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)] +/// Outputs for decrypting a DynamoDB Item. +pub struct DecryptItemOutput { + /// A parsed version of the header on the encrypted DynamoDB item. +pub parsed_header: ::std::option::Option, +/// The decrypted DynamoDB item. +pub plaintext_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl DecryptItemOutput { + /// A parsed version of the header on the encrypted DynamoDB item. +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +/// The decrypted DynamoDB item. +pub fn plaintext_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.plaintext_item +} +} +impl DecryptItemOutput { + /// Creates a new builder-style object to manufacture [`DecryptItemOutput`](crate::operation::decrypt_item::builders::DecryptItemOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::builders::DecryptItemOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::builders::DecryptItemOutputBuilder::default() + } +} + +/// A builder for [`DecryptItemOutput`](crate::operation::operation::DecryptItemOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptItemOutputBuilder { + pub(crate) parsed_header: ::std::option::Option, +pub(crate) plaintext_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl DecryptItemOutputBuilder { + /// A parsed version of the header on the encrypted DynamoDB item. +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +/// A parsed version of the header on the encrypted DynamoDB item. +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +/// A parsed version of the header on the encrypted DynamoDB item. +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +/// The decrypted DynamoDB item. +pub fn plaintext_item(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.plaintext_item = ::std::option::Option::Some(input.into()); + self +} +/// The decrypted DynamoDB item. +pub fn set_plaintext_item(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.plaintext_item = input; + self +} +/// The decrypted DynamoDB item. +pub fn get_plaintext_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.plaintext_item +} + /// Consumes the builder and constructs a [`DecryptItemOutput`](crate::operation::operation::DecryptItemOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemOutput { + parsed_header: self.parsed_header, +plaintext_item: self.plaintext_item, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item/builders.rs new file mode 100644 index 000000000..1f37bd521 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/decrypt_item/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_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::_decrypt_item_output::DecryptItemOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::_decrypt_item_input::DecryptItemInputBuilder; + +impl DecryptItemInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error, + > { + let mut fluent_builder = client.decrypt_item(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `DecryptItem`. +/// +/// Decrypt a DynamoDB Item. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct DecryptItemFluentBuilder { + client: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::builders::DecryptItemInputBuilder, +} +impl DecryptItemFluentBuilder { + /// Creates a new `DecryptItem`. + pub(crate) fn new(client: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the DecryptItem as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::builders::DecryptItemInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItemOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::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_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::decrypt_item::DecryptItem::send(&self.client, input).await + } + + /// The encrypted DynamoDB item to decrypt. +pub fn encrypted_item(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.inner = self.inner.encrypted_item(input.into()); + self +} +/// The encrypted DynamoDB item to decrypt. +pub fn set_encrypted_item(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.inner = self.inner.set_encrypted_item(input); + self +} +/// The encrypted DynamoDB item to decrypt. +pub fn get_encrypted_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + self.inner.get_encrypted_item() +} +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item.rs new file mode 100644 index 000000000..eab09549c --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item.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 `EncryptItem`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct EncryptItem; +impl EncryptItem { + /// Creates a new `EncryptItem` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client, + input: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error, + > { + if input.plaintext_item.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext_item", + "plaintext_item was not specified but it is required when building EncryptItemInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::wrap_validation_err); +} + let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::encrypt_item::_encrypt_item_input::to_dafny(input); + let inner_result = + ::dafny_runtime::md!(client.dafny_client.clone()).EncryptItem(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::encrypt_item::_encrypt_item_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::_encrypt_item_output::EncryptItemOutput; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::_encrypt_item_input::EncryptItemInput; + +pub(crate) mod _encrypt_item_output; + +pub(crate) mod _encrypt_item_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item/_encrypt_item_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item/_encrypt_item_input.rs new file mode 100644 index 000000000..58fc3ab07 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item/_encrypt_item_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 encrypting a DynamoDB Item. +pub struct EncryptItemInput { + /// The DynamoDB item to encrypt. +pub plaintext_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl EncryptItemInput { + /// The DynamoDB item to encrypt. +pub fn plaintext_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.plaintext_item +} +} +impl EncryptItemInput { + /// Creates a new builder-style object to manufacture [`EncryptItemInput`](crate::operation::encrypt_item::builders::EncryptItemInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::builders::EncryptItemInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::builders::EncryptItemInputBuilder::default() + } +} + +/// A builder for [`EncryptItemInput`](crate::operation::operation::EncryptItemInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptItemInputBuilder { + pub(crate) plaintext_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl EncryptItemInputBuilder { + /// The DynamoDB item to encrypt. +pub fn plaintext_item(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.plaintext_item = ::std::option::Option::Some(input.into()); + self +} +/// The DynamoDB item to encrypt. +pub fn set_plaintext_item(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.plaintext_item = input; + self +} +/// The DynamoDB item to encrypt. +pub fn get_plaintext_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.plaintext_item +} + /// Consumes the builder and constructs a [`EncryptItemInput`](crate::operation::operation::EncryptItemInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemInput { + plaintext_item: self.plaintext_item, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item/_encrypt_item_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item/_encrypt_item_output.rs new file mode 100644 index 000000000..20483c7b1 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item/_encrypt_item_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)] +/// Outputs for encrypting a DynamoDB Item. +pub struct EncryptItemOutput { + /// The encrypted DynamoDB item. +pub encrypted_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +/// A parsed version of the header written with the encrypted DynamoDB item. +pub parsed_header: ::std::option::Option, +} +impl EncryptItemOutput { + /// The encrypted DynamoDB item. +pub fn encrypted_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.encrypted_item +} +/// A parsed version of the header written with the encrypted DynamoDB item. +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +} +impl EncryptItemOutput { + /// Creates a new builder-style object to manufacture [`EncryptItemOutput`](crate::operation::encrypt_item::builders::EncryptItemOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::builders::EncryptItemOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::builders::EncryptItemOutputBuilder::default() + } +} + +/// A builder for [`EncryptItemOutput`](crate::operation::operation::EncryptItemOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptItemOutputBuilder { + pub(crate) encrypted_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +pub(crate) parsed_header: ::std::option::Option, +} +impl EncryptItemOutputBuilder { + /// The encrypted DynamoDB item. +pub fn encrypted_item(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.encrypted_item = ::std::option::Option::Some(input.into()); + self +} +/// The encrypted DynamoDB item. +pub fn set_encrypted_item(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.encrypted_item = input; + self +} +/// The encrypted DynamoDB item. +pub fn get_encrypted_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.encrypted_item +} +/// A parsed version of the header written with the encrypted DynamoDB item. +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +/// A parsed version of the header written with the encrypted DynamoDB item. +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +/// A parsed version of the header written with the encrypted DynamoDB item. +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} + /// Consumes the builder and constructs a [`EncryptItemOutput`](crate::operation::operation::EncryptItemOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemOutput { + encrypted_item: self.encrypted_item, +parsed_header: self.parsed_header, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item/builders.rs new file mode 100644 index 000000000..873beb101 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/operation/encrypt_item/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_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::_encrypt_item_output::EncryptItemOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::_encrypt_item_input::EncryptItemInputBuilder; + +impl EncryptItemInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error, + > { + let mut fluent_builder = client.encrypt_item(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `EncryptItem`. +/// +/// Encrypt a DynamoDB Item. +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct EncryptItemFluentBuilder { + client: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::builders::EncryptItemInputBuilder, +} +impl EncryptItemFluentBuilder { + /// Creates a new `EncryptItem`. + pub(crate) fn new(client: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the EncryptItem as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::builders::EncryptItemInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItemOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::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_dbEncryptionSdk_dynamoDb_itemEncryptor::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::operation::encrypt_item::EncryptItem::send(&self.client, input).await + } + + /// The DynamoDB item to encrypt. +pub fn plaintext_item(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.inner = self.inner.plaintext_item(input.into()); + self +} +/// The DynamoDB item to encrypt. +pub fn set_plaintext_item(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.inner = self.inner.set_plaintext_item(input); + self +} +/// The DynamoDB item to encrypt. +pub fn get_plaintext_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + self.inner.get_plaintext_item() +} +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types.rs new file mode 100644 index 000000000..b5d3a3f31 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types.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. +/// Types for the `DynamoDbItemEncryptorConfig` +pub mod dynamo_db_item_encryptor_config; + +pub mod builders; + + + +mod _decrypt_item_input; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::_decrypt_item_input::DecryptItemInput; +mod _decrypt_item_output; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::_decrypt_item_output::DecryptItemOutput; +mod _encrypt_item_input; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::_encrypt_item_input::EncryptItemInput; +mod _encrypt_item_output; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::_encrypt_item_output::EncryptItemOutput; +mod _parsed_header; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::_parsed_header::ParsedHeader; + +pub mod error; + + + diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_decrypt_item_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_decrypt_item_input.rs new file mode 100644 index 000000000..46433ed6f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_decrypt_item_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 decrypting a DynamoDB Item. +pub struct DecryptItemInput { + /// The encrypted DynamoDB item to decrypt. +pub encrypted_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl DecryptItemInput { + /// The encrypted DynamoDB item to decrypt. +pub fn encrypted_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.encrypted_item +} +} +impl DecryptItemInput { + /// Creates a new builder-style object to manufacture [`DecryptItemInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::builders::DecryptItemInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::builders::DecryptItemInputBuilder::default() + } +} + +/// A builder for [`DecryptItemInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptItemInputBuilder { + pub(crate) encrypted_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl DecryptItemInputBuilder { + /// The encrypted DynamoDB item to decrypt. +pub fn encrypted_item(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.encrypted_item = ::std::option::Option::Some(input.into()); + self +} +/// The encrypted DynamoDB item to decrypt. +pub fn set_encrypted_item(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.encrypted_item = input; + self +} +/// The encrypted DynamoDB item to decrypt. +pub fn get_encrypted_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.encrypted_item +} + /// Consumes the builder and constructs a [`DecryptItemInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemInput { + encrypted_item: self.encrypted_item, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_decrypt_item_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_decrypt_item_output.rs new file mode 100644 index 000000000..776937371 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_decrypt_item_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)] +/// Outputs for decrypting a DynamoDB Item. +pub struct DecryptItemOutput { + /// A parsed version of the header on the encrypted DynamoDB item. +pub parsed_header: ::std::option::Option, +/// The decrypted DynamoDB item. +pub plaintext_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl DecryptItemOutput { + /// A parsed version of the header on the encrypted DynamoDB item. +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +/// The decrypted DynamoDB item. +pub fn plaintext_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.plaintext_item +} +} +impl DecryptItemOutput { + /// Creates a new builder-style object to manufacture [`DecryptItemOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::builders::DecryptItemOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::builders::DecryptItemOutputBuilder::default() + } +} + +/// A builder for [`DecryptItemOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptItemOutputBuilder { + pub(crate) parsed_header: ::std::option::Option, +pub(crate) plaintext_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl DecryptItemOutputBuilder { + /// A parsed version of the header on the encrypted DynamoDB item. +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +/// A parsed version of the header on the encrypted DynamoDB item. +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +/// A parsed version of the header on the encrypted DynamoDB item. +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +/// The decrypted DynamoDB item. +pub fn plaintext_item(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.plaintext_item = ::std::option::Option::Some(input.into()); + self +} +/// The decrypted DynamoDB item. +pub fn set_plaintext_item(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.plaintext_item = input; + self +} +/// The decrypted DynamoDB item. +pub fn get_plaintext_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.plaintext_item +} + /// Consumes the builder and constructs a [`DecryptItemOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DecryptItemOutput { + parsed_header: self.parsed_header, +plaintext_item: self.plaintext_item, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_encrypt_item_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_encrypt_item_input.rs new file mode 100644 index 000000000..1eb6923c1 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_encrypt_item_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 encrypting a DynamoDB Item. +pub struct EncryptItemInput { + /// The DynamoDB item to encrypt. +pub plaintext_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl EncryptItemInput { + /// The DynamoDB item to encrypt. +pub fn plaintext_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.plaintext_item +} +} +impl EncryptItemInput { + /// Creates a new builder-style object to manufacture [`EncryptItemInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::builders::EncryptItemInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::builders::EncryptItemInputBuilder::default() + } +} + +/// A builder for [`EncryptItemInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptItemInputBuilder { + pub(crate) plaintext_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +} +impl EncryptItemInputBuilder { + /// The DynamoDB item to encrypt. +pub fn plaintext_item(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.plaintext_item = ::std::option::Option::Some(input.into()); + self +} +/// The DynamoDB item to encrypt. +pub fn set_plaintext_item(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.plaintext_item = input; + self +} +/// The DynamoDB item to encrypt. +pub fn get_plaintext_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.plaintext_item +} + /// Consumes the builder and constructs a [`EncryptItemInput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemInput { + plaintext_item: self.plaintext_item, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_encrypt_item_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_encrypt_item_output.rs new file mode 100644 index 000000000..01ca3105d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_encrypt_item_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)] +/// Outputs for encrypting a DynamoDB Item. +pub struct EncryptItemOutput { + /// The encrypted DynamoDB item. +pub encrypted_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +/// A parsed version of the header written with the encrypted DynamoDB item. +pub parsed_header: ::std::option::Option, +} +impl EncryptItemOutput { + /// The encrypted DynamoDB item. +pub fn encrypted_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.encrypted_item +} +/// A parsed version of the header written with the encrypted DynamoDB item. +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +} +impl EncryptItemOutput { + /// Creates a new builder-style object to manufacture [`EncryptItemOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::builders::EncryptItemOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::builders::EncryptItemOutputBuilder::default() + } +} + +/// A builder for [`EncryptItemOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptItemOutputBuilder { + pub(crate) encrypted_item: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +pub(crate) parsed_header: ::std::option::Option, +} +impl EncryptItemOutputBuilder { + /// The encrypted DynamoDB item. +pub fn encrypted_item(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.encrypted_item = ::std::option::Option::Some(input.into()); + self +} +/// The encrypted DynamoDB item. +pub fn set_encrypted_item(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.encrypted_item = input; + self +} +/// The encrypted DynamoDB item. +pub fn get_encrypted_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.encrypted_item +} +/// A parsed version of the header written with the encrypted DynamoDB item. +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +/// A parsed version of the header written with the encrypted DynamoDB item. +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +/// A parsed version of the header written with the encrypted DynamoDB item. +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} + /// Consumes the builder and constructs a [`EncryptItemOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::EncryptItemOutput { + encrypted_item: self.encrypted_item, +parsed_header: self.parsed_header, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_parsed_header.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_parsed_header.rs new file mode 100644 index 000000000..b20879fee --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/_parsed_header.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)] +/// A parsed version of the header that was written with or read on an encrypted DynamoDB item. +pub struct ParsedHeader { + /// The ID of the algorithm suite that was used to encrypt this item. +pub algorithm_suite_id: ::std::option::Option, +/// The non-DO_NOTHING Crypto Actions that were configured when this item was originally encrypted. +pub attribute_actions_on_encrypt: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +/// The encrypted data keys that are stored in the header of this item. +pub encrypted_data_keys: ::std::option::Option<::std::vec::Vec>, +/// The full encryption context. +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +/// The encryption context as presented to the branch key selector. +pub selector_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +/// The portion of the encryption context that was stored in the header of this item. +pub stored_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl ParsedHeader { + /// The ID of the algorithm suite that was used to encrypt this item. +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +/// The non-DO_NOTHING Crypto Actions that were configured when this item was originally encrypted. +pub fn attribute_actions_on_encrypt(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.attribute_actions_on_encrypt +} +/// The encrypted data keys that are stored in the header of this item. +pub fn encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +/// The full encryption context. +pub fn encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +/// The encryption context as presented to the branch key selector. +pub fn selector_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.selector_context +} +/// The portion of the encryption context that was stored in the header of this item. +pub fn stored_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.stored_encryption_context +} +} +impl ParsedHeader { + /// Creates a new builder-style object to manufacture [`ParsedHeader`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::ParsedHeader). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::builders::ParsedHeaderBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::builders::ParsedHeaderBuilder::default() + } +} + +/// A builder for [`ParsedHeader`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::ParsedHeader). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ParsedHeaderBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) attribute_actions_on_encrypt: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +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) selector_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>, +pub(crate) stored_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl ParsedHeaderBuilder { + /// The ID of the algorithm suite that was used to encrypt this item. +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite_id = ::std::option::Option::Some(input.into()); + self +} +/// The ID of the algorithm suite that was used to encrypt this item. +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite_id = input; + self +} +/// The ID of the algorithm suite that was used to encrypt this item. +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +/// The non-DO_NOTHING Crypto Actions that were configured when this item was originally encrypted. +pub fn attribute_actions_on_encrypt(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.attribute_actions_on_encrypt = ::std::option::Option::Some(input.into()); + self +} +/// The non-DO_NOTHING Crypto Actions that were configured when this item was originally encrypted. +pub fn set_attribute_actions_on_encrypt(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.attribute_actions_on_encrypt = input; + self +} +/// The non-DO_NOTHING Crypto Actions that were configured when this item was originally encrypted. +pub fn get_attribute_actions_on_encrypt(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.attribute_actions_on_encrypt +} +/// The encrypted data keys that are stored in the header of this item. +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 +} +/// The encrypted data keys that are stored in the header of this item. +pub fn set_encrypted_data_keys(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_data_keys = input; + self +} +/// The encrypted data keys that are stored in the header of this item. +pub fn get_encrypted_data_keys(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_data_keys +} +/// The full encryption context. +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 full encryption context. +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 full encryption context. +pub fn get_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.encryption_context +} +/// The encryption context as presented to the branch key selector. +pub fn selector_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.selector_context = ::std::option::Option::Some(input.into()); + self +} +/// The encryption context as presented to the branch key selector. +pub fn set_selector_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>>) -> Self { + self.selector_context = input; + self +} +/// The encryption context as presented to the branch key selector. +pub fn get_selector_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>> { + &self.selector_context +} +/// The portion of the encryption context that was stored in the header of this item. +pub fn stored_encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.stored_encryption_context = ::std::option::Option::Some(input.into()); + self +} +/// The portion of the encryption context that was stored in the header of this item. +pub fn set_stored_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.stored_encryption_context = input; + self +} +/// The portion of the encryption context that was stored in the header of this item. +pub fn get_stored_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.stored_encryption_context +} + /// Consumes the builder and constructs a [`ParsedHeader`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::ParsedHeader). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::ParsedHeader, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::ParsedHeader { + algorithm_suite_id: self.algorithm_suite_id, +attribute_actions_on_encrypt: self.attribute_actions_on_encrypt, +encrypted_data_keys: self.encrypted_data_keys, +encryption_context: self.encryption_context, +selector_context: self.selector_context, +stored_encryption_context: self.stored_encryption_context, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/builders.rs new file mode 100644 index 000000000..b973d7f75 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/builders.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 use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::_decrypt_item_input::DecryptItemInputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::_decrypt_item_output::DecryptItemOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::_encrypt_item_input::EncryptItemInputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::_encrypt_item_output::EncryptItemOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::_parsed_header::ParsedHeaderBuilder; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/dynamo_db_item_encryptor_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/dynamo_db_item_encryptor_config.rs new file mode 100644 index 000000000..32fba405f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/dynamo_db_item_encryptor_config.rs @@ -0,0 +1,278 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This 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 for the client-side encryption of DynamoDB items. +pub struct DynamoDbItemEncryptorConfig { + /// An ID for the algorithm suite to use during encryption and decryption. +pub algorithm_suite_id: ::std::option::Option, +/// A prefix such that, if during decryption any attribute has a name with this prefix, it is treated as unsigned. +pub allowed_unsigned_attribute_prefix: ::std::option::Option<::std::string::String>, +/// A list of attribute names such that, if encountered during decryption, those attributes are treated as unsigned. +pub allowed_unsigned_attributes: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +/// A map that describes what attributes should be encrypted and/or signed on encrypt. This map must contain all attributes that might be encountered during encryption. +pub attribute_actions_on_encrypt: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +/// The Cryptographic Materials Manager that is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub cmm: ::std::option::Option, +/// The Keyring that should be used to wrap and unwrap data keys. If specified a Default Cryptographic Materials Manager with this Keyring is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub keyring: ::std::option::Option, +/// A configuration that override encryption and/or decryption to instead perform legacy encryption and/or decryption. Used as part of migration from version 2.x to version 3.x. +pub legacy_override: ::std::option::Option, +/// The logical table name for this table. This is the name that is cryptographically bound with your data. This can be the same as the actual DynamoDB table name. It's purpose is to be distinct from the DynamoDB table name so that the data may still be authenticated if being read from different (but logically similar) tables, such as a backup table. +pub logical_table_name: ::std::option::Option<::std::string::String>, +/// The name of the partition key on the table this item will be written to or was read from. +pub partition_key_name: ::std::option::Option<::std::string::String>, +/// A configuration that override encryption and/or decryption to instead passthrough and write and/or read plaintext. Used to update plaintext tables to fully use client-side encryption. +pub plaintext_override: ::std::option::Option, +/// If this table contains a sort key, the name of the sort key on the table this item will be written to or was read from. +pub sort_key_name: ::std::option::Option<::std::string::String>, +} +impl DynamoDbItemEncryptorConfig { + /// An ID for the algorithm suite to use during encryption and decryption. +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +/// A prefix such that, if during decryption any attribute has a name with this prefix, it is treated as unsigned. +pub fn allowed_unsigned_attribute_prefix(&self) -> &::std::option::Option<::std::string::String> { + &self.allowed_unsigned_attribute_prefix +} +/// A list of attribute names such that, if encountered during decryption, those attributes are treated as unsigned. +pub fn allowed_unsigned_attributes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.allowed_unsigned_attributes +} +/// A map that describes what attributes should be encrypted and/or signed on encrypt. This map must contain all attributes that might be encountered during encryption. +pub fn attribute_actions_on_encrypt(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.attribute_actions_on_encrypt +} +/// The Cryptographic Materials Manager that is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn cmm(&self) -> &::std::option::Option { + &self.cmm +} +/// The Keyring that should be used to wrap and unwrap data keys. If specified a Default Cryptographic Materials Manager with this Keyring is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn keyring(&self) -> &::std::option::Option { + &self.keyring +} +/// A configuration that override encryption and/or decryption to instead perform legacy encryption and/or decryption. Used as part of migration from version 2.x to version 3.x. +pub fn legacy_override(&self) -> &::std::option::Option { + &self.legacy_override +} +/// The logical table name for this table. This is the name that is cryptographically bound with your data. This can be the same as the actual DynamoDB table name. It's purpose is to be distinct from the DynamoDB table name so that the data may still be authenticated if being read from different (but logically similar) tables, such as a backup table. +pub fn logical_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.logical_table_name +} +/// The name of the partition key on the table this item will be written to or was read from. +pub fn partition_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.partition_key_name +} +/// A configuration that override encryption and/or decryption to instead passthrough and write and/or read plaintext. Used to update plaintext tables to fully use client-side encryption. +pub fn plaintext_override(&self) -> &::std::option::Option { + &self.plaintext_override +} +/// If this table contains a sort key, the name of the sort key on the table this item will be written to or was read from. +pub fn sort_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.sort_key_name +} +} +impl DynamoDbItemEncryptorConfig { + /// Creates a new builder-style object to manufacture [`DynamoDbItemEncryptorConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DynamoDbItemEncryptorConfig). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfigBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfigBuilder::default() + } +} + +/// A builder for [`DynamoDbItemEncryptorConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DynamoDbItemEncryptorConfig). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DynamoDbItemEncryptorConfigBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) allowed_unsigned_attribute_prefix: ::std::option::Option<::std::string::String>, +pub(crate) allowed_unsigned_attributes: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +pub(crate) attribute_actions_on_encrypt: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +pub(crate) cmm: ::std::option::Option, +pub(crate) keyring: ::std::option::Option, +pub(crate) legacy_override: ::std::option::Option, +pub(crate) logical_table_name: ::std::option::Option<::std::string::String>, +pub(crate) partition_key_name: ::std::option::Option<::std::string::String>, +pub(crate) plaintext_override: ::std::option::Option, +pub(crate) sort_key_name: ::std::option::Option<::std::string::String>, +} +impl DynamoDbItemEncryptorConfigBuilder { + /// An ID for the algorithm suite to use during encryption and decryption. +pub fn algorithm_suite_id(mut self, input: impl ::std::convert::Into) -> Self { + self.algorithm_suite_id = ::std::option::Option::Some(input.into()); + self +} +/// An ID for the algorithm suite to use during encryption and decryption. +pub fn set_algorithm_suite_id(mut self, input: ::std::option::Option) -> Self { + self.algorithm_suite_id = input; + self +} +/// An ID for the algorithm suite to use during encryption and decryption. +pub fn get_algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +/// A prefix such that, if during decryption any attribute has a name with this prefix, it is treated as unsigned. +pub fn allowed_unsigned_attribute_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.allowed_unsigned_attribute_prefix = ::std::option::Option::Some(input.into()); + self +} +/// A prefix such that, if during decryption any attribute has a name with this prefix, it is treated as unsigned. +pub fn set_allowed_unsigned_attribute_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.allowed_unsigned_attribute_prefix = input; + self +} +/// A prefix such that, if during decryption any attribute has a name with this prefix, it is treated as unsigned. +pub fn get_allowed_unsigned_attribute_prefix(&self) -> &::std::option::Option<::std::string::String> { + &self.allowed_unsigned_attribute_prefix +} +/// A list of attribute names such that, if encountered during decryption, those attributes are treated as unsigned. +pub fn allowed_unsigned_attributes(mut self, input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>) -> Self { + self.allowed_unsigned_attributes = ::std::option::Option::Some(input.into()); + self +} +/// A list of attribute names such that, if encountered during decryption, those attributes are treated as unsigned. +pub fn set_allowed_unsigned_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.allowed_unsigned_attributes = input; + self +} +/// A list of attribute names such that, if encountered during decryption, those attributes are treated as unsigned. +pub fn get_allowed_unsigned_attributes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.allowed_unsigned_attributes +} +/// A map that describes what attributes should be encrypted and/or signed on encrypt. This map must contain all attributes that might be encountered during encryption. +pub fn attribute_actions_on_encrypt(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.attribute_actions_on_encrypt = ::std::option::Option::Some(input.into()); + self +} +/// A map that describes what attributes should be encrypted and/or signed on encrypt. This map must contain all attributes that might be encountered during encryption. +pub fn set_attribute_actions_on_encrypt(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.attribute_actions_on_encrypt = input; + self +} +/// A map that describes what attributes should be encrypted and/or signed on encrypt. This map must contain all attributes that might be encountered during encryption. +pub fn get_attribute_actions_on_encrypt(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.attribute_actions_on_encrypt +} +/// The Cryptographic Materials Manager that is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.cmm = ::std::option::Option::Some(input.into()); + self +} +/// The Cryptographic Materials Manager that is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.cmm = input; + self +} +/// The Cryptographic Materials Manager that is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn get_cmm(&self) -> &::std::option::Option { + &self.cmm +} +/// The Keyring that should be used to wrap and unwrap data keys. If specified a Default Cryptographic Materials Manager with this Keyring is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn keyring(mut self, input: impl ::std::convert::Into) -> Self { + self.keyring = ::std::option::Option::Some(input.into()); + self +} +/// The Keyring that should be used to wrap and unwrap data keys. If specified a Default Cryptographic Materials Manager with this Keyring is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn set_keyring(mut self, input: ::std::option::Option) -> Self { + self.keyring = input; + self +} +/// The Keyring that should be used to wrap and unwrap data keys. If specified a Default Cryptographic Materials Manager with this Keyring is used to obtain materials for encryption and decryption. Either a Keyring or a Cryptographic Materials Manager must be specified. +pub fn get_keyring(&self) -> &::std::option::Option { + &self.keyring +} +/// A configuration that override encryption and/or decryption to instead perform legacy encryption and/or decryption. Used as part of migration from version 2.x to version 3.x. +pub fn legacy_override(mut self, input: impl ::std::convert::Into) -> Self { + self.legacy_override = ::std::option::Option::Some(input.into()); + self +} +/// A configuration that override encryption and/or decryption to instead perform legacy encryption and/or decryption. Used as part of migration from version 2.x to version 3.x. +pub fn set_legacy_override(mut self, input: ::std::option::Option) -> Self { + self.legacy_override = input; + self +} +/// A configuration that override encryption and/or decryption to instead perform legacy encryption and/or decryption. Used as part of migration from version 2.x to version 3.x. +pub fn get_legacy_override(&self) -> &::std::option::Option { + &self.legacy_override +} +/// The logical table name for this table. This is the name that is cryptographically bound with your data. This can be the same as the actual DynamoDB table name. It's purpose is to be distinct from the DynamoDB table name so that the data may still be authenticated if being read from different (but logically similar) tables, such as a backup table. +pub fn logical_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.logical_table_name = ::std::option::Option::Some(input.into()); + self +} +/// The logical table name for this table. This is the name that is cryptographically bound with your data. This can be the same as the actual DynamoDB table name. It's purpose is to be distinct from the DynamoDB table name so that the data may still be authenticated if being read from different (but logically similar) tables, such as a backup table. +pub fn set_logical_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.logical_table_name = input; + self +} +/// The logical table name for this table. This is the name that is cryptographically bound with your data. This can be the same as the actual DynamoDB table name. It's purpose is to be distinct from the DynamoDB table name so that the data may still be authenticated if being read from different (but logically similar) tables, such as a backup table. +pub fn get_logical_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.logical_table_name +} +/// The name of the partition key on the table this item will be written to or was read from. +pub fn partition_key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.partition_key_name = ::std::option::Option::Some(input.into()); + self +} +/// The name of the partition key on the table this item will be written to or was read from. +pub fn set_partition_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.partition_key_name = input; + self +} +/// The name of the partition key on the table this item will be written to or was read from. +pub fn get_partition_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.partition_key_name +} +/// A configuration that override encryption and/or decryption to instead passthrough and write and/or read plaintext. Used to update plaintext tables to fully use client-side encryption. +pub fn plaintext_override(mut self, input: impl ::std::convert::Into) -> Self { + self.plaintext_override = ::std::option::Option::Some(input.into()); + self +} +/// A configuration that override encryption and/or decryption to instead passthrough and write and/or read plaintext. Used to update plaintext tables to fully use client-side encryption. +pub fn set_plaintext_override(mut self, input: ::std::option::Option) -> Self { + self.plaintext_override = input; + self +} +/// A configuration that override encryption and/or decryption to instead passthrough and write and/or read plaintext. Used to update plaintext tables to fully use client-side encryption. +pub fn get_plaintext_override(&self) -> &::std::option::Option { + &self.plaintext_override +} +/// If this table contains a sort key, the name of the sort key on the table this item will be written to or was read from. +pub fn sort_key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.sort_key_name = ::std::option::Option::Some(input.into()); + self +} +/// If this table contains a sort key, the name of the sort key on the table this item will be written to or was read from. +pub fn set_sort_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.sort_key_name = input; + self +} +/// If this table contains a sort key, the name of the sort key on the table this item will be written to or was read from. +pub fn get_sort_key_name(&self) -> &::std::option::Option<::std::string::String> { + &self.sort_key_name +} + /// Consumes the builder and constructs a [`DynamoDbItemEncryptorConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::DynamoDbItemEncryptorConfig). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig { + algorithm_suite_id: self.algorithm_suite_id, +allowed_unsigned_attribute_prefix: self.allowed_unsigned_attribute_prefix, +allowed_unsigned_attributes: self.allowed_unsigned_attributes, +attribute_actions_on_encrypt: self.attribute_actions_on_encrypt, +cmm: self.cmm, +keyring: self.keyring, +legacy_override: self.legacy_override, +logical_table_name: self.logical_table_name, +partition_key_name: self.partition_key_name, +plaintext_override: self.plaintext_override, +sort_key_name: self.sort_key_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/error.rs new file mode 100644 index 000000000..579f67c74 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor/types/error.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. +#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)] +pub enum Error { + #[allow(missing_docs)] +DynamoDbItemEncryptorException { + 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, +}, + +AwsCryptographicMaterialProvidersError { + error: crate::deps::aws_cryptography_materialProviders::types::error::Error, +}, + +StructuredEncryptionError { + error: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, +}, + +DynamoDbEncryptionError { + error: crate::deps::aws_cryptography_dbEncryptionSdk_dynamoDb::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption.rs new file mode 100644 index 000000000..e118e5215 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption.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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client.rs new file mode 100644 index 000000000..6d695e208 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client.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. +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_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig, + ) -> Result { + let inner = + crate::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::_default::StructuredEncryption( + &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_encryption_config::_structured_encryption_config::to_dafny(conf), + ); + if matches!( + inner.as_ref(), + crate::_Wrappers_Compile::Result::Failure { .. } + ) { + return Err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::from_dafny(inner.as_ref().error().clone())); + } + Ok(Self { + dafny_client: ::dafny_runtime::upcast_object()(inner.Extract()) + }) + } +} + +mod encrypt_structure; + +mod decrypt_structure; + +mod encrypt_path_structure; + +mod decrypt_path_structure; + +mod resolve_auth_actions; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/decrypt_path_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/decrypt_path_structure.rs new file mode 100644 index 000000000..8b17bf106 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/decrypt_path_structure.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_dbEncryptionSdk_structuredEncryption::client::Client { + /// Constructs a fluent builder for the [`DecryptPathStructure`](crate::operation::decrypt_path_structure::builders::DecryptPathStructureFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`cmm(impl Into>)`](crate::operation::decrypt_path_structure::builders::DecryptPathStructureFluentBuilder::cmm) / [`set_cmm(Option)`](crate::operation::decrypt_path_structure::builders::DecryptPathStructureFluentBuilder::set_cmm): (undocumented)
+ /// - [`encrypted_structure(impl Into>>)`](crate::operation::decrypt_path_structure::builders::DecryptPathStructureFluentBuilder::encrypted_structure) / [`set_encrypted_structure(Option<::std::vec::Vec>)`](crate::operation::decrypt_path_structure::builders::DecryptPathStructureFluentBuilder::set_encrypted_structure): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::decrypt_path_structure::builders::DecryptPathStructureFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::decrypt_path_structure::builders::DecryptPathStructureFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`table_name(impl Into>)`](crate::operation::decrypt_path_structure::builders::DecryptPathStructureFluentBuilder::table_name) / [`set_table_name(Option<::std::string::String>)`](crate::operation::decrypt_path_structure::builders::DecryptPathStructureFluentBuilder::set_table_name): (undocumented)
+ /// - On success, responds with [`DecryptPathStructureOutput`](crate::operation::decrypt_path_structure::DecryptPathStructureOutput) with field(s): + /// - [`parsed_header(Option)`](crate::operation::decrypt_path_structure::DecryptPathStructureOutput::parsed_header): (undocumented) + /// - [`plaintext_structure(Option<::std::vec::Vec>)`](crate::operation::decrypt_path_structure::DecryptPathStructureOutput::plaintext_structure): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::decrypt_path_structure::DecryptPathStructureError) + pub fn decrypt_path_structure(&self) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::builders::DecryptPathStructureFluentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::builders::DecryptPathStructureFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/decrypt_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/decrypt_structure.rs new file mode 100644 index 000000000..23ce6a92c --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/decrypt_structure.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_dbEncryptionSdk_structuredEncryption::client::Client { + /// Constructs a fluent builder for the [`DecryptStructure`](crate::operation::decrypt_structure::builders::DecryptStructureFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`authenticate_schema(impl Into>>)`](crate::operation::decrypt_structure::builders::DecryptStructureFluentBuilder::authenticate_schema) / [`set_authenticate_schema(Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>)`](crate::operation::decrypt_structure::builders::DecryptStructureFluentBuilder::set_authenticate_schema): (undocumented)
+ /// - [`cmm(impl Into>)`](crate::operation::decrypt_structure::builders::DecryptStructureFluentBuilder::cmm) / [`set_cmm(Option)`](crate::operation::decrypt_structure::builders::DecryptStructureFluentBuilder::set_cmm): (undocumented)
+ /// - [`encrypted_structure(impl Into>>)`](crate::operation::decrypt_structure::builders::DecryptStructureFluentBuilder::encrypted_structure) / [`set_encrypted_structure(Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>)`](crate::operation::decrypt_structure::builders::DecryptStructureFluentBuilder::set_encrypted_structure): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::decrypt_structure::builders::DecryptStructureFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::decrypt_structure::builders::DecryptStructureFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`table_name(impl Into>)`](crate::operation::decrypt_structure::builders::DecryptStructureFluentBuilder::table_name) / [`set_table_name(Option<::std::string::String>)`](crate::operation::decrypt_structure::builders::DecryptStructureFluentBuilder::set_table_name): (undocumented)
+ /// - On success, responds with [`DecryptStructureOutput`](crate::operation::decrypt_structure::DecryptStructureOutput) with field(s): + /// - [`crypto_schema(Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>)`](crate::operation::decrypt_structure::DecryptStructureOutput::crypto_schema): (undocumented) + /// - [`parsed_header(Option)`](crate::operation::decrypt_structure::DecryptStructureOutput::parsed_header): (undocumented) + /// - [`plaintext_structure(Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>)`](crate::operation::decrypt_structure::DecryptStructureOutput::plaintext_structure): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::decrypt_structure::DecryptStructureError) + pub fn decrypt_structure(&self) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::builders::DecryptStructureFluentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::builders::DecryptStructureFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/encrypt_path_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/encrypt_path_structure.rs new file mode 100644 index 000000000..2046b5887 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/encrypt_path_structure.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_dbEncryptionSdk_structuredEncryption::client::Client { + /// Constructs a fluent builder for the [`EncryptPathStructure`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`algorithm_suite_id(impl Into>)`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder::algorithm_suite_id) / [`set_algorithm_suite_id(Option)`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder::set_algorithm_suite_id): (undocumented)
+ /// - [`cmm(impl Into>)`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder::cmm) / [`set_cmm(Option)`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder::set_cmm): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`plaintext_structure(impl Into>>)`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder::plaintext_structure) / [`set_plaintext_structure(Option<::std::vec::Vec>)`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder::set_plaintext_structure): (undocumented)
+ /// - [`table_name(impl Into>)`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder::table_name) / [`set_table_name(Option<::std::string::String>)`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder::set_table_name): (undocumented)
+ /// - On success, responds with [`EncryptPathStructureOutput`](crate::operation::encrypt_path_structure::EncryptPathStructureOutput) with field(s): + /// - [`encrypted_structure(Option<::std::vec::Vec>)`](crate::operation::encrypt_path_structure::EncryptPathStructureOutput::encrypted_structure): (undocumented) + /// - [`parsed_header(Option)`](crate::operation::encrypt_path_structure::EncryptPathStructureOutput::parsed_header): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::encrypt_path_structure::EncryptPathStructureError) + pub fn encrypt_path_structure(&self) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::builders::EncryptPathStructureFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/encrypt_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/encrypt_structure.rs new file mode 100644 index 000000000..0d6af8240 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/encrypt_structure.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_dbEncryptionSdk_structuredEncryption::client::Client { + /// Constructs a fluent builder for the [`EncryptStructure`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`algorithm_suite_id(impl Into>)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::algorithm_suite_id) / [`set_algorithm_suite_id(Option)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::set_algorithm_suite_id): (undocumented)
+ /// - [`cmm(impl Into>)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::cmm) / [`set_cmm(Option)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::set_cmm): (undocumented)
+ /// - [`crypto_schema(impl Into>>)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::crypto_schema) / [`set_crypto_schema(Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::set_crypto_schema): (undocumented)
+ /// - [`encryption_context(impl Into>>)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::encryption_context) / [`set_encryption_context(Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::set_encryption_context): (undocumented)
+ /// - [`plaintext_structure(impl Into>>)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::plaintext_structure) / [`set_plaintext_structure(Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::set_plaintext_structure): (undocumented)
+ /// - [`table_name(impl Into>)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::table_name) / [`set_table_name(Option<::std::string::String>)`](crate::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::set_table_name): (undocumented)
+ /// - On success, responds with [`EncryptStructureOutput`](crate::operation::encrypt_structure::EncryptStructureOutput) with field(s): + /// - [`crypto_schema(Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>)`](crate::operation::encrypt_structure::EncryptStructureOutput::crypto_schema): (undocumented) + /// - [`encrypted_structure(Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>)`](crate::operation::encrypt_structure::EncryptStructureOutput::encrypted_structure): (undocumented) + /// - [`parsed_header(Option)`](crate::operation::encrypt_structure::EncryptStructureOutput::parsed_header): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::encrypt_structure::EncryptStructureError) + pub fn encrypt_structure(&self) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::builders::EncryptStructureFluentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::builders::EncryptStructureFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/resolve_auth_actions.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/resolve_auth_actions.rs new file mode 100644 index 000000000..68e40074d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/client/resolve_auth_actions.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_dbEncryptionSdk_structuredEncryption::client::Client { + /// Constructs a fluent builder for the [`ResolveAuthActions`](crate::operation::resolve_auth_actions::builders::ResolveAuthActionsFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`auth_actions(impl Into>>)`](crate::operation::resolve_auth_actions::builders::ResolveAuthActionsFluentBuilder::auth_actions) / [`set_auth_actions(Option<::std::vec::Vec>)`](crate::operation::resolve_auth_actions::builders::ResolveAuthActionsFluentBuilder::set_auth_actions): (undocumented)
+ /// - [`header_bytes(impl Into>)`](crate::operation::resolve_auth_actions::builders::ResolveAuthActionsFluentBuilder::header_bytes) / [`set_header_bytes(Option<::aws_smithy_types::Blob>)`](crate::operation::resolve_auth_actions::builders::ResolveAuthActionsFluentBuilder::set_header_bytes): (undocumented)
+ /// - [`table_name(impl Into>)`](crate::operation::resolve_auth_actions::builders::ResolveAuthActionsFluentBuilder::table_name) / [`set_table_name(Option<::std::string::String>)`](crate::operation::resolve_auth_actions::builders::ResolveAuthActionsFluentBuilder::set_table_name): (undocumented)
+ /// - On success, responds with [`ResolveAuthActionsOutput`](crate::operation::resolve_auth_actions::ResolveAuthActionsOutput) with field(s): + /// - [`crypto_actions(Option<::std::vec::Vec>)`](crate::operation::resolve_auth_actions::ResolveAuthActionsOutput::crypto_actions): (undocumented) + /// - On failure, responds with [`SdkError`](crate::operation::resolve_auth_actions::ResolveAuthActionsError) + pub fn resolve_auth_actions(&self) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::builders::ResolveAuthActionsFluentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::builders::ResolveAuthActionsFluentBuilder::new(self.clone()) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions.rs new file mode 100644 index 000000000..5440bf491 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions.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. +pub mod auth_item; + + pub mod authenticate_action; + + pub mod client; + + pub mod crypto_action; + + pub mod crypto_item; + + pub mod decrypt_path_structure; + + pub mod decrypt_path_structure_input; + + pub mod decrypt_path_structure_output; + + pub mod decrypt_structure; + + pub mod decrypt_structure_input; + + pub mod decrypt_structure_output; + + pub mod encrypt_path_structure; + + pub mod encrypt_path_structure_input; + + pub mod encrypt_path_structure_output; + + pub mod encrypt_structure; + + pub mod encrypt_structure_input; + + pub mod encrypt_structure_output; + + pub mod error; + + pub mod parsed_header; + + pub mod path_segment; + + pub mod resolve_auth_actions; + + pub mod resolve_auth_actions_input; + + pub mod resolve_auth_actions_output; + + pub mod structure_segment; + + pub mod structured_data_terminal; + +pub mod structured_encryption_config; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/auth_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/auth_item.rs new file mode 100644 index 000000000..f80c12137 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/auth_item.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: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::AuthItem, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::AuthItem { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::AuthItem::AuthItem { + key: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.key.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::path_segment::to_dafny(&e.clone()) +, +) +, + data: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::to_dafny(&value.data.clone().unwrap()) +, + action: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::authenticate_action::to_dafny(value.action.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::dbencryptionsdk::structuredencryption::internaldafny::types::AuthItem, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::AuthItem, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::AuthItem::AuthItem {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem::builder() + .set_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.key(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::path_segment::from_dafny(e.clone()) +, +) + )) + .set_data(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::from_dafny(dafny_value.data().clone()) + )) + .set_action(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::authenticate_action::from_dafny(dafny_value.action()) )) + .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/authenticate_action.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/authenticate_action.rs new file mode 100644 index 000000000..1de7be78b --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/authenticate_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: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction::Sign => crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::AuthenticateAction::SIGN {}, +crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction::DoNotSign => crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::AuthenticateAction::DO_NOT_SIGN {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::AuthenticateAction, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::AuthenticateAction::SIGN {} => crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction::Sign, +crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::AuthenticateAction::DO_NOT_SIGN {} => crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction::DoNotSign, + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/client.rs new file mode 100644 index 000000000..0fc3bc965 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/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_dbEncryptionSdk_structuredEncryption::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::dbencryptionsdk::structuredencryption::internaldafny::types::IStructuredEncryptionClient + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client { dafny_client: dafny_value } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/crypto_action.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/crypto_action.rs new file mode 100644 index 000000000..9eb167f82 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/crypto_action.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_dbEncryptionSdk_structuredEncryption::types::CryptoAction, +) -> ::std::rc::Rc{ + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction::EncryptAndSign => crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction::ENCRYPT_AND_SIGN {}, +crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction::SignAndIncludeInEncryptionContext => crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction::SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT {}, +crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction::SignOnly => crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction::SIGN_ONLY {}, +crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction::DoNothing => crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction::DO_NOTHING {}, + _ => panic!("Unknown enum variant: {}", value), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction::ENCRYPT_AND_SIGN {} => crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction::EncryptAndSign, +crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction::SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT {} => crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction::SignAndIncludeInEncryptionContext, +crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction::SIGN_ONLY {} => crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction::SignOnly, +crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction::DO_NOTHING {} => crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction::DoNothing, + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/crypto_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/crypto_item.rs new file mode 100644 index 000000000..a66727e7f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/crypto_item.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: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoItem, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoItem { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoItem::CryptoItem { + key: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.key.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::path_segment::to_dafny(&e.clone()) +, +) +, + data: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::to_dafny(&value.data.clone().unwrap()) +, + action: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::to_dafny(value.action.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::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoItem, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoItem, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoItem::CryptoItem {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem::builder() + .set_key(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.key(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::path_segment::from_dafny(e.clone()) +, +) + )) + .set_data(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::from_dafny(dafny_value.data().clone()) + )) + .set_action(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::from_dafny(dafny_value.action()) )) + .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure.rs new file mode 100644 index 000000000..8d35df5df --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure.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_path_structure_input; + + pub mod _decrypt_path_structure_output; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure/_decrypt_path_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure/_decrypt_path_structure_input.rs new file mode 100644 index 000000000..ef766ab1d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure/_decrypt_path_structure_input.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: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureInput::DecryptPathStructureInput { + tableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + encryptedStructure: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_structure.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::auth_item::to_dafny(&e.clone()) +, +) +, + cmm: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&value.cmm.clone().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 {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureInput { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableName()) )) + .set_encrypted_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.encryptedStructure(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::auth_item::from_dafny(e.clone()) +, +) + )) + .set_cmm(Some( crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(dafny_value.cmm().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure/_decrypt_path_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure/_decrypt_path_structure_output.rs new file mode 100644 index 000000000..97a47bc0c --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure/_decrypt_path_structure_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::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureOutput::DecryptPathStructureOutput { + plaintextStructure: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.plaintext_structure.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::to_dafny(&e.clone()) +, +) +, + parsedHeader: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::to_dafny(&value.parsed_header.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureOutput { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureOutput::builder() + .set_plaintext_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.plaintextStructure(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::from_dafny(e.clone()) +, +) + )) + .set_parsed_header(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::from_dafny(dafny_value.parsedHeader().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure_input.rs new file mode 100644 index 000000000..df6c77100 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure_input.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: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureInput::DecryptPathStructureInput { + tableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + encryptedStructure: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_structure.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::auth_item::to_dafny(&e.clone()) +, +) +, + cmm: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&value.cmm.clone().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 {} +}) +, + } +} + +#[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::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureInput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureInput::DecryptPathStructureInput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableName()) )) + .set_encrypted_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.encryptedStructure(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::auth_item::from_dafny(e.clone()) +, +) + )) + .set_cmm(Some( crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(dafny_value.cmm().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure_output.rs new file mode 100644 index 000000000..a9837469a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_path_structure_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::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureOutput::DecryptPathStructureOutput { + plaintextStructure: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.plaintext_structure.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::to_dafny(&e.clone()) +, +) +, + parsedHeader: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::to_dafny(&value.parsed_header.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::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureOutput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureOutput::DecryptPathStructureOutput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureOutput::builder() + .set_plaintext_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.plaintextStructure(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::from_dafny(e.clone()) +, +) + )) + .set_parsed_header(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::from_dafny(dafny_value.parsedHeader().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure.rs new file mode 100644 index 000000000..45626e360 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure.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_structure_input; + + pub mod _decrypt_structure_output; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure/_decrypt_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure/_decrypt_structure_input.rs new file mode 100644 index 000000000..31639ce32 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure/_decrypt_structure_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_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureInput::DecryptStructureInput { + tableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + encryptedStructure: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encrypted_structure.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::to_dafny(&v.clone()) +, +) +, + authenticateSchema: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.authenticate_schema.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::authenticate_action::to_dafny(v.clone()), +) +, + cmm: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&value.cmm.clone().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 {} +}) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureInput { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableName()) )) + .set_encrypted_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptedStructure(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::from_dafny(v.clone()) +, +) + )) + .set_authenticate_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.authenticateSchema(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::authenticate_action::from_dafny(v), +) + )) + .set_cmm(Some( crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(dafny_value.cmm().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure/_decrypt_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure/_decrypt_structure_output.rs new file mode 100644 index 000000000..710141ecd --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure/_decrypt_structure_output.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_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureOutput::DecryptStructureOutput { + plaintextStructure: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.plaintext_structure.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::to_dafny(&v.clone()) +, +) +, + cryptoSchema: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.crypto_schema.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::to_dafny(v.clone()), +) +, + parsedHeader: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::to_dafny(&value.parsed_header.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureOutput { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureOutput::builder() + .set_plaintext_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.plaintextStructure(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::from_dafny(v.clone()) +, +) + )) + .set_crypto_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.cryptoSchema(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::from_dafny(v), +) + )) + .set_parsed_header(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::from_dafny(dafny_value.parsedHeader().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure_input.rs new file mode 100644 index 000000000..d1970fe9e --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure_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_dbEncryptionSdk_structuredEncryption::types::DecryptStructureInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureInput::DecryptStructureInput { + tableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + encryptedStructure: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encrypted_structure.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::to_dafny(&v.clone()) +, +) +, + authenticateSchema: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.authenticate_schema.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::authenticate_action::to_dafny(v.clone()), +) +, + cmm: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&value.cmm.clone().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 {} +}) +, + } +} + +#[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::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureInput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureInput::DecryptStructureInput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableName()) )) + .set_encrypted_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptedStructure(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::from_dafny(v.clone()) +, +) + )) + .set_authenticate_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.authenticateSchema(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::authenticate_action::from_dafny(v), +) + )) + .set_cmm(Some( crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(dafny_value.cmm().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure_output.rs new file mode 100644 index 000000000..309095432 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/decrypt_structure_output.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_dbEncryptionSdk_structuredEncryption::types::DecryptStructureOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureOutput::DecryptStructureOutput { + plaintextStructure: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.plaintext_structure.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::to_dafny(&v.clone()) +, +) +, + cryptoSchema: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.crypto_schema.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::to_dafny(v.clone()), +) +, + parsedHeader: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::to_dafny(&value.parsed_header.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::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureOutput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureOutput::DecryptStructureOutput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureOutput::builder() + .set_plaintext_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.plaintextStructure(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::from_dafny(v.clone()) +, +) + )) + .set_crypto_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.cryptoSchema(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::from_dafny(v), +) + )) + .set_parsed_header(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::from_dafny(dafny_value.parsedHeader().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure.rs new file mode 100644 index 000000000..258a6f18a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure.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_path_structure_input; + + pub mod _encrypt_path_structure_output; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure/_encrypt_path_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure/_encrypt_path_structure_input.rs new file mode 100644 index 000000000..d1a4e296a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure/_encrypt_path_structure_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_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureInput::EncryptPathStructureInput { + tableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + plaintextStructure: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.plaintext_structure.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::to_dafny(&e.clone()) +, +) +, + cmm: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&value.cmm.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::dbe_algorithm_suite_id::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::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureInput { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableName()) )) + .set_plaintext_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.plaintextStructure(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::from_dafny(e.clone()) +, +) + )) + .set_cmm(Some( crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(dafny_value.cmm().clone()) + )) + .set_algorithm_suite_id(match &**dafny_value.algorithmSuiteId() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::from_dafny(value) + ), + _ => 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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure/_encrypt_path_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure/_encrypt_path_structure_output.rs new file mode 100644 index 000000000..6e598e104 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure/_encrypt_path_structure_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::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureOutput::EncryptPathStructureOutput { + encryptedStructure: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_structure.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::to_dafny(&e.clone()) +, +) +, + parsedHeader: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::to_dafny(&value.parsed_header.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureOutput { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureOutput::builder() + .set_encrypted_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.encryptedStructure(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::from_dafny(e.clone()) +, +) + )) + .set_parsed_header(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::from_dafny(dafny_value.parsedHeader().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure_input.rs new file mode 100644 index 000000000..75e1f34a5 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure_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_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureInput::EncryptPathStructureInput { + tableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + plaintextStructure: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.plaintext_structure.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::to_dafny(&e.clone()) +, +) +, + cmm: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&value.cmm.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::dbe_algorithm_suite_id::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::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureInput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureInput::EncryptPathStructureInput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableName()) )) + .set_plaintext_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.plaintextStructure(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::from_dafny(e.clone()) +, +) + )) + .set_cmm(Some( crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(dafny_value.cmm().clone()) + )) + .set_algorithm_suite_id(match &**dafny_value.algorithmSuiteId() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::from_dafny(value) + ), + _ => 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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure_output.rs new file mode 100644 index 000000000..7637f2e69 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_path_structure_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::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureOutput::EncryptPathStructureOutput { + encryptedStructure: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.encrypted_structure.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::to_dafny(&e.clone()) +, +) +, + parsedHeader: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::to_dafny(&value.parsed_header.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::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureOutput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureOutput::EncryptPathStructureOutput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureOutput::builder() + .set_encrypted_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.encryptedStructure(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::from_dafny(e.clone()) +, +) + )) + .set_parsed_header(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::from_dafny(dafny_value.parsedHeader().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure.rs new file mode 100644 index 000000000..4d0368377 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure.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_structure_input; + + pub mod _encrypt_structure_output; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure/_encrypt_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure/_encrypt_structure_input.rs new file mode 100644 index 000000000..3738d42d2 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure/_encrypt_structure_input.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: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureInput::EncryptStructureInput { + tableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + plaintextStructure: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.plaintext_structure.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::to_dafny(&v.clone()) +, +) +, + cryptoSchema: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.crypto_schema.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::to_dafny(v.clone()), +) +, + cmm: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&value.cmm.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::dbe_algorithm_suite_id::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::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureInput { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableName()) )) + .set_plaintext_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.plaintextStructure(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::from_dafny(v.clone()) +, +) + )) + .set_crypto_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.cryptoSchema(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::from_dafny(v), +) + )) + .set_cmm(Some( crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(dafny_value.cmm().clone()) + )) + .set_algorithm_suite_id(match &**dafny_value.algorithmSuiteId() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::from_dafny(value) + ), + _ => 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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure/_encrypt_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure/_encrypt_structure_output.rs new file mode 100644 index 000000000..49c78c8e3 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure/_encrypt_structure_output.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_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureOutput::EncryptStructureOutput { + encryptedStructure: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encrypted_structure.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::to_dafny(&v.clone()) +, +) +, + cryptoSchema: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.crypto_schema.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::to_dafny(v.clone()), +) +, + parsedHeader: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::to_dafny(&value.parsed_header.clone().unwrap()) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureOutput { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureOutput::builder() + .set_encrypted_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptedStructure(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::from_dafny(v.clone()) +, +) + )) + .set_crypto_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.cryptoSchema(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::from_dafny(v), +) + )) + .set_parsed_header(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::from_dafny(dafny_value.parsedHeader().clone()) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure_input.rs new file mode 100644 index 000000000..d72e8d94f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure_input.rs @@ -0,0 +1,130 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify 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_dbEncryptionSdk_structuredEncryption::types::EncryptStructureInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureInput::EncryptStructureInput { + tableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + plaintextStructure: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.plaintext_structure.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::to_dafny(&v.clone()) +, +) +, + cryptoSchema: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.crypto_schema.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::to_dafny(v.clone()), +) +, + cmm: crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::to_dafny(&value.cmm.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::dbe_algorithm_suite_id::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::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureInput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureInput::EncryptStructureInput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableName()) )) + .set_plaintext_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.plaintextStructure(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::from_dafny(v.clone()) +, +) + )) + .set_crypto_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.cryptoSchema(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::from_dafny(v), +) + )) + .set_cmm(Some( crate::deps::aws_cryptography_materialProviders::conversions::cryptographic_materials_manager::from_dafny(dafny_value.cmm().clone()) + )) + .set_algorithm_suite_id(match &**dafny_value.algorithmSuiteId() { + crate::r#_Wrappers_Compile::Option::Some { value } => Some( + crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::from_dafny(value) + ), + _ => 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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure_output.rs new file mode 100644 index 000000000..e83ccec36 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/encrypt_structure_output.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_dbEncryptionSdk_structuredEncryption::types::EncryptStructureOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureOutput::EncryptStructureOutput { + encryptedStructure: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.encrypted_structure.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::to_dafny(&v.clone()) +, +) +, + cryptoSchema: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.crypto_schema.clone().unwrap(), + |k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k), + |v| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::to_dafny(v.clone()), +) +, + parsedHeader: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::to_dafny(&value.parsed_header.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::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureOutput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureOutput::EncryptStructureOutput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureOutput::builder() + .set_encrypted_structure(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.encryptedStructure(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structured_data_terminal::from_dafny(v.clone()) +, +) + )) + .set_crypto_schema(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.cryptoSchema(), + |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::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_action::from_dafny(v), +) + )) + .set_parsed_header(Some( crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::parsed_header::from_dafny(dafny_value.parsedHeader().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/error.rs new file mode 100644 index 000000000..fabb11a0a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/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::dbencryptionsdk::structuredencryption::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_dbEncryptionSdk_structuredEncryption::types::error::Error, +) -> ::std::rc::Rc { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::StructuredEncryptionException { message } => + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::StructuredEncryptionException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&message), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::AwsCryptographicPrimitivesError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::AwsCryptographyPrimitives { + AwsCryptographyPrimitives: crate::deps::aws_cryptography_primitives::conversions::error::to_dafny(error), + }, +crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::AwsCryptographicMaterialProvidersError { error } => + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: crate::deps::aws_cryptography_materialProviders::conversions::error::to_dafny(error), + }, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::CollectionOfErrors { list, message } => + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::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_dbEncryptionSdk_structuredEncryption::types::error::Error::ValidationError(inner) => + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::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_dbEncryptionSdk_structuredEncryption::types::error::Error::Opaque { obj } => + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::Opaque { + obj: ::dafny_runtime::Object(obj.0) + }, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::OpaqueWithText { obj, objMessage } => + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::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::dbencryptionsdk::structuredencryption::internaldafny::types::Error, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error { + match ::std::borrow::Borrow::borrow(&dafny_value) { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::StructuredEncryptionException { message } => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::StructuredEncryptionException { + message: ::dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(&message), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::AwsCryptographyPrimitives { AwsCryptographyPrimitives } => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::AwsCryptographicPrimitivesError { + error: crate::deps::aws_cryptography_primitives::conversions::error::from_dafny(AwsCryptographyPrimitives.clone()), + }, +crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::AwsCryptographyMaterialProviders { AwsCryptographyMaterialProviders } => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::AwsCryptographicMaterialProvidersError { + error: crate::deps::aws_cryptography_materialProviders::conversions::error::from_dafny(AwsCryptographyMaterialProviders.clone()), + }, + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::CollectionOfErrors { list, message } => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::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::dbencryptionsdk::structuredencryption::internaldafny::types::Error::Opaque { obj } => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::Opaque { + obj: obj.clone() + }, + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::Opaque { obj } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::ValidationError); + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::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_dbEncryptionSdk_structuredEncryption::types::error::Error::Opaque { + obj: obj.clone() + } + } + }, + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::OpaqueWithText { obj, objMessage } => + { + use ::std::any::Any; + if ::dafny_runtime::is_object!(obj, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::ValidationError) { + let typed = ::dafny_runtime::cast_object!(obj.clone(), crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::ValidationError); + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::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_dbEncryptionSdk_structuredEncryption::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/parsed_header.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/parsed_header.rs new file mode 100644 index 000000000..48451e1b0 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/parsed_header.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_dbEncryptionSdk_structuredEncryption::types::ParsedHeader, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ParsedHeader, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ParsedHeader, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ParsedHeader { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ParsedHeader::ParsedHeader { + algorithmSuiteId: crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::to_dafny(value.algorithm_suite_id.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()) +, +) +, + storedEncryptionContext: ::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(&value.stored_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), +) +, + 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::dbencryptionsdk::structuredencryption::internaldafny::types::ParsedHeader, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ParsedHeader { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ParsedHeader, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ParsedHeader { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ParsedHeader::ParsedHeader {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ParsedHeader::builder() + .set_algorithm_suite_id(Some( crate::deps::aws_cryptography_materialProviders::conversions::dbe_algorithm_suite_id::from_dafny(dafny_value.algorithmSuiteId()) )) + .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_stored_encryption_context(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(&dafny_value.storedEncryptionContext(), + |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_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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/path_segment.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/path_segment.rs new file mode 100644 index 000000000..263f2cb75 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/path_segment.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_dbEncryptionSdk_structuredEncryption::types::PathSegment, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::PathSegment, +> { + ::std::rc::Rc::new(match value { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::PathSegment::Member(x) => + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::PathSegment::member { + member: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structure_segment::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::dbencryptionsdk::structuredencryption::internaldafny::types::PathSegment, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::PathSegment { + match &::std::rc::Rc::unwrap_or_clone(dafny_value) { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::PathSegment::member { + member: x @ _, +} => crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::PathSegment::Member(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::structure_segment::from_dafny(x.clone()) +), + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions.rs new file mode 100644 index 000000000..d6c86b5d8 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions.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 _resolve_auth_actions_input; + + pub mod _resolve_auth_actions_output; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions/_resolve_auth_actions_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions/_resolve_auth_actions_input.rs new file mode 100644 index 000000000..703b815d7 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions/_resolve_auth_actions_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_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsInput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsInput::ResolveAuthActionsInput { + tableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + authActions: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.auth_actions.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::auth_item::to_dafny(&e.clone()) +, +) +, + headerBytes: crate::standard_library_conversions::blob_to_dafny(&value.header_bytes.unwrap()), + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsInput { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableName()) )) + .set_auth_actions(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.authActions(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::auth_item::from_dafny(e.clone()) +, +) + )) + .set_header_bytes(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.headerBytes().clone()))) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions/_resolve_auth_actions_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions/_resolve_auth_actions_output.rs new file mode 100644 index 000000000..96663ab74 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions/_resolve_auth_actions_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_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsOutput, +>{ + ::std::rc::Rc::new(crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsOutput::ResolveAuthActionsOutput { + cryptoActions: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.crypto_actions.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::to_dafny(&e.clone()) +, +) +, + }) +} + #[allow(dead_code)] +pub fn from_dafny( + dafny_value: ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsOutput { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsOutput::builder() + .set_crypto_actions(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.cryptoActions(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::from_dafny(e.clone()) +, +) + )) + .build() + .unwrap() +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions_input.rs new file mode 100644 index 000000000..3e375fbbf --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions_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_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsInput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsInput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsInput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsInput { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsInput::ResolveAuthActionsInput { + tableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(), + authActions: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.auth_actions.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::auth_item::to_dafny(&e.clone()) +, +) +, + headerBytes: crate::standard_library_conversions::blob_to_dafny(&value.header_bytes.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::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsInput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsInput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsInput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsInput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsInput::ResolveAuthActionsInput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsInput::builder() + .set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.tableName()) )) + .set_auth_actions(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.authActions(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::auth_item::from_dafny(e.clone()) +, +) + )) + .set_header_bytes(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.headerBytes().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions_output.rs new file mode 100644 index 000000000..6954bdcc9 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/resolve_auth_actions_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_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsOutput, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsOutput, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsOutput, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsOutput { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsOutput::ResolveAuthActionsOutput { + cryptoActions: ::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&value.crypto_actions.clone().unwrap(), + |e| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::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::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsOutput, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsOutput { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsOutput, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsOutput { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsOutput::ResolveAuthActionsOutput {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsOutput::builder() + .set_crypto_actions(Some( ::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(dafny_value.cryptoActions(), + |e: &::std::rc::Rc| crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::crypto_item::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structure_segment.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structure_segment.rs new file mode 100644 index 000000000..e11811090 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structure_segment.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_dbEncryptionSdk_structuredEncryption::types::StructureSegment, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructureSegment, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructureSegment { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructureSegment::StructureSegment { + key: crate::standard_library_conversions::ostring_to_dafny(&value.key) .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::dbencryptionsdk::structuredencryption::internaldafny::types::StructureSegment, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructureSegment, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructureSegment::StructureSegment {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment::builder() + .set_key(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.key()) )) + .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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structured_data_terminal.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structured_data_terminal.rs new file mode 100644 index 000000000..9cdd6d259 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structured_data_terminal.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_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredDataTerminal, +> { + ::std::rc::Rc::new(to_dafny_plain(value.clone())) +} + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredDataTerminal { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredDataTerminal::StructuredDataTerminal { + value: crate::standard_library_conversions::blob_to_dafny(&value.value.unwrap()), + typeId: crate::standard_library_conversions::blob_to_dafny(&value.type_id.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::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredDataTerminal, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal { + plain_from_dafny(&*dafny_value) +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredDataTerminal, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredDataTerminal::StructuredDataTerminal {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal::builder() + .set_value(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.value().clone()))) + .set_type_id(Some(crate::standard_library_conversions::blob_from_dafny(dafny_value.typeId().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structured_encryption_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structured_encryption_config.rs new file mode 100644 index 000000000..4f9b98429 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structured_encryption_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 _structured_encryption_config; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structured_encryption_config/_structured_encryption_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structured_encryption_config/_structured_encryption_config.rs new file mode 100644 index 000000000..c94440b88 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/conversions/structured_encryption_config/_structured_encryption_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_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig, +) -> ::std::rc::Rc< + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredEncryptionConfig, +> { + ::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::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredEncryptionConfig, + >, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig { + plain_from_dafny(&*dafny_value) +} + + +#[allow(dead_code)] +pub fn to_dafny_plain( + value: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig, +) -> crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredEncryptionConfig { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredEncryptionConfig::StructuredEncryptionConfig { + + } +} + +#[allow(dead_code)] +pub fn plain_from_dafny( + dafny_value: &crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredEncryptionConfig, +) -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig { + match dafny_value { + crate::r#software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredEncryptionConfig::StructuredEncryptionConfig {..} => + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig::builder() + + .build() + .unwrap() + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/deps.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/deps.rs new file mode 100644 index 000000000..5fbbbaa0f --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/error.rs new file mode 100644 index 000000000..4cddaa7c3 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/error/sealed_unhandled.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/error/sealed_unhandled.rs new file mode 100644 index 000000000..eae800729 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation.rs new file mode 100644 index 000000000..dded09862 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation.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. +/// Types for the `DecryptPathStructure` operation. +pub mod decrypt_path_structure; + +/// Types for the `DecryptStructure` operation. +pub mod decrypt_structure; + +/// Types for the `EncryptPathStructure` operation. +pub mod encrypt_path_structure; + +/// Types for the `EncryptStructure` operation. +pub mod encrypt_structure; + +/// Types for the `ResolveAuthActions` operation. +pub mod resolve_auth_actions; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure.rs new file mode 100644 index 000000000..1dc513b7c --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure.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 `DecryptPathStructure`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct DecryptPathStructure; +impl DecryptPathStructure { + /// Creates a new `DecryptPathStructure` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + input: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, + > { + if input.table_name.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "table_name", + "table_name was not specified but it is required when building DecryptPathStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.encrypted_structure.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_structure", + "encrypted_structure was not specified but it is required when building DecryptPathStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.cmm.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cmm", + "cmm was not specified but it is required when building DecryptPathStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} + let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::decrypt_path_structure::_decrypt_path_structure_input::to_dafny(input); + let inner_result = + ::dafny_runtime::md!(client.dafny_client.clone()).DecryptPathStructure(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::decrypt_path_structure::_decrypt_path_structure_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::_decrypt_path_structure_output::DecryptPathStructureOutput; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::_decrypt_path_structure_input::DecryptPathStructureInput; + +pub(crate) mod _decrypt_path_structure_output; + +pub(crate) mod _decrypt_path_structure_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure/_decrypt_path_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure/_decrypt_path_structure_input.rs new file mode 100644 index 000000000..58c93b147 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure/_decrypt_path_structure_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 DecryptPathStructureInput { + #[allow(missing_docs)] +pub cmm: ::std::option::Option, +#[allow(missing_docs)] +pub encrypted_structure: ::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 table_name: ::std::option::Option<::std::string::String>, +} +impl DecryptPathStructureInput { + #[allow(missing_docs)] +pub fn cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn encrypted_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_structure +} +#[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 table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} +} +impl DecryptPathStructureInput { + /// Creates a new builder-style object to manufacture [`DecryptPathStructureInput`](crate::operation::decrypt_path_structure::builders::DecryptPathStructureInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::builders::DecryptPathStructureInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::builders::DecryptPathStructureInputBuilder::default() + } +} + +/// A builder for [`DecryptPathStructureInput`](crate::operation::operation::DecryptPathStructureInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptPathStructureInputBuilder { + pub(crate) cmm: ::std::option::Option, +pub(crate) encrypted_structure: ::std::option::Option<::std::vec::Vec>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) table_name: ::std::option::Option<::std::string::String>, +} +impl DecryptPathStructureInputBuilder { + #[allow(missing_docs)] +pub fn cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.cmm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.cmm = input; + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn encrypted_structure(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_structure(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_structure +} +#[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 table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_name = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_name = input; + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} + /// Consumes the builder and constructs a [`DecryptPathStructureInput`](crate::operation::operation::DecryptPathStructureInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureInput { + cmm: self.cmm, +encrypted_structure: self.encrypted_structure, +encryption_context: self.encryption_context, +table_name: self.table_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure/_decrypt_path_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure/_decrypt_path_structure_output.rs new file mode 100644 index 000000000..1eae94eab --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure/_decrypt_path_structure_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 DecryptPathStructureOutput { + #[allow(missing_docs)] +pub parsed_header: ::std::option::Option, +#[allow(missing_docs)] +pub plaintext_structure: ::std::option::Option<::std::vec::Vec>, +} +impl DecryptPathStructureOutput { + #[allow(missing_docs)] +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +#[allow(missing_docs)] +pub fn plaintext_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.plaintext_structure +} +} +impl DecryptPathStructureOutput { + /// Creates a new builder-style object to manufacture [`DecryptPathStructureOutput`](crate::operation::decrypt_path_structure::builders::DecryptPathStructureOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::builders::DecryptPathStructureOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::builders::DecryptPathStructureOutputBuilder::default() + } +} + +/// A builder for [`DecryptPathStructureOutput`](crate::operation::operation::DecryptPathStructureOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptPathStructureOutputBuilder { + pub(crate) parsed_header: ::std::option::Option, +pub(crate) plaintext_structure: ::std::option::Option<::std::vec::Vec>, +} +impl DecryptPathStructureOutputBuilder { + #[allow(missing_docs)] +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +#[allow(missing_docs)] +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +#[allow(missing_docs)] +pub fn plaintext_structure(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.plaintext_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_structure(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.plaintext_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.plaintext_structure +} + /// Consumes the builder and constructs a [`DecryptPathStructureOutput`](crate::operation::operation::DecryptPathStructureOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureOutput { + parsed_header: self.parsed_header, +plaintext_structure: self.plaintext_structure, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure/builders.rs new file mode 100644 index 000000000..a844953bc --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_path_structure/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_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::_decrypt_path_structure_output::DecryptPathStructureOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::_decrypt_path_structure_input::DecryptPathStructureInputBuilder; + +impl DecryptPathStructureInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, + > { + let mut fluent_builder = client.decrypt_path_structure(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `DecryptPathStructure`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct DecryptPathStructureFluentBuilder { + client: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::builders::DecryptPathStructureInputBuilder, +} +impl DecryptPathStructureFluentBuilder { + /// Creates a new `DecryptPathStructure`. + pub(crate) fn new(client: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the DecryptPathStructure as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::builders::DecryptPathStructureInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::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_dbEncryptionSdk_structuredEncryption::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_path_structure::DecryptPathStructure::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.cmm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_cmm(input); + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + self.inner.get_cmm() +} +#[allow(missing_docs)] +pub fn encrypted_structure(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.inner = self.inner.encrypted_structure(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_structure(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_encrypted_structure(input); + self +} +#[allow(missing_docs)] +pub fn get_encrypted_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_encrypted_structure() +} +#[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 table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.table_name(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_table_name(input); + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_table_name() +} +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure.rs new file mode 100644 index 000000000..2d678b218 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure.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 `DecryptStructure`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct DecryptStructure; +impl DecryptStructure { + /// Creates a new `DecryptStructure` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + input: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, + > { + if input.table_name.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "table_name", + "table_name was not specified but it is required when building DecryptStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.encrypted_structure.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "encrypted_structure", + "encrypted_structure was not specified but it is required when building DecryptStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.authenticate_schema.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "authenticate_schema", + "authenticate_schema was not specified but it is required when building DecryptStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.cmm.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cmm", + "cmm was not specified but it is required when building DecryptStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} + let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::decrypt_structure::_decrypt_structure_input::to_dafny(input); + let inner_result = + ::dafny_runtime::md!(client.dafny_client.clone()).DecryptStructure(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::decrypt_structure::_decrypt_structure_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::_decrypt_structure_output::DecryptStructureOutput; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::_decrypt_structure_input::DecryptStructureInput; + +pub(crate) mod _decrypt_structure_output; + +pub(crate) mod _decrypt_structure_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure/_decrypt_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure/_decrypt_structure_input.rs new file mode 100644 index 000000000..30de08c92 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure/_decrypt_structure_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 DecryptStructureInput { + #[allow(missing_docs)] +pub authenticate_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>, +#[allow(missing_docs)] +pub cmm: ::std::option::Option, +#[allow(missing_docs)] +pub encrypted_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub table_name: ::std::option::Option<::std::string::String>, +} +impl DecryptStructureInput { + #[allow(missing_docs)] +pub fn authenticate_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>> { + &self.authenticate_schema +} +#[allow(missing_docs)] +pub fn cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn encrypted_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.encrypted_structure +} +#[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 table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} +} +impl DecryptStructureInput { + /// Creates a new builder-style object to manufacture [`DecryptStructureInput`](crate::operation::decrypt_structure::builders::DecryptStructureInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::builders::DecryptStructureInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::builders::DecryptStructureInputBuilder::default() + } +} + +/// A builder for [`DecryptStructureInput`](crate::operation::operation::DecryptStructureInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptStructureInputBuilder { + pub(crate) authenticate_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>, +pub(crate) cmm: ::std::option::Option, +pub(crate) encrypted_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) table_name: ::std::option::Option<::std::string::String>, +} +impl DecryptStructureInputBuilder { + #[allow(missing_docs)] +pub fn authenticate_schema(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>) -> Self { + self.authenticate_schema = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_authenticate_schema(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>) -> Self { + self.authenticate_schema = input; + self +} +#[allow(missing_docs)] +pub fn get_authenticate_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>> { + &self.authenticate_schema +} +#[allow(missing_docs)] +pub fn cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.cmm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.cmm = input; + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn encrypted_structure(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.encrypted_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_structure(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.encrypted_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.encrypted_structure +} +#[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 table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_name = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_name = input; + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} + /// Consumes the builder and constructs a [`DecryptStructureInput`](crate::operation::operation::DecryptStructureInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureInput { + authenticate_schema: self.authenticate_schema, +cmm: self.cmm, +encrypted_structure: self.encrypted_structure, +encryption_context: self.encryption_context, +table_name: self.table_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure/_decrypt_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure/_decrypt_structure_output.rs new file mode 100644 index 000000000..e7bf27b0e --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure/_decrypt_structure_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 DecryptStructureOutput { + #[allow(missing_docs)] +pub crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +#[allow(missing_docs)] +pub parsed_header: ::std::option::Option, +#[allow(missing_docs)] +pub plaintext_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +} +impl DecryptStructureOutput { + #[allow(missing_docs)] +pub fn crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[allow(missing_docs)] +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +#[allow(missing_docs)] +pub fn plaintext_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.plaintext_structure +} +} +impl DecryptStructureOutput { + /// Creates a new builder-style object to manufacture [`DecryptStructureOutput`](crate::operation::decrypt_structure::builders::DecryptStructureOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::builders::DecryptStructureOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::builders::DecryptStructureOutputBuilder::default() + } +} + +/// A builder for [`DecryptStructureOutput`](crate::operation::operation::DecryptStructureOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptStructureOutputBuilder { + pub(crate) crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +pub(crate) parsed_header: ::std::option::Option, +pub(crate) plaintext_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +} +impl DecryptStructureOutputBuilder { + #[allow(missing_docs)] +pub fn crypto_schema(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_crypto_schema(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = input; + self +} +#[allow(missing_docs)] +pub fn get_crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[allow(missing_docs)] +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +#[allow(missing_docs)] +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +#[allow(missing_docs)] +pub fn plaintext_structure(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.plaintext_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_structure(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.plaintext_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.plaintext_structure +} + /// Consumes the builder and constructs a [`DecryptStructureOutput`](crate::operation::operation::DecryptStructureOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureOutput { + crypto_schema: self.crypto_schema, +parsed_header: self.parsed_header, +plaintext_structure: self.plaintext_structure, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure/builders.rs new file mode 100644 index 000000000..0b9dc39be --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/decrypt_structure/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_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::_decrypt_structure_output::DecryptStructureOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::_decrypt_structure_input::DecryptStructureInputBuilder; + +impl DecryptStructureInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, + > { + let mut fluent_builder = client.decrypt_structure(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `DecryptStructure`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct DecryptStructureFluentBuilder { + client: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::builders::DecryptStructureInputBuilder, +} +impl DecryptStructureFluentBuilder { + /// Creates a new `DecryptStructure`. + pub(crate) fn new(client: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the DecryptStructure as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::builders::DecryptStructureInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::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_dbEncryptionSdk_structuredEncryption::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::decrypt_structure::DecryptStructure::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn authenticate_schema(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>) -> Self { + self.inner = self.inner.authenticate_schema(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_authenticate_schema(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>) -> Self { + self.inner = self.inner.set_authenticate_schema(input); + self +} +#[allow(missing_docs)] +pub fn get_authenticate_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>> { + self.inner.get_authenticate_schema() +} +#[allow(missing_docs)] +pub fn cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.cmm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_cmm(input); + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + self.inner.get_cmm() +} +#[allow(missing_docs)] +pub fn encrypted_structure(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.inner = self.inner.encrypted_structure(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_structure(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.inner = self.inner.set_encrypted_structure(input); + self +} +#[allow(missing_docs)] +pub fn get_encrypted_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + self.inner.get_encrypted_structure() +} +#[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 table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.table_name(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_table_name(input); + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_table_name() +} +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure.rs new file mode 100644 index 000000000..fb9e319c3 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure.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 `EncryptPathStructure`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct EncryptPathStructure; +impl EncryptPathStructure { + /// Creates a new `EncryptPathStructure` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + input: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, + > { + if input.table_name.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "table_name", + "table_name was not specified but it is required when building EncryptPathStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.plaintext_structure.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext_structure", + "plaintext_structure was not specified but it is required when building EncryptPathStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.cmm.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cmm", + "cmm was not specified but it is required when building EncryptPathStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} + let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::encrypt_path_structure::_encrypt_path_structure_input::to_dafny(input); + let inner_result = + ::dafny_runtime::md!(client.dafny_client.clone()).EncryptPathStructure(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::encrypt_path_structure::_encrypt_path_structure_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::_encrypt_path_structure_output::EncryptPathStructureOutput; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::_encrypt_path_structure_input::EncryptPathStructureInput; + +pub(crate) mod _encrypt_path_structure_output; + +pub(crate) mod _encrypt_path_structure_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure/_encrypt_path_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure/_encrypt_path_structure_input.rs new file mode 100644 index 000000000..0cad345e6 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure/_encrypt_path_structure_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 EncryptPathStructureInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub cmm: ::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_structure: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub table_name: ::std::option::Option<::std::string::String>, +} +impl EncryptPathStructureInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[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_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.plaintext_structure +} +#[allow(missing_docs)] +pub fn table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} +} +impl EncryptPathStructureInput { + /// Creates a new builder-style object to manufacture [`EncryptPathStructureInput`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::builders::EncryptPathStructureInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::builders::EncryptPathStructureInputBuilder::default() + } +} + +/// A builder for [`EncryptPathStructureInput`](crate::operation::operation::EncryptPathStructureInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptPathStructureInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) cmm: ::std::option::Option, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) plaintext_structure: ::std::option::Option<::std::vec::Vec>, +pub(crate) table_name: ::std::option::Option<::std::string::String>, +} +impl EncryptPathStructureInputBuilder { + #[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 cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.cmm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.cmm = input; + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[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_structure(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.plaintext_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_structure(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.plaintext_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.plaintext_structure +} +#[allow(missing_docs)] +pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_name = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_name = input; + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} + /// Consumes the builder and constructs a [`EncryptPathStructureInput`](crate::operation::operation::EncryptPathStructureInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureInput { + algorithm_suite_id: self.algorithm_suite_id, +cmm: self.cmm, +encryption_context: self.encryption_context, +plaintext_structure: self.plaintext_structure, +table_name: self.table_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure/_encrypt_path_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure/_encrypt_path_structure_output.rs new file mode 100644 index 000000000..50cdb8d34 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure/_encrypt_path_structure_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 EncryptPathStructureOutput { + #[allow(missing_docs)] +pub encrypted_structure: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub parsed_header: ::std::option::Option, +} +impl EncryptPathStructureOutput { + #[allow(missing_docs)] +pub fn encrypted_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_structure +} +#[allow(missing_docs)] +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +} +impl EncryptPathStructureOutput { + /// Creates a new builder-style object to manufacture [`EncryptPathStructureOutput`](crate::operation::encrypt_path_structure::builders::EncryptPathStructureOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::builders::EncryptPathStructureOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::builders::EncryptPathStructureOutputBuilder::default() + } +} + +/// A builder for [`EncryptPathStructureOutput`](crate::operation::operation::EncryptPathStructureOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptPathStructureOutputBuilder { + pub(crate) encrypted_structure: ::std::option::Option<::std::vec::Vec>, +pub(crate) parsed_header: ::std::option::Option, +} +impl EncryptPathStructureOutputBuilder { + #[allow(missing_docs)] +pub fn encrypted_structure(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_structure(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_structure +} +#[allow(missing_docs)] +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +#[allow(missing_docs)] +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} + /// Consumes the builder and constructs a [`EncryptPathStructureOutput`](crate::operation::operation::EncryptPathStructureOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureOutput { + encrypted_structure: self.encrypted_structure, +parsed_header: self.parsed_header, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure/builders.rs new file mode 100644 index 000000000..b89fea2fd --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_path_structure/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_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::_encrypt_path_structure_output::EncryptPathStructureOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::_encrypt_path_structure_input::EncryptPathStructureInputBuilder; + +impl EncryptPathStructureInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, + > { + let mut fluent_builder = client.encrypt_path_structure(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `EncryptPathStructure`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct EncryptPathStructureFluentBuilder { + client: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::builders::EncryptPathStructureInputBuilder, +} +impl EncryptPathStructureFluentBuilder { + /// Creates a new `EncryptPathStructure`. + pub(crate) fn new(client: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the EncryptPathStructure as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::builders::EncryptPathStructureInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::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_dbEncryptionSdk_structuredEncryption::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_path_structure::EncryptPathStructure::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 cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.cmm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_cmm(input); + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + self.inner.get_cmm() +} +#[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_structure(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.inner = self.inner.plaintext_structure(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_structure(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_plaintext_structure(input); + self +} +#[allow(missing_docs)] +pub fn get_plaintext_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_plaintext_structure() +} +#[allow(missing_docs)] +pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.table_name(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_table_name(input); + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_table_name() +} +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure.rs new file mode 100644 index 000000000..0fa70539d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure.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 `EncryptStructure`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct EncryptStructure; +impl EncryptStructure { + /// Creates a new `EncryptStructure` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + input: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, + > { + if input.table_name.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "table_name", + "table_name was not specified but it is required when building EncryptStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.plaintext_structure.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "plaintext_structure", + "plaintext_structure was not specified but it is required when building EncryptStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.crypto_schema.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "crypto_schema", + "crypto_schema was not specified but it is required when building EncryptStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.cmm.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "cmm", + "cmm was not specified but it is required when building EncryptStructureInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} + let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::encrypt_structure::_encrypt_structure_input::to_dafny(input); + let inner_result = + ::dafny_runtime::md!(client.dafny_client.clone()).EncryptStructure(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::encrypt_structure::_encrypt_structure_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::_encrypt_structure_output::EncryptStructureOutput; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::_encrypt_structure_input::EncryptStructureInput; + +pub(crate) mod _encrypt_structure_output; + +pub(crate) mod _encrypt_structure_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure/_encrypt_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure/_encrypt_structure_input.rs new file mode 100644 index 000000000..4168ea770 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure/_encrypt_structure_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 EncryptStructureInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub cmm: ::std::option::Option, +#[allow(missing_docs)] +pub crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub plaintext_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +#[allow(missing_docs)] +pub table_name: ::std::option::Option<::std::string::String>, +} +impl EncryptStructureInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[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_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.plaintext_structure +} +#[allow(missing_docs)] +pub fn table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} +} +impl EncryptStructureInput { + /// Creates a new builder-style object to manufacture [`EncryptStructureInput`](crate::operation::encrypt_structure::builders::EncryptStructureInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::builders::EncryptStructureInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::builders::EncryptStructureInputBuilder::default() + } +} + +/// A builder for [`EncryptStructureInput`](crate::operation::operation::EncryptStructureInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptStructureInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) cmm: ::std::option::Option, +pub(crate) crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) plaintext_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +pub(crate) table_name: ::std::option::Option<::std::string::String>, +} +impl EncryptStructureInputBuilder { + #[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 cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.cmm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.cmm = input; + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn crypto_schema(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_crypto_schema(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = input; + self +} +#[allow(missing_docs)] +pub fn get_crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[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_structure(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.plaintext_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_structure(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.plaintext_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.plaintext_structure +} +#[allow(missing_docs)] +pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_name = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_name = input; + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} + /// Consumes the builder and constructs a [`EncryptStructureInput`](crate::operation::operation::EncryptStructureInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureInput { + algorithm_suite_id: self.algorithm_suite_id, +cmm: self.cmm, +crypto_schema: self.crypto_schema, +encryption_context: self.encryption_context, +plaintext_structure: self.plaintext_structure, +table_name: self.table_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure/_encrypt_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure/_encrypt_structure_output.rs new file mode 100644 index 000000000..19654c9b5 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure/_encrypt_structure_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 EncryptStructureOutput { + #[allow(missing_docs)] +pub crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +#[allow(missing_docs)] +pub encrypted_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +#[allow(missing_docs)] +pub parsed_header: ::std::option::Option, +} +impl EncryptStructureOutput { + #[allow(missing_docs)] +pub fn crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[allow(missing_docs)] +pub fn encrypted_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.encrypted_structure +} +#[allow(missing_docs)] +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +} +impl EncryptStructureOutput { + /// Creates a new builder-style object to manufacture [`EncryptStructureOutput`](crate::operation::encrypt_structure::builders::EncryptStructureOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::builders::EncryptStructureOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::builders::EncryptStructureOutputBuilder::default() + } +} + +/// A builder for [`EncryptStructureOutput`](crate::operation::operation::EncryptStructureOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptStructureOutputBuilder { + pub(crate) crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +pub(crate) encrypted_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +pub(crate) parsed_header: ::std::option::Option, +} +impl EncryptStructureOutputBuilder { + #[allow(missing_docs)] +pub fn crypto_schema(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_crypto_schema(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = input; + self +} +#[allow(missing_docs)] +pub fn get_crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[allow(missing_docs)] +pub fn encrypted_structure(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.encrypted_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_structure(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.encrypted_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.encrypted_structure +} +#[allow(missing_docs)] +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +#[allow(missing_docs)] +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} + /// Consumes the builder and constructs a [`EncryptStructureOutput`](crate::operation::operation::EncryptStructureOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureOutput { + crypto_schema: self.crypto_schema, +encrypted_structure: self.encrypted_structure, +parsed_header: self.parsed_header, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure/builders.rs new file mode 100644 index 000000000..462a4930c --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/encrypt_structure/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_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::_encrypt_structure_output::EncryptStructureOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::_encrypt_structure_input::EncryptStructureInputBuilder; + +impl EncryptStructureInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, + > { + let mut fluent_builder = client.encrypt_structure(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `EncryptStructure`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct EncryptStructureFluentBuilder { + client: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::builders::EncryptStructureInputBuilder, +} +impl EncryptStructureFluentBuilder { + /// Creates a new `EncryptStructure`. + pub(crate) fn new(client: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the EncryptStructure as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::builders::EncryptStructureInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructureOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::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_dbEncryptionSdk_structuredEncryption::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::encrypt_structure::EncryptStructure::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 cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.inner = self.inner.cmm(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_cmm(input); + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + self.inner.get_cmm() +} +#[allow(missing_docs)] +pub fn crypto_schema(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.inner = self.inner.crypto_schema(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_crypto_schema(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.inner = self.inner.set_crypto_schema(input); + self +} +#[allow(missing_docs)] +pub fn get_crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + self.inner.get_crypto_schema() +} +#[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_structure(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.inner = self.inner.plaintext_structure(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_structure(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.inner = self.inner.set_plaintext_structure(input); + self +} +#[allow(missing_docs)] +pub fn get_plaintext_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + self.inner.get_plaintext_structure() +} +#[allow(missing_docs)] +pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.table_name(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_table_name(input); + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_table_name() +} +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions.rs new file mode 100644 index 000000000..1b6c893fd --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions.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 `ResolveAuthActions`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ResolveAuthActions; +impl ResolveAuthActions { + /// Creates a new `ResolveAuthActions` + pub fn new() -> Self { + Self + } + + pub(crate) async fn send( + client: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + input: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsInput, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, + > { + if input.table_name.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "table_name", + "table_name was not specified but it is required when building ResolveAuthActionsInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.auth_actions.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "auth_actions", + "auth_actions was not specified but it is required when building ResolveAuthActionsInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} +if input.header_bytes.is_none() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "header_bytes", + "header_bytes was not specified but it is required when building ResolveAuthActionsInput", + )).map_err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error::wrap_validation_err); +} + let inner_input = crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::resolve_auth_actions::_resolve_auth_actions_input::to_dafny(input); + let inner_result = + ::dafny_runtime::md!(client.dafny_client.clone()).ResolveAuthActions(&inner_input); + if matches!( + inner_result.as_ref(), + crate::r#_Wrappers_Compile::Result::Success { .. } + ) { + Ok( + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::resolve_auth_actions::_resolve_auth_actions_output::from_dafny(inner_result.value().clone()), + ) + } else { + Err(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::conversions::error::from_dafny( + inner_result.error().clone(), + )) + } + } +} + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::_resolve_auth_actions_output::ResolveAuthActionsOutput; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::_resolve_auth_actions_input::ResolveAuthActionsInput; + +pub(crate) mod _resolve_auth_actions_output; + +pub(crate) mod _resolve_auth_actions_input; + +/// Builders +pub mod builders; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions/_resolve_auth_actions_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions/_resolve_auth_actions_input.rs new file mode 100644 index 000000000..50966e45a --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions/_resolve_auth_actions_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 ResolveAuthActionsInput { + #[allow(missing_docs)] +pub auth_actions: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub header_bytes: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub table_name: ::std::option::Option<::std::string::String>, +} +impl ResolveAuthActionsInput { + #[allow(missing_docs)] +pub fn auth_actions(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.auth_actions +} +#[allow(missing_docs)] +pub fn header_bytes(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.header_bytes +} +#[allow(missing_docs)] +pub fn table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} +} +impl ResolveAuthActionsInput { + /// Creates a new builder-style object to manufacture [`ResolveAuthActionsInput`](crate::operation::resolve_auth_actions::builders::ResolveAuthActionsInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::builders::ResolveAuthActionsInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::builders::ResolveAuthActionsInputBuilder::default() + } +} + +/// A builder for [`ResolveAuthActionsInput`](crate::operation::operation::ResolveAuthActionsInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ResolveAuthActionsInputBuilder { + pub(crate) auth_actions: ::std::option::Option<::std::vec::Vec>, +pub(crate) header_bytes: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) table_name: ::std::option::Option<::std::string::String>, +} +impl ResolveAuthActionsInputBuilder { + #[allow(missing_docs)] +pub fn auth_actions(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.auth_actions = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_auth_actions(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.auth_actions = input; + self +} +#[allow(missing_docs)] +pub fn get_auth_actions(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.auth_actions +} +#[allow(missing_docs)] +pub fn header_bytes(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.header_bytes = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_header_bytes(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.header_bytes = input; + self +} +#[allow(missing_docs)] +pub fn get_header_bytes(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.header_bytes +} +#[allow(missing_docs)] +pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_name = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_name = input; + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} + /// Consumes the builder and constructs a [`ResolveAuthActionsInput`](crate::operation::operation::ResolveAuthActionsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsInput { + auth_actions: self.auth_actions, +header_bytes: self.header_bytes, +table_name: self.table_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions/_resolve_auth_actions_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions/_resolve_auth_actions_output.rs new file mode 100644 index 000000000..0da1d2601 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions/_resolve_auth_actions_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 ResolveAuthActionsOutput { + #[allow(missing_docs)] +pub crypto_actions: ::std::option::Option<::std::vec::Vec>, +} +impl ResolveAuthActionsOutput { + #[allow(missing_docs)] +pub fn crypto_actions(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.crypto_actions +} +} +impl ResolveAuthActionsOutput { + /// Creates a new builder-style object to manufacture [`ResolveAuthActionsOutput`](crate::operation::resolve_auth_actions::builders::ResolveAuthActionsOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::builders::ResolveAuthActionsOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::builders::ResolveAuthActionsOutputBuilder::default() + } +} + +/// A builder for [`ResolveAuthActionsOutput`](crate::operation::operation::ResolveAuthActionsOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ResolveAuthActionsOutputBuilder { + pub(crate) crypto_actions: ::std::option::Option<::std::vec::Vec>, +} +impl ResolveAuthActionsOutputBuilder { + #[allow(missing_docs)] +pub fn crypto_actions(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.crypto_actions = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_crypto_actions(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.crypto_actions = input; + self +} +#[allow(missing_docs)] +pub fn get_crypto_actions(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.crypto_actions +} + /// Consumes the builder and constructs a [`ResolveAuthActionsOutput`](crate::operation::operation::ResolveAuthActionsOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsOutput { + crypto_actions: self.crypto_actions, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions/builders.rs new file mode 100644 index 000000000..4619740a3 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/operation/resolve_auth_actions/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_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::_resolve_auth_actions_output::ResolveAuthActionsOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::_resolve_auth_actions_input::ResolveAuthActionsInputBuilder; + +impl ResolveAuthActionsInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::error::Error, + > { + let mut fluent_builder = client.resolve_auth_actions(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ResolveAuthActions`. +/// +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ResolveAuthActionsFluentBuilder { + client: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client, + pub(crate) inner: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::builders::ResolveAuthActionsInputBuilder, +} +impl ResolveAuthActionsFluentBuilder { + /// Creates a new `ResolveAuthActions`. + pub(crate) fn new(client: crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::client::Client) -> Self { + Self { + client, + inner: ::std::default::Default::default(), + } + } + /// Access the ResolveAuthActions as a reference. + pub fn as_input(&self) -> &crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::builders::ResolveAuthActionsInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActionsOutput, + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::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_dbEncryptionSdk_structuredEncryption::types::error::Error::OpaqueWithText { + obj: ::dafny_runtime::Object::from_ref(&mut e as &mut dyn ::std::any::Any), + objMessage: msg + }})?; + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::operation::resolve_auth_actions::ResolveAuthActions::send(&self.client, input).await + } + + #[allow(missing_docs)] +pub fn auth_actions(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.inner = self.inner.auth_actions(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_auth_actions(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_auth_actions(input); + self +} +#[allow(missing_docs)] +pub fn get_auth_actions(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_auth_actions() +} +#[allow(missing_docs)] +pub fn header_bytes(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.header_bytes(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_header_bytes(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.inner = self.inner.set_header_bytes(input); + self +} +#[allow(missing_docs)] +pub fn get_header_bytes(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + self.inner.get_header_bytes() +} +#[allow(missing_docs)] +pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.table_name(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_table_name(input); + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_table_name() +} +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types.rs new file mode 100644 index 000000000..2e98d3072 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types.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. +/// Types for the `StructuredEncryptionConfig` +pub mod structured_encryption_config; + +pub mod builders; + + + +mod _auth_item; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_auth_item::AuthItem; +mod _crypto_item; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_crypto_item::CryptoItem; +mod _decrypt_path_structure_input; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_decrypt_path_structure_input::DecryptPathStructureInput; +mod _decrypt_path_structure_output; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_decrypt_path_structure_output::DecryptPathStructureOutput; +mod _decrypt_structure_input; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_decrypt_structure_input::DecryptStructureInput; +mod _decrypt_structure_output; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_decrypt_structure_output::DecryptStructureOutput; +mod _encrypt_path_structure_input; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_encrypt_path_structure_input::EncryptPathStructureInput; +mod _encrypt_path_structure_output; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_encrypt_path_structure_output::EncryptPathStructureOutput; +mod _encrypt_structure_input; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_encrypt_structure_input::EncryptStructureInput; +mod _encrypt_structure_output; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_encrypt_structure_output::EncryptStructureOutput; +mod _parsed_header; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_parsed_header::ParsedHeader; +mod _resolve_auth_actions_input; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_resolve_auth_actions_input::ResolveAuthActionsInput; +mod _resolve_auth_actions_output; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_resolve_auth_actions_output::ResolveAuthActionsOutput; +mod _structured_data_terminal; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_structured_data_terminal::StructuredDataTerminal; +mod _structure_segment; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_structure_segment::StructureSegment; + +pub mod error; + +mod _authenticate_action; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_authenticate_action::AuthenticateAction; +mod _crypto_action; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_crypto_action::CryptoAction; + +mod _path_segment; +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_path_segment::PathSegment; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_auth_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_auth_item.rs new file mode 100644 index 000000000..8e0ea47b8 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_auth_item.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 AuthItem { + #[allow(missing_docs)] +pub action: ::std::option::Option, +#[allow(missing_docs)] +pub data: ::std::option::Option, +#[allow(missing_docs)] +pub key: ::std::option::Option<::std::vec::Vec>, +} +impl AuthItem { + #[allow(missing_docs)] +pub fn action(&self) -> &::std::option::Option { + &self.action +} +#[allow(missing_docs)] +pub fn data(&self) -> &::std::option::Option { + &self.data +} +#[allow(missing_docs)] +pub fn key(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.key +} +} +impl AuthItem { + /// Creates a new builder-style object to manufacture [`AuthItem`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::AuthItemBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::AuthItemBuilder::default() + } +} + +/// A builder for [`AuthItem`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct AuthItemBuilder { + pub(crate) action: ::std::option::Option, +pub(crate) data: ::std::option::Option, +pub(crate) key: ::std::option::Option<::std::vec::Vec>, +} +impl AuthItemBuilder { + #[allow(missing_docs)] +pub fn action(mut self, input: impl ::std::convert::Into) -> Self { + self.action = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_action(mut self, input: ::std::option::Option) -> Self { + self.action = input; + self +} +#[allow(missing_docs)] +pub fn get_action(&self) -> &::std::option::Option { + &self.action +} +#[allow(missing_docs)] +pub fn data(mut self, input: impl ::std::convert::Into) -> Self { + self.data = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_data(mut self, input: ::std::option::Option) -> Self { + self.data = input; + self +} +#[allow(missing_docs)] +pub fn get_data(&self) -> &::std::option::Option { + &self.data +} +#[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.key = input; + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.key +} + /// Consumes the builder and constructs a [`AuthItem`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthItem { + action: self.action, +data: self.data, +key: self.key, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_authenticate_action.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_authenticate_action.rs new file mode 100644 index 000000000..043dff587 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_authenticate_action.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 AuthenticateAction { + Sign, +DoNotSign, +} + +impl ::std::fmt::Display for AuthenticateAction { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + AuthenticateAction::Sign => write!(f, "SIGN"), +AuthenticateAction::DoNotSign => write!(f, "DO_NOT_SIGN"), + } + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_crypto_action.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_crypto_action.rs new file mode 100644 index 000000000..cbe6e9f89 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_crypto_action.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 CryptoAction { + EncryptAndSign, +SignAndIncludeInEncryptionContext, +SignOnly, +DoNothing, +} + +impl ::std::fmt::Display for CryptoAction { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + CryptoAction::EncryptAndSign => write!(f, "ENCRYPT_AND_SIGN"), +CryptoAction::SignAndIncludeInEncryptionContext => write!(f, "SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT"), +CryptoAction::SignOnly => write!(f, "SIGN_ONLY"), +CryptoAction::DoNothing => write!(f, "DO_NOTHING"), + } + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_crypto_item.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_crypto_item.rs new file mode 100644 index 000000000..1319fd7ba --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_crypto_item.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 CryptoItem { + #[allow(missing_docs)] +pub action: ::std::option::Option, +#[allow(missing_docs)] +pub data: ::std::option::Option, +#[allow(missing_docs)] +pub key: ::std::option::Option<::std::vec::Vec>, +} +impl CryptoItem { + #[allow(missing_docs)] +pub fn action(&self) -> &::std::option::Option { + &self.action +} +#[allow(missing_docs)] +pub fn data(&self) -> &::std::option::Option { + &self.data +} +#[allow(missing_docs)] +pub fn key(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.key +} +} +impl CryptoItem { + /// Creates a new builder-style object to manufacture [`CryptoItem`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::CryptoItemBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::CryptoItemBuilder::default() + } +} + +/// A builder for [`CryptoItem`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct CryptoItemBuilder { + pub(crate) action: ::std::option::Option, +pub(crate) data: ::std::option::Option, +pub(crate) key: ::std::option::Option<::std::vec::Vec>, +} +impl CryptoItemBuilder { + #[allow(missing_docs)] +pub fn action(mut self, input: impl ::std::convert::Into) -> Self { + self.action = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_action(mut self, input: ::std::option::Option) -> Self { + self.action = input; + self +} +#[allow(missing_docs)] +pub fn get_action(&self) -> &::std::option::Option { + &self.action +} +#[allow(missing_docs)] +pub fn data(mut self, input: impl ::std::convert::Into) -> Self { + self.data = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_data(mut self, input: ::std::option::Option) -> Self { + self.data = input; + self +} +#[allow(missing_docs)] +pub fn get_data(&self) -> &::std::option::Option { + &self.data +} +#[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.key = input; + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.key +} + /// Consumes the builder and constructs a [`CryptoItem`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoItem { + action: self.action, +data: self.data, +key: self.key, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_path_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_path_structure_input.rs new file mode 100644 index 000000000..0ccd7862d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_path_structure_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 DecryptPathStructureInput { + #[allow(missing_docs)] +pub cmm: ::std::option::Option, +#[allow(missing_docs)] +pub encrypted_structure: ::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 table_name: ::std::option::Option<::std::string::String>, +} +impl DecryptPathStructureInput { + #[allow(missing_docs)] +pub fn cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn encrypted_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_structure +} +#[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 table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} +} +impl DecryptPathStructureInput { + /// Creates a new builder-style object to manufacture [`DecryptPathStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::DecryptPathStructureInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::DecryptPathStructureInputBuilder::default() + } +} + +/// A builder for [`DecryptPathStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptPathStructureInputBuilder { + pub(crate) cmm: ::std::option::Option, +pub(crate) encrypted_structure: ::std::option::Option<::std::vec::Vec>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) table_name: ::std::option::Option<::std::string::String>, +} +impl DecryptPathStructureInputBuilder { + #[allow(missing_docs)] +pub fn cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.cmm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.cmm = input; + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn encrypted_structure(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_structure(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_structure +} +#[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 table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_name = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_name = input; + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} + /// Consumes the builder and constructs a [`DecryptPathStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureInput { + cmm: self.cmm, +encrypted_structure: self.encrypted_structure, +encryption_context: self.encryption_context, +table_name: self.table_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_path_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_path_structure_output.rs new file mode 100644 index 000000000..449485746 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_path_structure_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 DecryptPathStructureOutput { + #[allow(missing_docs)] +pub parsed_header: ::std::option::Option, +#[allow(missing_docs)] +pub plaintext_structure: ::std::option::Option<::std::vec::Vec>, +} +impl DecryptPathStructureOutput { + #[allow(missing_docs)] +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +#[allow(missing_docs)] +pub fn plaintext_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.plaintext_structure +} +} +impl DecryptPathStructureOutput { + /// Creates a new builder-style object to manufacture [`DecryptPathStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::DecryptPathStructureOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::DecryptPathStructureOutputBuilder::default() + } +} + +/// A builder for [`DecryptPathStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptPathStructureOutputBuilder { + pub(crate) parsed_header: ::std::option::Option, +pub(crate) plaintext_structure: ::std::option::Option<::std::vec::Vec>, +} +impl DecryptPathStructureOutputBuilder { + #[allow(missing_docs)] +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +#[allow(missing_docs)] +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +#[allow(missing_docs)] +pub fn plaintext_structure(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.plaintext_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_structure(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.plaintext_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.plaintext_structure +} + /// Consumes the builder and constructs a [`DecryptPathStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptPathStructureOutput { + parsed_header: self.parsed_header, +plaintext_structure: self.plaintext_structure, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_structure_input.rs new file mode 100644 index 000000000..cbc8731a4 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_structure_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 DecryptStructureInput { + #[allow(missing_docs)] +pub authenticate_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>, +#[allow(missing_docs)] +pub cmm: ::std::option::Option, +#[allow(missing_docs)] +pub encrypted_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub table_name: ::std::option::Option<::std::string::String>, +} +impl DecryptStructureInput { + #[allow(missing_docs)] +pub fn authenticate_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>> { + &self.authenticate_schema +} +#[allow(missing_docs)] +pub fn cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn encrypted_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.encrypted_structure +} +#[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 table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} +} +impl DecryptStructureInput { + /// Creates a new builder-style object to manufacture [`DecryptStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::DecryptStructureInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::DecryptStructureInputBuilder::default() + } +} + +/// A builder for [`DecryptStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptStructureInputBuilder { + pub(crate) authenticate_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>, +pub(crate) cmm: ::std::option::Option, +pub(crate) encrypted_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) table_name: ::std::option::Option<::std::string::String>, +} +impl DecryptStructureInputBuilder { + #[allow(missing_docs)] +pub fn authenticate_schema(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>) -> Self { + self.authenticate_schema = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_authenticate_schema(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>>) -> Self { + self.authenticate_schema = input; + self +} +#[allow(missing_docs)] +pub fn get_authenticate_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::AuthenticateAction>> { + &self.authenticate_schema +} +#[allow(missing_docs)] +pub fn cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.cmm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.cmm = input; + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn encrypted_structure(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.encrypted_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_structure(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.encrypted_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.encrypted_structure +} +#[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 table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_name = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_name = input; + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} + /// Consumes the builder and constructs a [`DecryptStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureInput { + authenticate_schema: self.authenticate_schema, +cmm: self.cmm, +encrypted_structure: self.encrypted_structure, +encryption_context: self.encryption_context, +table_name: self.table_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_structure_output.rs new file mode 100644 index 000000000..c2a72ee5d --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_decrypt_structure_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 DecryptStructureOutput { + #[allow(missing_docs)] +pub crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +#[allow(missing_docs)] +pub parsed_header: ::std::option::Option, +#[allow(missing_docs)] +pub plaintext_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +} +impl DecryptStructureOutput { + #[allow(missing_docs)] +pub fn crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[allow(missing_docs)] +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +#[allow(missing_docs)] +pub fn plaintext_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.plaintext_structure +} +} +impl DecryptStructureOutput { + /// Creates a new builder-style object to manufacture [`DecryptStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::DecryptStructureOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::DecryptStructureOutputBuilder::default() + } +} + +/// A builder for [`DecryptStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct DecryptStructureOutputBuilder { + pub(crate) crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +pub(crate) parsed_header: ::std::option::Option, +pub(crate) plaintext_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +} +impl DecryptStructureOutputBuilder { + #[allow(missing_docs)] +pub fn crypto_schema(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_crypto_schema(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = input; + self +} +#[allow(missing_docs)] +pub fn get_crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[allow(missing_docs)] +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +#[allow(missing_docs)] +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +#[allow(missing_docs)] +pub fn plaintext_structure(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.plaintext_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_structure(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.plaintext_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.plaintext_structure +} + /// Consumes the builder and constructs a [`DecryptStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::DecryptStructureOutput { + crypto_schema: self.crypto_schema, +parsed_header: self.parsed_header, +plaintext_structure: self.plaintext_structure, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_path_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_path_structure_input.rs new file mode 100644 index 000000000..e501fa373 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_path_structure_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 EncryptPathStructureInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub cmm: ::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_structure: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub table_name: ::std::option::Option<::std::string::String>, +} +impl EncryptPathStructureInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[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_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.plaintext_structure +} +#[allow(missing_docs)] +pub fn table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} +} +impl EncryptPathStructureInput { + /// Creates a new builder-style object to manufacture [`EncryptPathStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::EncryptPathStructureInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::EncryptPathStructureInputBuilder::default() + } +} + +/// A builder for [`EncryptPathStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptPathStructureInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) cmm: ::std::option::Option, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) plaintext_structure: ::std::option::Option<::std::vec::Vec>, +pub(crate) table_name: ::std::option::Option<::std::string::String>, +} +impl EncryptPathStructureInputBuilder { + #[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 cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.cmm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.cmm = input; + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[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_structure(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.plaintext_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_structure(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.plaintext_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.plaintext_structure +} +#[allow(missing_docs)] +pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_name = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_name = input; + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} + /// Consumes the builder and constructs a [`EncryptPathStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureInput { + algorithm_suite_id: self.algorithm_suite_id, +cmm: self.cmm, +encryption_context: self.encryption_context, +plaintext_structure: self.plaintext_structure, +table_name: self.table_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_path_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_path_structure_output.rs new file mode 100644 index 000000000..29d7223d3 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_path_structure_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 EncryptPathStructureOutput { + #[allow(missing_docs)] +pub encrypted_structure: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub parsed_header: ::std::option::Option, +} +impl EncryptPathStructureOutput { + #[allow(missing_docs)] +pub fn encrypted_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_structure +} +#[allow(missing_docs)] +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +} +impl EncryptPathStructureOutput { + /// Creates a new builder-style object to manufacture [`EncryptPathStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::EncryptPathStructureOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::EncryptPathStructureOutputBuilder::default() + } +} + +/// A builder for [`EncryptPathStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptPathStructureOutputBuilder { + pub(crate) encrypted_structure: ::std::option::Option<::std::vec::Vec>, +pub(crate) parsed_header: ::std::option::Option, +} +impl EncryptPathStructureOutputBuilder { + #[allow(missing_docs)] +pub fn encrypted_structure(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.encrypted_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_structure(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.encrypted_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_structure(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.encrypted_structure +} +#[allow(missing_docs)] +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +#[allow(missing_docs)] +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} + /// Consumes the builder and constructs a [`EncryptPathStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptPathStructureOutput { + encrypted_structure: self.encrypted_structure, +parsed_header: self.parsed_header, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_structure_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_structure_input.rs new file mode 100644 index 000000000..1c786ad69 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_structure_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 EncryptStructureInput { + #[allow(missing_docs)] +pub algorithm_suite_id: ::std::option::Option, +#[allow(missing_docs)] +pub cmm: ::std::option::Option, +#[allow(missing_docs)] +pub crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +#[allow(missing_docs)] +pub encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +#[allow(missing_docs)] +pub plaintext_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +#[allow(missing_docs)] +pub table_name: ::std::option::Option<::std::string::String>, +} +impl EncryptStructureInput { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[allow(missing_docs)] +pub fn cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[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_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.plaintext_structure +} +#[allow(missing_docs)] +pub fn table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} +} +impl EncryptStructureInput { + /// Creates a new builder-style object to manufacture [`EncryptStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::EncryptStructureInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::EncryptStructureInputBuilder::default() + } +} + +/// A builder for [`EncryptStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptStructureInputBuilder { + pub(crate) algorithm_suite_id: ::std::option::Option, +pub(crate) cmm: ::std::option::Option, +pub(crate) crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +pub(crate) encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +pub(crate) plaintext_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +pub(crate) table_name: ::std::option::Option<::std::string::String>, +} +impl EncryptStructureInputBuilder { + #[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 cmm(mut self, input: impl ::std::convert::Into) -> Self { + self.cmm = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_cmm(mut self, input: ::std::option::Option) -> Self { + self.cmm = input; + self +} +#[allow(missing_docs)] +pub fn get_cmm(&self) -> &::std::option::Option { + &self.cmm +} +#[allow(missing_docs)] +pub fn crypto_schema(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_crypto_schema(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = input; + self +} +#[allow(missing_docs)] +pub fn get_crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[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_structure(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.plaintext_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_plaintext_structure(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.plaintext_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_plaintext_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.plaintext_structure +} +#[allow(missing_docs)] +pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_name = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_name = input; + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} + /// Consumes the builder and constructs a [`EncryptStructureInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureInput { + algorithm_suite_id: self.algorithm_suite_id, +cmm: self.cmm, +crypto_schema: self.crypto_schema, +encryption_context: self.encryption_context, +plaintext_structure: self.plaintext_structure, +table_name: self.table_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_structure_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_structure_output.rs new file mode 100644 index 000000000..c125bb592 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_encrypt_structure_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 EncryptStructureOutput { + #[allow(missing_docs)] +pub crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +#[allow(missing_docs)] +pub encrypted_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +#[allow(missing_docs)] +pub parsed_header: ::std::option::Option, +} +impl EncryptStructureOutput { + #[allow(missing_docs)] +pub fn crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[allow(missing_docs)] +pub fn encrypted_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.encrypted_structure +} +#[allow(missing_docs)] +pub fn parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} +} +impl EncryptStructureOutput { + /// Creates a new builder-style object to manufacture [`EncryptStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::EncryptStructureOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::EncryptStructureOutputBuilder::default() + } +} + +/// A builder for [`EncryptStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct EncryptStructureOutputBuilder { + pub(crate) crypto_schema: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>, +pub(crate) encrypted_structure: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>, +pub(crate) parsed_header: ::std::option::Option, +} +impl EncryptStructureOutputBuilder { + #[allow(missing_docs)] +pub fn crypto_schema(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_crypto_schema(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>>) -> Self { + self.crypto_schema = input; + self +} +#[allow(missing_docs)] +pub fn get_crypto_schema(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction>> { + &self.crypto_schema +} +#[allow(missing_docs)] +pub fn encrypted_structure(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.encrypted_structure = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_encrypted_structure(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>>) -> Self { + self.encrypted_structure = input; + self +} +#[allow(missing_docs)] +pub fn get_encrypted_structure(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal>> { + &self.encrypted_structure +} +#[allow(missing_docs)] +pub fn parsed_header(mut self, input: impl ::std::convert::Into) -> Self { + self.parsed_header = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_parsed_header(mut self, input: ::std::option::Option) -> Self { + self.parsed_header = input; + self +} +#[allow(missing_docs)] +pub fn get_parsed_header(&self) -> &::std::option::Option { + &self.parsed_header +} + /// Consumes the builder and constructs a [`EncryptStructureOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::EncryptStructureOutput { + crypto_schema: self.crypto_schema, +encrypted_structure: self.encrypted_structure, +parsed_header: self.parsed_header, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_parsed_header.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_parsed_header.rs new file mode 100644 index 000000000..54ef00d8c --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_parsed_header.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 ParsedHeader { + #[allow(missing_docs)] +pub algorithm_suite_id: ::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 stored_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl ParsedHeader { + #[allow(missing_docs)] +pub fn algorithm_suite_id(&self) -> &::std::option::Option { + &self.algorithm_suite_id +} +#[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 stored_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.stored_encryption_context +} +} +impl ParsedHeader { + /// Creates a new builder-style object to manufacture [`ParsedHeader`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ParsedHeader). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::ParsedHeaderBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::ParsedHeaderBuilder::default() + } +} + +/// A builder for [`ParsedHeader`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ParsedHeader). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ParsedHeaderBuilder { + pub(crate) algorithm_suite_id: ::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) stored_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, +} +impl ParsedHeaderBuilder { + #[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 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 stored_encryption_context(mut self, input: impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.stored_encryption_context = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_stored_encryption_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self { + self.stored_encryption_context = input; + self +} +#[allow(missing_docs)] +pub fn get_stored_encryption_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.stored_encryption_context +} + /// Consumes the builder and constructs a [`ParsedHeader`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ParsedHeader). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ParsedHeader, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ParsedHeader { + algorithm_suite_id: self.algorithm_suite_id, +encrypted_data_keys: self.encrypted_data_keys, +encryption_context: self.encryption_context, +stored_encryption_context: self.stored_encryption_context, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_path_segment.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_path_segment.rs new file mode 100644 index 000000000..7fe557028 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_path_segment.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 PathSegment { + #[allow(missing_docs)] +Member(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment), + /// 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 PathSegment { + /// Tries to convert the enum instance into [`Member`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::PathSegment::Member), extracting the inner [`crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment). +/// Returns `Err(&Self)` if it can't be converted. +pub fn as_member(&self) -> ::std::result::Result<&crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment, &Self> { + if let crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::PathSegment::Member(val) = &self { + ::std::result::Result::Ok(val) + } else { + ::std::result::Result::Err(self) + } +} + /// Returns true if this is a [`Member`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::PathSegment::Member). +pub fn is_member(&self) -> ::std::primitive::bool { + self.as_member().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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_resolve_auth_actions_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_resolve_auth_actions_input.rs new file mode 100644 index 000000000..dc5ce1ea2 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_resolve_auth_actions_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 ResolveAuthActionsInput { + #[allow(missing_docs)] +pub auth_actions: ::std::option::Option<::std::vec::Vec>, +#[allow(missing_docs)] +pub header_bytes: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub table_name: ::std::option::Option<::std::string::String>, +} +impl ResolveAuthActionsInput { + #[allow(missing_docs)] +pub fn auth_actions(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.auth_actions +} +#[allow(missing_docs)] +pub fn header_bytes(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.header_bytes +} +#[allow(missing_docs)] +pub fn table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} +} +impl ResolveAuthActionsInput { + /// Creates a new builder-style object to manufacture [`ResolveAuthActionsInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsInput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::ResolveAuthActionsInputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::ResolveAuthActionsInputBuilder::default() + } +} + +/// A builder for [`ResolveAuthActionsInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsInput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ResolveAuthActionsInputBuilder { + pub(crate) auth_actions: ::std::option::Option<::std::vec::Vec>, +pub(crate) header_bytes: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) table_name: ::std::option::Option<::std::string::String>, +} +impl ResolveAuthActionsInputBuilder { + #[allow(missing_docs)] +pub fn auth_actions(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.auth_actions = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_auth_actions(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.auth_actions = input; + self +} +#[allow(missing_docs)] +pub fn get_auth_actions(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.auth_actions +} +#[allow(missing_docs)] +pub fn header_bytes(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.header_bytes = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_header_bytes(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.header_bytes = input; + self +} +#[allow(missing_docs)] +pub fn get_header_bytes(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.header_bytes +} +#[allow(missing_docs)] +pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.table_name = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.table_name = input; + self +} +#[allow(missing_docs)] +pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> { + &self.table_name +} + /// Consumes the builder and constructs a [`ResolveAuthActionsInput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsInput { + auth_actions: self.auth_actions, +header_bytes: self.header_bytes, +table_name: self.table_name, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_resolve_auth_actions_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_resolve_auth_actions_output.rs new file mode 100644 index 000000000..742c13a79 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_resolve_auth_actions_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 ResolveAuthActionsOutput { + #[allow(missing_docs)] +pub crypto_actions: ::std::option::Option<::std::vec::Vec>, +} +impl ResolveAuthActionsOutput { + #[allow(missing_docs)] +pub fn crypto_actions(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.crypto_actions +} +} +impl ResolveAuthActionsOutput { + /// Creates a new builder-style object to manufacture [`ResolveAuthActionsOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsOutput). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::ResolveAuthActionsOutputBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::ResolveAuthActionsOutputBuilder::default() + } +} + +/// A builder for [`ResolveAuthActionsOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsOutput). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct ResolveAuthActionsOutputBuilder { + pub(crate) crypto_actions: ::std::option::Option<::std::vec::Vec>, +} +impl ResolveAuthActionsOutputBuilder { + #[allow(missing_docs)] +pub fn crypto_actions(mut self, input: impl ::std::convert::Into<::std::vec::Vec>) -> Self { + self.crypto_actions = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_crypto_actions(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.crypto_actions = input; + self +} +#[allow(missing_docs)] +pub fn get_crypto_actions(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.crypto_actions +} + /// Consumes the builder and constructs a [`ResolveAuthActionsOutput`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsOutput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::ResolveAuthActionsOutput { + crypto_actions: self.crypto_actions, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_structure_segment.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_structure_segment.rs new file mode 100644 index 000000000..9a8f8f7e2 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_structure_segment.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 StructureSegment { + #[allow(missing_docs)] +pub key: ::std::option::Option<::std::string::String>, +} +impl StructureSegment { + #[allow(missing_docs)] +pub fn key(&self) -> &::std::option::Option<::std::string::String> { + &self.key +} +} +impl StructureSegment { + /// Creates a new builder-style object to manufacture [`StructureSegment`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::StructureSegmentBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::StructureSegmentBuilder::default() + } +} + +/// A builder for [`StructureSegment`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct StructureSegmentBuilder { + pub(crate) key: ::std::option::Option<::std::string::String>, +} +impl StructureSegmentBuilder { + #[allow(missing_docs)] +pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.key = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.key = input; + self +} +#[allow(missing_docs)] +pub fn get_key(&self) -> &::std::option::Option<::std::string::String> { + &self.key +} + /// Consumes the builder and constructs a [`StructureSegment`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructureSegment { + key: self.key, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_structured_data_terminal.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_structured_data_terminal.rs new file mode 100644 index 000000000..532431504 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/_structured_data_terminal.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 StructuredDataTerminal { + #[allow(missing_docs)] +pub type_id: ::std::option::Option<::aws_smithy_types::Blob>, +#[allow(missing_docs)] +pub value: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl StructuredDataTerminal { + #[allow(missing_docs)] +pub fn type_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.type_id +} +#[allow(missing_docs)] +pub fn value(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.value +} +} +impl StructuredDataTerminal { + /// Creates a new builder-style object to manufacture [`StructuredDataTerminal`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::StructuredDataTerminalBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::builders::StructuredDataTerminalBuilder::default() + } +} + +/// A builder for [`StructuredDataTerminal`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct StructuredDataTerminalBuilder { + pub(crate) type_id: ::std::option::Option<::aws_smithy_types::Blob>, +pub(crate) value: ::std::option::Option<::aws_smithy_types::Blob>, +} +impl StructuredDataTerminalBuilder { + #[allow(missing_docs)] +pub fn type_id(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.type_id = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_type_id(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.type_id = input; + self +} +#[allow(missing_docs)] +pub fn get_type_id(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.type_id +} +#[allow(missing_docs)] +pub fn value(mut self, input: impl ::std::convert::Into<::aws_smithy_types::Blob>) -> Self { + self.value = ::std::option::Option::Some(input.into()); + self +} +#[allow(missing_docs)] +pub fn set_value(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self { + self.value = input; + self +} +#[allow(missing_docs)] +pub fn get_value(&self) -> &::std::option::Option<::aws_smithy_types::Blob> { + &self.value +} + /// Consumes the builder and constructs a [`StructuredDataTerminal`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredDataTerminal { + type_id: self.type_id, +value: self.value, + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/builders.rs new file mode 100644 index 000000000..37960cc06 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/builders.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. +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_auth_item::AuthItemBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_crypto_item::CryptoItemBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_decrypt_path_structure_input::DecryptPathStructureInputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_decrypt_path_structure_output::DecryptPathStructureOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_decrypt_structure_input::DecryptStructureInputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_decrypt_structure_output::DecryptStructureOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_encrypt_path_structure_input::EncryptPathStructureInputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_encrypt_path_structure_output::EncryptPathStructureOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_encrypt_structure_input::EncryptStructureInputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_encrypt_structure_output::EncryptStructureOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_parsed_header::ParsedHeaderBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_resolve_auth_actions_input::ResolveAuthActionsInputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_resolve_auth_actions_output::ResolveAuthActionsOutputBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_structured_data_terminal::StructuredDataTerminalBuilder; + +pub use crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::_structure_segment::StructureSegmentBuilder; diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/error.rs new file mode 100644 index 000000000..61ee40f5c --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/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)] +StructuredEncryptionException { + message: ::std::string::String, +}, + +AwsCryptographicPrimitivesError { + error: crate::deps::aws_cryptography_primitives::types::error::Error, +}, + +AwsCryptographicMaterialProvidersError { + error: crate::deps::aws_cryptography_materialProviders::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/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/structured_encryption_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/structured_encryption_config.rs new file mode 100644 index 000000000..ce76d2727 --- /dev/null +++ b/releases/rust/db_esdk/src/deps/aws_cryptography_dbEncryptionSdk_structuredEncryption/types/structured_encryption_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 StructuredEncryptionConfig { + +} +impl StructuredEncryptionConfig { + +} +impl StructuredEncryptionConfig { + /// Creates a new builder-style object to manufacture [`StructuredEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredEncryptionConfig). + pub fn builder() -> crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfigBuilder { + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfigBuilder::default() + } +} + +/// A builder for [`StructuredEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredEncryptionConfig). +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, +)] +pub struct StructuredEncryptionConfigBuilder { + +} +impl StructuredEncryptionConfigBuilder { + + /// Consumes the builder and constructs a [`StructuredEncryptionConfig`](crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::StructuredEncryptionConfig). + pub fn build( + self, + ) -> ::std::result::Result< + crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::deps::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::structured_encryption_config::StructuredEncryptionConfig { + + }) + } +} diff --git a/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore.rs new file mode 100644 index 000000000..e118e5215 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client.rs new file mode 100644 index 000000000..5dfefe95f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/client/create_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client/create_key.rs new file mode 100644 index 000000000..9f1a13e58 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/client/create_key_store.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client/create_key_store.rs new file mode 100644 index 000000000..25b8da064 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/client/get_active_branch_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client/get_active_branch_key.rs new file mode 100644 index 000000000..359a8f92b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/client/get_beacon_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client/get_beacon_key.rs new file mode 100644 index 000000000..a9145fb62 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/client/get_branch_key_version.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client/get_branch_key_version.rs new file mode 100644 index 000000000..4c3cfc4c5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/client/get_key_store_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client/get_key_store_info.rs new file mode 100644 index 000000000..9129b90c8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/client/version_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/client/version_key.rs new file mode 100644 index 000000000..bec7b50d7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions.rs new file mode 100644 index 000000000..7d77243e6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/beacon_key_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/beacon_key_materials.rs new file mode 100644 index 000000000..f6bb6ffc0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/branch_key_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/branch_key_materials.rs new file mode 100644 index 000000000..ad6db44e0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/client.rs new file mode 100644 index 000000000..73cbbd4bc --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key.rs new file mode 100644 index 000000000..2f6e427c4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key/_create_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key/_create_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_input.rs new file mode 100644 index 000000000..4f8de1890 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_output.rs new file mode 100644 index 000000000..73ec9b854 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store.rs new file mode 100644 index 000000000..4ecd3d73d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store/_create_key_store_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store/_create_key_store_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_input.rs new file mode 100644 index 000000000..5df471ed3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/create_key_store_output.rs new file mode 100644 index 000000000..7d333e0e7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/discovery.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/discovery.rs new file mode 100644 index 000000000..28969982b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/error.rs new file mode 100644 index 000000000..5d1615cb3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key.rs new file mode 100644 index 000000000..b2ba42651 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key/_get_active_branch_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key/_get_active_branch_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_active_branch_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key.rs new file mode 100644 index 000000000..606fcb270 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key/_get_beacon_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key/_get_beacon_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_input.rs new file mode 100644 index 000000000..400d886a3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_beacon_key_output.rs new file mode 100644 index 000000000..30aceeffe --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version.rs new file mode 100644 index 000000000..57007fdb0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version/_get_branch_key_version_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version/_get_branch_key_version_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_branch_key_version_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info.rs new file mode 100644 index 000000000..8f9769903 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info/_get_key_store_info_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/get_key_store_info_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/key_store_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/key_store_config.rs new file mode 100644 index 000000000..dd3a3b4ce --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/key_store_config/_key_store_config.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/kms_configuration.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/kms_configuration.rs new file mode 100644 index 000000000..b7f30c699 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/mr_discovery.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/mr_discovery.rs new file mode 100644 index 000000000..b10d3e6fb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/version_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/version_key.rs new file mode 100644 index 000000000..409d38974 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/version_key/_version_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/version_key/_version_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_input.rs new file mode 100644 index 000000000..ba653b0ea --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/conversions/version_key_output.rs new file mode 100644 index 000000000..4595d75e7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/deps.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/deps.rs new file mode 100644 index 000000000..5fbbbaa0f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/error.rs new file mode 100644 index 000000000..4cddaa7c3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/error/sealed_unhandled.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/error/sealed_unhandled.rs new file mode 100644 index 000000000..eae800729 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation.rs new file mode 100644 index 000000000..47f0766b8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key.rs new file mode 100644 index 000000000..7534e597c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key/_create_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key/_create_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key/builders.rs new file mode 100644 index 000000000..d20f83f93 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store.rs new file mode 100644 index 000000000..53149e557 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/_create_key_store_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/_create_key_store_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/create_key_store/builders.rs new file mode 100644 index 000000000..413090db2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key.rs new file mode 100644 index 000000000..6eef1ad6d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/_get_active_branch_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/_get_active_branch_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_active_branch_key/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key.rs new file mode 100644 index 000000000..9ff33667a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/_get_beacon_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/_get_beacon_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_beacon_key/builders.rs new file mode 100644 index 000000000..5d49bcb77 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version.rs new file mode 100644 index 000000000..580394eb1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/_get_branch_key_version_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/_get_branch_key_version_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_branch_key_version/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info.rs new file mode 100644 index 000000000..1dcb871ca --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/_get_key_store_info_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/_unit.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/get_key_store_info/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/version_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/version_key.rs new file mode 100644 index 000000000..3673ebd82 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/version_key/_version_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/version_key/_version_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/operation/version_key/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/operation/version_key/builders.rs new file mode 100644 index 000000000..1ea008c78 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types.rs new file mode 100644 index 000000000..dba654686 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_beacon_key_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_beacon_key_materials.rs new file mode 100644 index 000000000..fa84ab695 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_branch_key_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_branch_key_materials.rs new file mode 100644 index 000000000..ddc026275 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_create_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_create_key_input.rs new file mode 100644 index 000000000..42b6f6120 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_create_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_create_key_output.rs new file mode 100644 index 000000000..13dc72671 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_input.rs new file mode 100644 index 000000000..4ead13969 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_create_key_store_output.rs new file mode 100644 index 000000000..9531e7de0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_discovery.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_discovery.rs new file mode 100644 index 000000000..ead61262a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_get_active_branch_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_get_active_branch_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_input.rs new file mode 100644 index 000000000..07c09e254 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_get_beacon_key_output.rs new file mode 100644 index 000000000..a6e5b641e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_get_branch_key_version_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_get_branch_key_version_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_get_key_store_info_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_kms_configuration.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_kms_configuration.rs new file mode 100644 index 000000000..eb91186fd --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_mr_discovery.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_mr_discovery.rs new file mode 100644 index 000000000..8182d8aca --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_version_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_version_key_input.rs new file mode 100644 index 000000000..03b736bb2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/_version_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/_version_key_output.rs new file mode 100644 index 000000000..f49019b46 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/builders.rs new file mode 100644 index 000000000..94a8030a8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/error.rs new file mode 100644 index 000000000..b01c396f6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_keyStore/types/key_store_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_keyStore/types/key_store_config.rs new file mode 100644 index 000000000..ab4058505 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders.rs new file mode 100644 index 000000000..e118e5215 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client.rs new file mode 100644 index 000000000..4d1510900 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_discovery_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_discovery_multi_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_ecdh_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_hierarchical_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_keyring.rs new file mode 100644 index 000000000..53dbd176e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_discovery_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_discovery_multi_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_mrk_multi_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_multi_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_aws_kms_rsa_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_cryptographic_materials_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_cryptographic_materials_cache.rs new file mode 100644 index 000000000..f0748e205 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_default_client_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_default_client_supplier.rs new file mode 100644 index 000000000..b6e602c59 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_default_cryptographic_materials_manager.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_multi_keyring.rs new file mode 100644 index 000000000..c53e0cedc --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_aes_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_aes_keyring.rs new file mode 100644 index 000000000..7c5edc157 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_ecdh_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_ecdh_keyring.rs new file mode 100644 index 000000000..3896843d7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_rsa_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_raw_rsa_keyring.rs new file mode 100644 index 000000000..cae547348 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/create_required_encryption_context_cmm.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/decryption_materials_with_plaintext_data_key.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/encryption_materials_has_plaintext_data_key.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/get_algorithm_suite_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/get_algorithm_suite_info.rs new file mode 100644 index 000000000..3201df319 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/initialize_decryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/initialize_decryption_materials.rs new file mode 100644 index 000000000..bb0a43582 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/initialize_encryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/initialize_encryption_materials.rs new file mode 100644 index 000000000..8ba955b0f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/valid_algorithm_suite_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/valid_algorithm_suite_info.rs new file mode 100644 index 000000000..2087d6bad --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/valid_decryption_materials_transition.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/valid_decryption_materials_transition.rs new file mode 100644 index 000000000..72e743336 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/valid_encryption_materials_transition.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/client/valid_encryption_materials_transition.rs new file mode 100644 index 000000000..52e9f7394 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/validate_commitment_policy_on_decrypt.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/client/validate_commitment_policy_on_encrypt.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions.rs new file mode 100644 index 000000000..214ad84e5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/aes_wrapping_alg.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/aes_wrapping_alg.rs new file mode 100644 index 000000000..5ad0ac1c4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_id.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_id.rs new file mode 100644 index 000000000..3e2ba7c29 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/algorithm_suite_info.rs new file mode 100644 index 000000000..ab8fd12b3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/branch_key_id_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/branch_key_id_supplier.rs new file mode 100644 index 000000000..eb2923e81 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/cache_type.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/cache_type.rs new file mode 100644 index 000000000..246b26a5a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/client.rs new file mode 100644 index 000000000..83406d8aa --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/client_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/client_supplier.rs new file mode 100644 index 000000000..d3d6c9674 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/commitment_policy.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/commitment_policy.rs new file mode 100644 index 000000000..4d7f5a1c3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring/_create_aws_kms_discovery_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring/_create_aws_kms_discovery_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_discovery_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring/_create_aws_kms_ecdh_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_ecdh_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring/_create_aws_kms_hierarchical_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_hierarchical_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring.rs new file mode 100644 index 000000000..0af0a7b57 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring/_create_aws_kms_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring/_create_aws_kms_mrk_discovery_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring.rs b/releases/rust/db_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/db_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/db_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/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_discovery_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring/_create_aws_kms_mrk_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring/_create_aws_kms_mrk_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_mrk_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring/_create_aws_kms_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring/_create_aws_kms_rsa_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_aws_kms_rsa_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache.rs new file mode 100644 index 000000000..507ff105e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_cryptographic_materials_cache_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier.rs new file mode 100644 index 000000000..96c239d0d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier/_create_default_client_supplier_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_client_supplier_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager/_create_default_cryptographic_materials_manager_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_default_cryptographic_materials_manager_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring.rs new file mode 100644 index 000000000..88ed88005 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring/_create_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_multi_keyring_input.rs new file mode 100644 index 000000000..aaea76c8d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring.rs new file mode 100644 index 000000000..c91560014 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring/_create_raw_aes_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_aes_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring.rs new file mode 100644 index 000000000..dc06a49b0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring/_create_raw_ecdh_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_ecdh_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring.rs new file mode 100644 index 000000000..345616d80 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring/_create_raw_rsa_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_raw_rsa_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/create_required_encryption_context_cmm_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_cache.rs new file mode 100644 index 000000000..c91eba6d2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_manager.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/cryptographic_materials_manager.rs new file mode 100644 index 000000000..91746b2d7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_algorithm_suite_id.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_algorithm_suite_id.rs new file mode 100644 index 000000000..2669e43b5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_commitment_policy.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/dbe_commitment_policy.rs new file mode 100644 index 000000000..68c428e2f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials.rs new file mode 100644 index 000000000..822e6d67c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials/_decrypt_materials_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials/_decrypt_materials_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_input.rs new file mode 100644 index 000000000..36ef6a366 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decrypt_materials_output.rs new file mode 100644 index 000000000..0cc07714f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials.rs new file mode 100644 index 000000000..9b0347ff3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials_with_plaintext_data_key.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/decryption_materials_with_plaintext_data_key/_decryption_materials_with_plaintext_data_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/default_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/default_cache.rs new file mode 100644 index 000000000..8f2423b68 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry.rs new file mode 100644 index 000000000..a83b92feb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry/_delete_cache_entry_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/delete_cache_entry_input.rs new file mode 100644 index 000000000..d44427c55 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/derivation_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/derivation_algorithm.rs new file mode 100644 index 000000000..6a1f37a29 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/direct_key_wrapping.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/direct_key_wrapping.rs new file mode 100644 index 000000000..0136f112b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/discovery_filter.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/discovery_filter.rs new file mode 100644 index 000000000..20d2120d1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/ecdsa.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/ecdsa.rs new file mode 100644 index 000000000..5350cfe1f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/edk_wrapping_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/edk_wrapping_algorithm.rs new file mode 100644 index 000000000..2bacfa0d8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypt.rs new file mode 100644 index 000000000..d16d98d41 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypted_data_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/encrypted_data_key.rs new file mode 100644 index 000000000..4ed9523c2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials.rs new file mode 100644 index 000000000..678b1fe51 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials_has_plaintext_data_key.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/encryption_materials_has_plaintext_data_key/_encryption_materials_has_plaintext_data_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/ephemeral_private_key_to_static_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/error.rs new file mode 100644 index 000000000..79b6e0be2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_algorithm_suite_id.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_algorithm_suite_id.rs new file mode 100644 index 000000000..7829f31b6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_commitment_policy.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/esdk_commitment_policy.rs new file mode 100644 index 000000000..d1b51e99f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_algorithm_suite_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_algorithm_suite_info.rs new file mode 100644 index 000000000..8af150eab --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_algorithm_suite_info/_get_algorithm_suite_info_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id.rs new file mode 100644 index 000000000..ec37422a6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id/_get_branch_key_id_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id/_get_branch_key_id_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_branch_key_id_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry.rs new file mode 100644 index 000000000..b9f551530 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry/_get_cache_entry_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry/_get_cache_entry_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_input.rs new file mode 100644 index 000000000..d7b65a5cf --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_cache_entry_output.rs new file mode 100644 index 000000000..702380c1e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client.rs new file mode 100644 index 000000000..671a7a84d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client/_get_client_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_client_input.rs new file mode 100644 index 000000000..b9045823f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials.rs new file mode 100644 index 000000000..40b2ebe43 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials/_get_encryption_materials_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials/_get_encryption_materials_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_input.rs new file mode 100644 index 000000000..d492ab870 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/get_encryption_materials_output.rs new file mode 100644 index 000000000..430a47ef0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/hkdf.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/hkdf.rs new file mode 100644 index 000000000..cc1a37e58 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/identity.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/identity.rs new file mode 100644 index 000000000..846a77bab --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials.rs new file mode 100644 index 000000000..bac3c925f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials/_initialize_decryption_materials_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials/_initialize_decryption_materials_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_decryption_materials_input.rs new file mode 100644 index 000000000..869aa0997 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials.rs new file mode 100644 index 000000000..f68441c69 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials/_initialize_encryption_materials_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials/_initialize_encryption_materials_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/initialize_encryption_materials_input.rs new file mode 100644 index 000000000..a3391ba02 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/intermediate_key_wrapping.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/intermediate_key_wrapping.rs new file mode 100644 index 000000000..c1e12b854 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/key_agreement_scheme.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/key_agreement_scheme.rs new file mode 100644 index 000000000..15d87cb3a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/keyring.rs new file mode 100644 index 000000000..3b716149d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_ecdh_static_configurations.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_ecdh_static_configurations.rs new file mode 100644 index 000000000..f738f8456 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_private_key_to_static_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/kms_public_key_discovery_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/material_providers_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/material_providers_config.rs new file mode 100644 index 000000000..251af9570 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/material_providers_config/_material_providers_config.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/materials.rs new file mode 100644 index 000000000..f3f343986 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/multi_threaded_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/multi_threaded_cache.rs new file mode 100644 index 000000000..d42f46523 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/no_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/no_cache.rs new file mode 100644 index 000000000..5f24ea15e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/none.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/none.rs new file mode 100644 index 000000000..6c96b86e4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt.rs new file mode 100644 index 000000000..11d483a3e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt/_on_decrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt/_on_decrypt_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_input.rs new file mode 100644 index 000000000..d47a5eb69 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_decrypt_output.rs new file mode 100644 index 000000000..595ea28ba --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt.rs new file mode 100644 index 000000000..34ba398b0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt/_on_encrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt/_on_encrypt_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_input.rs new file mode 100644 index 000000000..72b279382 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/on_encrypt_output.rs new file mode 100644 index 000000000..5f435a39c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/padding_scheme.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/padding_scheme.rs new file mode 100644 index 000000000..5dae655d7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/public_key_discovery_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/public_key_discovery_input.rs new file mode 100644 index 000000000..ce8313b3b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry.rs new file mode 100644 index 000000000..9de055a49 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry/_put_cache_entry_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/put_cache_entry_input.rs new file mode 100644 index 000000000..f49dc611c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/raw_ecdh_static_configurations.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/raw_ecdh_static_configurations.rs new file mode 100644 index 000000000..1ca03e57a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/raw_private_key_to_static_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/signature_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/signature_algorithm.rs new file mode 100644 index 000000000..14bdd8ba4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/single_threaded_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/single_threaded_cache.rs new file mode 100644 index 000000000..3719b51e5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/static_configurations.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/static_configurations.rs new file mode 100644 index 000000000..45d07881b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/storm_tracking_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/storm_tracking_cache.rs new file mode 100644 index 000000000..6829cd8c5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/symmetric_signature_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/symmetric_signature_algorithm.rs new file mode 100644 index 000000000..261dee9b4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/time_units.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/time_units.rs new file mode 100644 index 000000000..1caaf744c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata.rs new file mode 100644 index 000000000..2ed31961f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata/_update_usage_metadata_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/update_usage_metadata_input.rs new file mode 100644 index 000000000..600b7caa8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_algorithm_suite_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_algorithm_suite_info.rs new file mode 100644 index 000000000..a44cde64a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_algorithm_suite_info/_valid_algorithm_suite_info_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition.rs new file mode 100644 index 000000000..c22cc361b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition/_valid_decryption_materials_transition_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_decryption_materials_transition_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition.rs new file mode 100644 index 000000000..4ef8b822f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition/_valid_encryption_materials_transition_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/valid_encryption_materials_transition_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt/_validate_commitment_policy_on_decrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_decrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt/_validate_commitment_policy_on_encrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/conversions/validate_commitment_policy_on_encrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/deps.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/deps.rs new file mode 100644 index 000000000..5fbbbaa0f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/error.rs new file mode 100644 index 000000000..4cddaa7c3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/error/sealed_unhandled.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/error/sealed_unhandled.rs new file mode 100644 index 000000000..eae800729 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation.rs new file mode 100644 index 000000000..fd6fec56b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring.rs new file mode 100644 index 000000000..01e6e418b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/_create_aws_kms_discovery_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring.rs new file mode 100644 index 000000000..0695a53f8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/_create_aws_kms_discovery_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_discovery_multi_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring.rs new file mode 100644 index 000000000..aa9da5528 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/_create_aws_kms_ecdh_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_ecdh_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring.rs new file mode 100644 index 000000000..1b73da6c1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/_create_aws_kms_hierarchical_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_hierarchical_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring.rs new file mode 100644 index 000000000..9e558d210 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/_create_aws_kms_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring.rs new file mode 100644 index 000000000..8a85f4f85 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/_create_aws_kms_mrk_discovery_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring.rs new file mode 100644 index 000000000..7d3f579ac --- /dev/null +++ b/releases/rust/db_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/db_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/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_discovery_multi_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring.rs new file mode 100644 index 000000000..4a760427b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/_create_aws_kms_mrk_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring.rs new file mode 100644 index 000000000..7fbb3d031 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/_create_aws_kms_mrk_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_mrk_multi_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring.rs new file mode 100644 index 000000000..1c64df8da --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/_create_aws_kms_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_multi_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring.rs new file mode 100644 index 000000000..5abb7251c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/_create_aws_kms_rsa_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_aws_kms_rsa_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache.rs new file mode 100644 index 000000000..55e35e487 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/_create_cryptographic_materials_cache_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_cryptographic_materials_cache/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier.rs new file mode 100644 index 000000000..2d81f7447 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/_create_default_client_supplier_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/_create_default_client_supplier_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_client_supplier/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager.rs new file mode 100644 index 000000000..9f72087bc --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/_create_cryptographic_materials_manager_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/_create_default_cryptographic_materials_manager_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_default_cryptographic_materials_manager/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring.rs new file mode 100644 index 000000000..31e7d2b8b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/_create_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_multi_keyring/builders.rs new file mode 100644 index 000000000..7a5266610 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring.rs new file mode 100644 index 000000000..8a6a3efff --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/_create_raw_aes_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_aes_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring.rs new file mode 100644 index 000000000..91b9f6bdd --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/_create_raw_ecdh_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_ecdh_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring.rs new file mode 100644 index 000000000..4c8f617b8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/_create_keyring_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/_create_raw_rsa_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_raw_rsa_keyring/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm.rs new file mode 100644 index 000000000..4aea3629f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/_create_required_encryption_context_cmm_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/create_required_encryption_context_cmm/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials.rs new file mode 100644 index 000000000..7f29f63a4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/_decrypt_materials_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/_decrypt_materials_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decrypt_materials/builders.rs new file mode 100644 index 000000000..936e0e0d3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key.rs new file mode 100644 index 000000000..e940a8106 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/_decryption_materials.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/_unit.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/decryption_materials_with_plaintext_data_key/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry.rs new file mode 100644 index 000000000..8ab002d54 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/_delete_cache_entry_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/_unit.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/_unit.rs new file mode 100644 index 000000000..b52810dd9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/delete_cache_entry/builders.rs new file mode 100644 index 000000000..a4f242e0d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key.rs new file mode 100644 index 000000000..7da02cb35 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/_encryption_materials.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/_unit.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/encryption_materials_has_plaintext_data_key/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info.rs new file mode 100644 index 000000000..0817eb446 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/_algorithm_suite_info.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/_get_algorithm_suite_info_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_algorithm_suite_info/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id.rs new file mode 100644 index 000000000..cda085422 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/_get_branch_key_id_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/_get_branch_key_id_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_branch_key_id/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry.rs new file mode 100644 index 000000000..af2899554 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/_get_cache_entry_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/_get_cache_entry_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_cache_entry/builders.rs new file mode 100644 index 000000000..496ac1a45 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_client.rs new file mode 100644 index 000000000..6b552f7f4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/_get_client_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/_get_client_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_client/builders.rs new file mode 100644 index 000000000..56ac7ae4a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials.rs new file mode 100644 index 000000000..a437352a6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/_get_encryption_materials_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/_get_encryption_materials_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/get_encryption_materials/builders.rs new file mode 100644 index 000000000..122dd8bc0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials.rs new file mode 100644 index 000000000..ce56dad8a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/_decryption_materials.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/_initialize_decryption_materials_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_decryption_materials/builders.rs new file mode 100644 index 000000000..99e971955 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials.rs new file mode 100644 index 000000000..bbccb29e6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/_encryption_materials.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/_initialize_encryption_materials_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/initialize_encryption_materials/builders.rs new file mode 100644 index 000000000..d68eae967 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt.rs new file mode 100644 index 000000000..d6c9ef2a6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/_on_decrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/_on_decrypt_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_decrypt/builders.rs new file mode 100644 index 000000000..9e05198e6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt.rs new file mode 100644 index 000000000..b37df09c0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/_on_encrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/_on_encrypt_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/on_encrypt/builders.rs new file mode 100644 index 000000000..2b2c6f83b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry.rs new file mode 100644 index 000000000..c498f6ff9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/_put_cache_entry_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/_unit.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/_unit.rs new file mode 100644 index 000000000..813fbbd8d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/put_cache_entry/builders.rs new file mode 100644 index 000000000..bea71c253 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata.rs new file mode 100644 index 000000000..f68be1150 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/_unit.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/_unit.rs new file mode 100644 index 000000000..1f43786d7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/_update_usage_metadata_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/update_usage_metadata/builders.rs new file mode 100644 index 000000000..8e42182a3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info.rs new file mode 100644 index 000000000..2e5c12e0b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/_algorithm_suite_info.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/_unit.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_algorithm_suite_info/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition.rs new file mode 100644 index 000000000..da9636ef9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/_unit.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/_valid_decryption_materials_transition_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_decryption_materials_transition/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition.rs new file mode 100644 index 000000000..f78743cd2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/_unit.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/_valid_encryption_materials_transition_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/valid_encryption_materials_transition/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt.rs new file mode 100644 index 000000000..581c27351 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/_unit.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/_validate_commitment_policy_on_decrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_decrypt/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt.rs new file mode 100644 index 000000000..8ec0fe938 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/_unit.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/_validate_commitment_policy_on_encrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/operation/validate_commitment_policy_on_encrypt/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types.rs new file mode 100644 index 000000000..7b1a18979 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_aes_wrapping_alg.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_aes_wrapping_alg.rs new file mode 100644 index 000000000..052fc5613 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_id.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_id.rs new file mode 100644 index 000000000..17028a660 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_info.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_algorithm_suite_info.rs new file mode 100644 index 000000000..892c17c15 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_cache_type.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_cache_type.rs new file mode 100644 index 000000000..b1b20ecec --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_commitment_policy.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_commitment_policy.rs new file mode 100644 index 000000000..58f2f77a2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_discovery_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_discovery_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_ecdh_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_hierarchical_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_discovery_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_discovery_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_mrk_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_multi_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_aws_kms_rsa_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_cryptographic_materials_cache_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_default_client_supplier_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_default_cryptographic_materials_manager_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_multi_keyring_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_multi_keyring_input.rs new file mode 100644 index 000000000..28e44160b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_aes_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_ecdh_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_raw_rsa_keyring_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_create_required_encryption_context_cmm_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_algorithm_suite_id.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_algorithm_suite_id.rs new file mode 100644 index 000000000..cd0de5629 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_commitment_policy.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_dbe_commitment_policy.rs new file mode 100644 index 000000000..88de0bd7d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_input.rs new file mode 100644 index 000000000..c21e05816 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_decrypt_materials_output.rs new file mode 100644 index 000000000..fa5b8319d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_decryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_decryption_materials.rs new file mode 100644 index 000000000..a259f204d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_default_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_default_cache.rs new file mode 100644 index 000000000..32d840377 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_delete_cache_entry_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_delete_cache_entry_input.rs new file mode 100644 index 000000000..edd445405 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_derivation_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_derivation_algorithm.rs new file mode 100644 index 000000000..1e0cab6b4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_direct_key_wrapping.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_direct_key_wrapping.rs new file mode 100644 index 000000000..de8b03fe0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_discovery_filter.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_discovery_filter.rs new file mode 100644 index 000000000..fa9818a73 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_ecdsa.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_ecdsa.rs new file mode 100644 index 000000000..eff4a9e97 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_edk_wrapping_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_edk_wrapping_algorithm.rs new file mode 100644 index 000000000..f8e6ee1dd --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_encrypt.rs new file mode 100644 index 000000000..2e3bf6a7b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_encrypted_data_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_encrypted_data_key.rs new file mode 100644 index 000000000..01cf4089d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_encryption_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_encryption_materials.rs new file mode 100644 index 000000000..0afffc8e5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_ephemeral_private_key_to_static_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_algorithm_suite_id.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_algorithm_suite_id.rs new file mode 100644 index 000000000..1d452a661 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_commitment_policy.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_esdk_commitment_policy.rs new file mode 100644 index 000000000..f9b951972 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_branch_key_id_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_branch_key_id_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_input.rs new file mode 100644 index 000000000..4c41c7c8e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_cache_entry_output.rs new file mode 100644 index 000000000..eec078890 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_client_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_client_input.rs new file mode 100644 index 000000000..83a9f7232 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_input.rs new file mode 100644 index 000000000..c00f8437f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_get_encryption_materials_output.rs new file mode 100644 index 000000000..f6a08e67a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_hkdf.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_hkdf.rs new file mode 100644 index 000000000..bef68bd11 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_identity.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_identity.rs new file mode 100644 index 000000000..f0651dff7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_decryption_materials_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_decryption_materials_input.rs new file mode 100644 index 000000000..db818b29f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_encryption_materials_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_initialize_encryption_materials_input.rs new file mode 100644 index 000000000..6d3ca6801 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_intermediate_key_wrapping.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_intermediate_key_wrapping.rs new file mode 100644 index 000000000..d4fd182a3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_key_agreement_scheme.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_key_agreement_scheme.rs new file mode 100644 index 000000000..50edab16c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_kms_ecdh_static_configurations.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_kms_ecdh_static_configurations.rs new file mode 100644 index 000000000..6d28c8d9a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_kms_private_key_to_static_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_kms_public_key_discovery_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_materials.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_materials.rs new file mode 100644 index 000000000..3153f54be --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_multi_threaded_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_multi_threaded_cache.rs new file mode 100644 index 000000000..f3db56d0e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_no_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_no_cache.rs new file mode 100644 index 000000000..6e51e7dd5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_none.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_none.rs new file mode 100644 index 000000000..b6ff73666 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_input.rs new file mode 100644 index 000000000..49bc4997f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_on_decrypt_output.rs new file mode 100644 index 000000000..0903bd800 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_input.rs new file mode 100644 index 000000000..640653938 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_on_encrypt_output.rs new file mode 100644 index 000000000..34e4de58b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_padding_scheme.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_padding_scheme.rs new file mode 100644 index 000000000..cc79292c6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_public_key_discovery_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_public_key_discovery_input.rs new file mode 100644 index 000000000..d2b386d3c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_put_cache_entry_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_put_cache_entry_input.rs new file mode 100644 index 000000000..70565aa83 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_raw_ecdh_static_configurations.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_raw_ecdh_static_configurations.rs new file mode 100644 index 000000000..e8f639960 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_raw_private_key_to_static_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_signature_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_signature_algorithm.rs new file mode 100644 index 000000000..f521441e6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_single_threaded_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_single_threaded_cache.rs new file mode 100644 index 000000000..8f509cfd0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_static_configurations.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_static_configurations.rs new file mode 100644 index 000000000..be7f8e7fb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_storm_tracking_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_storm_tracking_cache.rs new file mode 100644 index 000000000..f1b37cda4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_symmetric_signature_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_symmetric_signature_algorithm.rs new file mode 100644 index 000000000..144ced21d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_time_units.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_time_units.rs new file mode 100644 index 000000000..ab124a7c8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_update_usage_metadata_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/_update_usage_metadata_input.rs new file mode 100644 index 000000000..49073dea8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_valid_decryption_materials_transition_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_valid_encryption_materials_transition_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_validate_commitment_policy_on_decrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/_validate_commitment_policy_on_encrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/branch_key_id_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/branch_key_id_supplier.rs new file mode 100644 index 000000000..a5bc831e2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/branch_key_id_supplier/get_branch_key_id.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/builders.rs new file mode 100644 index 000000000..6d8dbeebf --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier.rs new file mode 100644 index 000000000..22a186c68 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier/get_client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/client_supplier/get_client.rs new file mode 100644 index 000000000..e05a1a060 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache.rs new file mode 100644 index 000000000..4521824f8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/delete_cache_entry.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/get_cache_entry.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/put_cache_entry.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_cache/update_usage_metadata.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager.rs new file mode 100644 index 000000000..9e9b06713 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager/decrypt_materials.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/cryptographic_materials_manager/get_encryption_materials.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/error.rs new file mode 100644 index 000000000..b13185f69 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/keyring.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/keyring.rs new file mode 100644 index 000000000..fdc6253e2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_decrypt.rs new file mode 100644 index 000000000..3adcc6c9d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/keyring/on_encrypt.rs new file mode 100644 index 000000000..d2d53481e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_materialProviders/types/material_providers_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_materialProviders/types/material_providers_config.rs new file mode 100644 index 000000000..ce505a466 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives.rs new file mode 100644 index 000000000..e118e5215 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client.rs new file mode 100644 index 000000000..ef0e6631e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/aes_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/aes_decrypt.rs new file mode 100644 index 000000000..e5e702114 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/aes_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/aes_encrypt.rs new file mode 100644 index 000000000..7ec9e22a2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/aes_kdf_counter_mode.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/aes_kdf_counter_mode.rs new file mode 100644 index 000000000..37abc3432 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/compress_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/compress_public_key.rs new file mode 100644 index 000000000..4e2266c09 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/decompress_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/decompress_public_key.rs new file mode 100644 index 000000000..d1b9b6038 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/derive_shared_secret.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/derive_shared_secret.rs new file mode 100644 index 000000000..9c98fb8d8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/digest.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/digest.rs new file mode 100644 index 000000000..e24e84609 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/ecdsa_sign.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/ecdsa_sign.rs new file mode 100644 index 000000000..b5e62418e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/ecdsa_verify.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/ecdsa_verify.rs new file mode 100644 index 000000000..114c48283 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/generate_ecc_key_pair.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/generate_ecc_key_pair.rs new file mode 100644 index 000000000..1d373b9a6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/generate_ecdsa_signature_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/generate_ecdsa_signature_key.rs new file mode 100644 index 000000000..141761f71 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/generate_random_bytes.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/generate_random_bytes.rs new file mode 100644 index 000000000..8a43799ca --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/generate_rsa_key_pair.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/generate_rsa_key_pair.rs new file mode 100644 index 000000000..d2f3b2d82 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/get_public_key_from_private_key.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/get_rsa_key_modulus_length.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/h_mac.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/h_mac.rs new file mode 100644 index 000000000..1bcaf32a6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/hkdf.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/hkdf.rs new file mode 100644 index 000000000..02c903fd0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/hkdf_expand.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/hkdf_expand.rs new file mode 100644 index 000000000..f17e2798f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/hkdf_extract.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/hkdf_extract.rs new file mode 100644 index 000000000..089a02d0e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/kdf_counter_mode.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/kdf_counter_mode.rs new file mode 100644 index 000000000..7ffe93300 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/parse_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/parse_public_key.rs new file mode 100644 index 000000000..8b4e71ef0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/rsa_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/rsa_decrypt.rs new file mode 100644 index 000000000..16f035a44 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/rsa_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/rsa_encrypt.rs new file mode 100644 index 000000000..118ff50ab --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/client/validate_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/client/validate_public_key.rs new file mode 100644 index 000000000..a3cbdb423 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions.rs new file mode 100644 index 000000000..26a7070b8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_ctr.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_ctr.rs new file mode 100644 index 000000000..9cd984fed --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt.rs new file mode 100644 index 000000000..ffb1a3974 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt/_aes_decrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_decrypt_input.rs new file mode 100644 index 000000000..7a20f6ba9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt.rs new file mode 100644 index 000000000..4ab6f77ac --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt/_aes_encrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt/_aes_encrypt_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_input.rs new file mode 100644 index 000000000..7227104f5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_encrypt_output.rs new file mode 100644 index 000000000..74c67361f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_gcm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_gcm.rs new file mode 100644 index 000000000..3fa77a592 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_counter_mode.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_counter_mode.rs new file mode 100644 index 000000000..bad93bdb9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_counter_mode/_aes_kdf_counter_mode_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_ctr_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/aes_kdf_ctr_input.rs new file mode 100644 index 000000000..2d34b38c5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/client.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/client.rs new file mode 100644 index 000000000..44de94031 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key.rs new file mode 100644 index 000000000..45fb534e5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key/_compress_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key/_compress_public_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_input.rs new file mode 100644 index 000000000..a90723dde --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/compress_public_key_output.rs new file mode 100644 index 000000000..4613bfea8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config.rs new file mode 100644 index 000000000..7a14b80c1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config/_crypto_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/crypto_config/_crypto_config.rs new file mode 100644 index 000000000..25ff96bbc --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key.rs new file mode 100644 index 000000000..6c6f388cf --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key/_decompress_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key/_decompress_public_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_input.rs new file mode 100644 index 000000000..de620cdc1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/decompress_public_key_output.rs new file mode 100644 index 000000000..547519ad8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret.rs new file mode 100644 index 000000000..aec0c2794 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret/_derive_shared_secret_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret/_derive_shared_secret_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_input.rs new file mode 100644 index 000000000..c7d236d62 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/derive_shared_secret_output.rs new file mode 100644 index 000000000..769dcab92 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/digest.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/digest.rs new file mode 100644 index 000000000..1236a68b6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/digest/_digest_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/digest/_digest_input.rs new file mode 100644 index 000000000..ac621374d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/digest_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/digest_algorithm.rs new file mode 100644 index 000000000..b042c4750 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/digest_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/digest_input.rs new file mode 100644 index 000000000..89a27b3af --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecc_private_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecc_private_key.rs new file mode 100644 index 000000000..3de60a56e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecc_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecc_public_key.rs new file mode 100644 index 000000000..33a364f53 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdh_curve_spec.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdh_curve_spec.rs new file mode 100644 index 000000000..e8695973c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign.rs new file mode 100644 index 000000000..ba8481fd7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign/_ecdsa_sign_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_sign_input.rs new file mode 100644 index 000000000..84d5ab4a2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_signature_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_signature_algorithm.rs new file mode 100644 index 000000000..d56904660 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify.rs new file mode 100644 index 000000000..36b744c48 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify/_ecdsa_verify_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/ecdsa_verify_input.rs new file mode 100644 index 000000000..a8f733346 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/error.rs new file mode 100644 index 000000000..8b5b852be --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair.rs new file mode 100644 index 000000000..81677e94f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair/_generate_ecc_key_pair_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair/_generate_ecc_key_pair_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecc_key_pair_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key.rs new file mode 100644 index 000000000..56386fe9e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_ecdsa_signature_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes.rs new file mode 100644 index 000000000..edea89e9d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes/_generate_random_bytes_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_random_bytes_input.rs new file mode 100644 index 000000000..0f1940009 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair.rs new file mode 100644 index 000000000..5e92b854f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair/_generate_rsa_key_pair_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair/_generate_rsa_key_pair_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/generate_rsa_key_pair_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key/_get_public_key_from_private_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key/_get_public_key_from_private_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/get_public_key_from_private_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/get_rsa_key_modulus_length_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/h_mac.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/h_mac.rs new file mode 100644 index 000000000..bb9f9c152 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/h_mac/_h_mac_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/h_mac_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/h_mac_input.rs new file mode 100644 index 000000000..84ba50913 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf.rs new file mode 100644 index 000000000..aaa7ec49b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf/_hkdf_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf/_hkdf_input.rs new file mode 100644 index 000000000..57ee7e5d3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand.rs new file mode 100644 index 000000000..90d67d92f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand/_hkdf_expand_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_expand_input.rs new file mode 100644 index 000000000..d12c2ea3b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract.rs new file mode 100644 index 000000000..c7eae0189 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract/_hkdf_extract_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_extract_input.rs new file mode 100644 index 000000000..06bdb833e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/hkdf_input.rs new file mode 100644 index 000000000..5c8d92eee --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/kdf_counter_mode.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/kdf_counter_mode.rs new file mode 100644 index 000000000..8b8068509 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/kdf_counter_mode/_kdf_counter_mode_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/kdf_ctr_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/kdf_ctr_input.rs new file mode 100644 index 000000000..382235be5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key.rs new file mode 100644 index 000000000..d9dc23726 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key/_parse_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key/_parse_public_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_input.rs new file mode 100644 index 000000000..d4d93af1b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/parse_public_key_output.rs new file mode 100644 index 000000000..b3c424c68 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt.rs new file mode 100644 index 000000000..39bbfe2ac --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt/_rsa_decrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_decrypt_input.rs new file mode 100644 index 000000000..cb2bfaafd --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt.rs new file mode 100644 index 000000000..084b5d2b1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt/_rsa_encrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_encrypt_input.rs new file mode 100644 index 000000000..db0220e08 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_padding_mode.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_padding_mode.rs new file mode 100644 index 000000000..7803086c3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_private_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_private_key.rs new file mode 100644 index 000000000..337f913aa --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/rsa_public_key.rs new file mode 100644 index 000000000..ea2445595 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key.rs new file mode 100644 index 000000000..d62a4a550 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key/_validate_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key/_validate_public_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_input.rs new file mode 100644 index 000000000..72861e672 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/conversions/validate_public_key_output.rs new file mode 100644 index 000000000..b759809e6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/deps.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/deps.rs new file mode 100644 index 000000000..5fbbbaa0f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/error.rs new file mode 100644 index 000000000..4cddaa7c3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/error/sealed_unhandled.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/error/sealed_unhandled.rs new file mode 100644 index 000000000..eae800729 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation.rs new file mode 100644 index 000000000..2ecbbceda --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt.rs new file mode 100644 index 000000000..61bc4abb6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/_aes_decrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/_aes_decrypt_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_decrypt/builders.rs new file mode 100644 index 000000000..3f1aa0e78 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt.rs new file mode 100644 index 000000000..116608779 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/_aes_encrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/_aes_encrypt_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_encrypt/builders.rs new file mode 100644 index 000000000..ea3a69efb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode.rs new file mode 100644 index 000000000..701ef36c4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/_aes_kdf_ctr_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/_aes_kdf_ctr_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/aes_kdf_counter_mode/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key.rs new file mode 100644 index 000000000..c53de31cd --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/_compress_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/_compress_public_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/compress_public_key/builders.rs new file mode 100644 index 000000000..50a3ad467 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key.rs new file mode 100644 index 000000000..5250af0a1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/_decompress_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/_decompress_public_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/decompress_public_key/builders.rs new file mode 100644 index 000000000..b0c824215 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret.rs new file mode 100644 index 000000000..f28d5c639 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/_derive_shared_secret_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/_derive_shared_secret_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/derive_shared_secret/builders.rs new file mode 100644 index 000000000..0bd13a11d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/digest.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/digest.rs new file mode 100644 index 000000000..2c88644a6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_input.rs new file mode 100644 index 000000000..c8a2d35ef --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/digest/_digest_output.rs new file mode 100644 index 000000000..3032ce2ed --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/digest/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/digest/builders.rs new file mode 100644 index 000000000..8f2baccde --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign.rs new file mode 100644 index 000000000..764285cd4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/_ecdsa_sign_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/_ecdsa_sign_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_sign/builders.rs new file mode 100644 index 000000000..23f9f07b6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify.rs new file mode 100644 index 000000000..cb477c2bb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/_ecdsa_verify_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/_ecdsa_verify_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/ecdsa_verify/builders.rs new file mode 100644 index 000000000..134aacac7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair.rs new file mode 100644 index 000000000..60e52161d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/_generate_ecc_key_pair_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/_generate_ecc_key_pair_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecc_key_pair/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key.rs new file mode 100644 index 000000000..7d3cebb2d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/_generate_ecdsa_signature_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_ecdsa_signature_key/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes.rs new file mode 100644 index 000000000..056a246e0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/_generate_random_bytes_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/_generate_random_bytes_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_random_bytes/builders.rs new file mode 100644 index 000000000..d2ebf9309 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair.rs new file mode 100644 index 000000000..a36347a7c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/_generate_rsa_key_pair_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/_generate_rsa_key_pair_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/generate_rsa_key_pair/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key.rs new file mode 100644 index 000000000..43244b450 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/_get_public_key_from_private_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/_get_public_key_from_private_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/get_public_key_from_private_key/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length.rs new file mode 100644 index 000000000..5f6fad61e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/_get_rsa_key_modulus_length_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/get_rsa_key_modulus_length/builders.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/h_mac.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/h_mac.rs new file mode 100644 index 000000000..e7f02530d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/h_mac/_h_mac_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/h_mac/_h_mac_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/h_mac/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/h_mac/builders.rs new file mode 100644 index 000000000..baf4bfb1f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf.rs new file mode 100644 index 000000000..e6239e24a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_input.rs new file mode 100644 index 000000000..751fc6a97 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf/_hkdf_output.rs new file mode 100644 index 000000000..86b65415c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf/builders.rs new file mode 100644 index 000000000..bfb1e7c2e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand.rs new file mode 100644 index 000000000..20ca1bef9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/_hkdf_expand_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/_hkdf_expand_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_expand/builders.rs new file mode 100644 index 000000000..2f9f1ae4a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract.rs new file mode 100644 index 000000000..65b9a7d29 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/_hkdf_extract_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/_hkdf_extract_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/hkdf_extract/builders.rs new file mode 100644 index 000000000..6c84c7b1c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode.rs new file mode 100644 index 000000000..467b3162e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/_kdf_ctr_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/_kdf_ctr_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/kdf_counter_mode/builders.rs new file mode 100644 index 000000000..1d0b21aeb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key.rs new file mode 100644 index 000000000..f22f60519 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/_parse_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/_parse_public_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/parse_public_key/builders.rs new file mode 100644 index 000000000..47e3a0d82 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt.rs new file mode 100644 index 000000000..2a3a2606c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/_rsa_decrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/_rsa_decrypt_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_decrypt/builders.rs new file mode 100644 index 000000000..cb8aa39aa --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt.rs new file mode 100644 index 000000000..d9dafa601 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/_rsa_encrypt_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/_rsa_encrypt_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/rsa_encrypt/builders.rs new file mode 100644 index 000000000..0ac7437c5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key.rs new file mode 100644 index 000000000..b4bfc5bbd --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/_validate_public_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/_validate_public_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/operation/validate_public_key/builders.rs new file mode 100644 index 000000000..193ab6469 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types.rs new file mode 100644 index 000000000..7638d7aba --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_ctr.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_ctr.rs new file mode 100644 index 000000000..edf3c0329 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_decrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_decrypt_input.rs new file mode 100644 index 000000000..aba7fb20b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_input.rs new file mode 100644 index 000000000..8bf0315ec --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_encrypt_output.rs new file mode 100644 index 000000000..87c7fef40 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_gcm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_gcm.rs new file mode 100644 index 000000000..ddfbb9abe --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_kdf_ctr_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_aes_kdf_ctr_input.rs new file mode 100644 index 000000000..51d1d6ca8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_input.rs new file mode 100644 index 000000000..b8279999d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_compress_public_key_output.rs new file mode 100644 index 000000000..56300269f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_input.rs new file mode 100644 index 000000000..f29cfd2d6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_decompress_public_key_output.rs new file mode 100644 index 000000000..90ae6a363 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_input.rs new file mode 100644 index 000000000..6e21023f2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_derive_shared_secret_output.rs new file mode 100644 index 000000000..c9b6af8e2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_digest_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_digest_algorithm.rs new file mode 100644 index 000000000..1b3b425ba --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_digest_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_digest_input.rs new file mode 100644 index 000000000..6da415ea4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_ecc_private_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_ecc_private_key.rs new file mode 100644 index 000000000..d80cb9561 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_ecc_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_ecc_public_key.rs new file mode 100644 index 000000000..7dd639803 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_ecdh_curve_spec.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_ecdh_curve_spec.rs new file mode 100644 index 000000000..c9050dcb9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_sign_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_sign_input.rs new file mode 100644 index 000000000..5269eb9f3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_signature_algorithm.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_signature_algorithm.rs new file mode 100644 index 000000000..f67728ed4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_verify_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_ecdsa_verify_input.rs new file mode 100644 index 000000000..c626daf55 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_generate_ecc_key_pair_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_generate_ecc_key_pair_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_generate_ecdsa_signature_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_generate_ecdsa_signature_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_generate_random_bytes_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_generate_random_bytes_input.rs new file mode 100644 index 000000000..39c733162 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_generate_rsa_key_pair_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_generate_rsa_key_pair_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_get_public_key_from_private_key_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_get_public_key_from_private_key_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_get_rsa_key_modulus_length_input.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_get_rsa_key_modulus_length_output.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_h_mac_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_h_mac_input.rs new file mode 100644 index 000000000..68f03faf7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_hkdf_expand_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_hkdf_expand_input.rs new file mode 100644 index 000000000..2a3ecde57 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_hkdf_extract_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_hkdf_extract_input.rs new file mode 100644 index 000000000..39dcf2c65 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_hkdf_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_hkdf_input.rs new file mode 100644 index 000000000..22995437a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_kdf_ctr_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_kdf_ctr_input.rs new file mode 100644 index 000000000..02ab761cb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_input.rs new file mode 100644 index 000000000..ffb3e261e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_parse_public_key_output.rs new file mode 100644 index 000000000..671dfd760 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_rsa_decrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_rsa_decrypt_input.rs new file mode 100644 index 000000000..bf7e33f54 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_rsa_encrypt_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_rsa_encrypt_input.rs new file mode 100644 index 000000000..846979f82 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_rsa_padding_mode.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_rsa_padding_mode.rs new file mode 100644 index 000000000..3d6ad312b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_rsa_private_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_rsa_private_key.rs new file mode 100644 index 000000000..1ca854cd0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_rsa_public_key.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_rsa_public_key.rs new file mode 100644 index 000000000..13d0a048d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_input.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_input.rs new file mode 100644 index 000000000..cb29fe90c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_output.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/_validate_public_key_output.rs new file mode 100644 index 000000000..70a0aa1d4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/builders.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/builders.rs new file mode 100644 index 000000000..ce64e6460 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/crypto_config.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/crypto_config.rs new file mode 100644 index 000000000..fada02067 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/aws_cryptography_primitives/types/error.rs b/releases/rust/db_esdk/src/deps/aws_cryptography_primitives/types/error.rs new file mode 100644 index 000000000..5fb0d34d3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb.rs new file mode 100644 index 000000000..ea19ab7eb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/client.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/client.rs new file mode 100644 index 000000000..3e21cfe89 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions.rs new file mode 100644 index 000000000..366cd7989 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/approximate_creation_date_time_precision.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/archival_summary.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/archival_summary.rs new file mode 100644 index 000000000..2bd909c7c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_action.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_action.rs new file mode 100644 index 000000000..86959a17b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_definition.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_definition.rs new file mode 100644 index 000000000..7237d688a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value.rs new file mode 100644 index 000000000..07025b77c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value_update.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/attribute_value_update.rs new file mode 100644 index 000000000..7c6274546 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_description.rs new file mode 100644 index 000000000..b95482859 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_update.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_policy_update.rs new file mode 100644 index 000000000..15140ccde --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_description.rs new file mode 100644 index 000000000..62c6f4e85 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_update.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_settings_update.rs new file mode 100644 index 000000000..a8697ad7e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_target_tracking_scaling_policy_configuration_description.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/auto_scaling_target_tracking_scaling_policy_configuration_update.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_description.rs new file mode 100644 index 000000000..5bf74a3a0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_details.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_details.rs new file mode 100644 index 000000000..63c28794f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_status.rs new file mode 100644 index 000000000..849f3dfb9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_summary.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_summary.rs new file mode 100644 index 000000000..f9475dc6d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type.rs new file mode 100644 index 000000000..d9d38e63e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type_filter.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/backup_type_filter.rs new file mode 100644 index 000000000..93fc245c7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement.rs new file mode 100644 index 000000000..736739eba --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement/_batch_execute_statement_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_execute_statement/_batch_execute_statement_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item.rs new file mode 100644 index 000000000..6983ca563 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item/_batch_get_item_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_get_item/_batch_get_item_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_error.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_error.rs new file mode 100644 index 000000000..0cf0caff6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_error_code_enum.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_request.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_request.rs new file mode 100644 index 000000000..26d8e9c55 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_response.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_statement_response.rs new file mode 100644 index 000000000..7283116ee --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item.rs new file mode 100644 index 000000000..62c68551f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item/_batch_write_item_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/batch_write_item/_batch_write_item_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode.rs new file mode 100644 index 000000000..a29d5b356 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode_summary.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/billing_mode_summary.rs new file mode 100644 index 000000000..b4b8339f7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/cancellation_reason.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/cancellation_reason.rs new file mode 100644 index 000000000..75a324421 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/capacity.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/capacity.rs new file mode 100644 index 000000000..67c651928 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/client.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/client.rs new file mode 100644 index 000000000..02edf6a18 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/comparison_operator.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/comparison_operator.rs new file mode 100644 index 000000000..a18dec568 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/condition.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/condition.rs new file mode 100644 index 000000000..01fdf84bd --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/condition_check.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/condition_check.rs new file mode 100644 index 000000000..69f644332 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/conditional_operator.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/conditional_operator.rs new file mode 100644 index 000000000..216ac006f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/consumed_capacity.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/consumed_capacity.rs new file mode 100644 index 000000000..88129b44a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_description.rs new file mode 100644 index 000000000..683aa1974 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/continuous_backups_status.rs new file mode 100644 index 000000000..a535be766 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_action.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_action.rs new file mode 100644 index 000000000..ace5bf1fe --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_status.rs new file mode 100644 index 000000000..360f086d4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_summary.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/contributor_insights_summary.rs new file mode 100644 index 000000000..3d9176658 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup.rs new file mode 100644 index 000000000..7fc73f4ba --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup/_create_backup_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_backup/_create_backup_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_secondary_index_action.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table.rs new file mode 100644 index 000000000..97fb17be7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table/_create_global_table_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_global_table/_create_global_table_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_replica_action.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_replica_action.rs new file mode 100644 index 000000000..cfbc465a0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_replication_group_member_action.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table.rs new file mode 100644 index 000000000..8f8109b3a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table/_create_table_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/create_table/_create_table_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/csv_options.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/csv_options.rs new file mode 100644 index 000000000..f5358d460 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete.rs new file mode 100644 index 000000000..18b1385ab --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup.rs new file mode 100644 index 000000000..703fcd26a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup/_delete_backup_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_backup/_delete_backup_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_global_secondary_index_action.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item.rs new file mode 100644 index 000000000..e680ab5cc --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item/_delete_item_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_item/_delete_item_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_replica_action.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_replica_action.rs new file mode 100644 index 000000000..13a08fabe --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_replication_group_member_action.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_request.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_request.rs new file mode 100644 index 000000000..0ea1ba497 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy.rs new file mode 100644 index 000000000..1765a93af --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy/_delete_resource_policy_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_resource_policy/_delete_resource_policy_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table.rs new file mode 100644 index 000000000..a36472923 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table/_delete_table_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/delete_table/_delete_table_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup.rs new file mode 100644 index 000000000..62714bde3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup/_describe_backup_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_backup/_describe_backup_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups.rs new file mode 100644 index 000000000..6494116cc --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups/_describe_continuous_backups_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_continuous_backups/_describe_continuous_backups_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights.rs new file mode 100644 index 000000000..df3d14a6e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights/_describe_contributor_insights_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_contributor_insights/_describe_contributor_insights_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints.rs new file mode 100644 index 000000000..e2187582a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints/_describe_endpoints_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_endpoints/_describe_endpoints_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export.rs new file mode 100644 index 000000000..5af7a8ce7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export/_describe_export_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_export/_describe_export_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table.rs new file mode 100644 index 000000000..c0f1b8575 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table/_describe_global_table_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table/_describe_global_table_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings.rs new file mode 100644 index 000000000..32365c2a5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings/_describe_global_table_settings_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_global_table_settings/_describe_global_table_settings_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import.rs new file mode 100644 index 000000000..5cd5786ad --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import/_describe_import_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_import/_describe_import_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination.rs new file mode 100644 index 000000000..886273ace --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits.rs new file mode 100644 index 000000000..27c7aa723 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits/_describe_limits_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_limits/_describe_limits_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table.rs new file mode 100644 index 000000000..bbc02f9a9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table/_describe_table_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table/_describe_table_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling/_describe_table_replica_auto_scaling_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_table_replica_auto_scaling/_describe_table_replica_auto_scaling_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live.rs new file mode 100644 index 000000000..7ba2fc208 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live/_describe_time_to_live_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/describe_time_to_live/_describe_time_to_live_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/destination_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/destination_status.rs new file mode 100644 index 000000000..53288c3fa --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination.rs new file mode 100644 index 000000000..5a2f9cf59 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination/_disable_kinesis_streaming_destination_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/disable_kinesis_streaming_destination/_disable_kinesis_streaming_destination_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_configuration.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_configuration.rs new file mode 100644 index 000000000..bfec2234b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination.rs new file mode 100644 index 000000000..f5bbdcc98 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/endpoint.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/endpoint.rs new file mode 100644 index 000000000..0d33c9f4f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error.rs new file mode 100644 index 000000000..17450bcf7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/backup_in_use_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/backup_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/conditional_check_failed_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/continuous_backups_unavailable_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/duplicate_item_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/duplicate_item_exception.rs new file mode 100644 index 000000000..c1783796f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/export_conflict_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/export_conflict_exception.rs new file mode 100644 index 000000000..b795996fa --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/export_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/global_table_already_exists_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/global_table_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/idempotent_parameter_mismatch_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/import_conflict_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/import_conflict_exception.rs new file mode 100644 index 000000000..122c1568d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/import_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/index_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/internal_server_error.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/internal_server_error.rs new file mode 100644 index 000000000..a3816ac79 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_endpoint_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_endpoint_exception.rs new file mode 100644 index 000000000..a96d93843 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_export_time_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/invalid_restore_time_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/item_collection_size_limit_exceeded_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/limit_exceeded_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/limit_exceeded_exception.rs new file mode 100644 index 000000000..ee15bff66 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/point_in_time_recovery_unavailable_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/policy_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/provisioned_throughput_exceeded_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/replica_already_exists_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/replica_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/request_limit_exceeded.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/request_limit_exceeded.rs new file mode 100644 index 000000000..f3e140f33 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/resource_in_use_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/resource_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_already_exists_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_in_use_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/table_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_canceled_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_canceled_exception.rs new file mode 100644 index 000000000..c1a1cf71a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_conflict_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_conflict_exception.rs new file mode 100644 index 000000000..28376e335 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/error/transaction_in_progress_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement.rs new file mode 100644 index 000000000..67e798166 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement/_execute_statement_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_statement/_execute_statement_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction.rs new file mode 100644 index 000000000..4e90435cb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction/_execute_transaction_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/execute_transaction/_execute_transaction_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/expected_attribute_value.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/expected_attribute_value.rs new file mode 100644 index 000000000..6d34597d7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_description.rs new file mode 100644 index 000000000..ab8a5956b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_format.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_format.rs new file mode 100644 index 000000000..b11826b94 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_status.rs new file mode 100644 index 000000000..563108871 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_summary.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_summary.rs new file mode 100644 index 000000000..facc7ed66 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time/_export_table_to_point_in_time_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_table_to_point_in_time/_export_table_to_point_in_time_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_type.rs new file mode 100644 index 000000000..39063076c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_view_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/export_view_type.rs new file mode 100644 index 000000000..b0ea372be --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/failure_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/failure_exception.rs new file mode 100644 index 000000000..5da1c85a7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/get.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/get.rs new file mode 100644 index 000000000..fef8977e6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item.rs new file mode 100644 index 000000000..d9d77a837 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item/_get_item_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/get_item/_get_item_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy.rs new file mode 100644 index 000000000..13d5b51e4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy/_get_resource_policy_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/get_resource_policy/_get_resource_policy_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index.rs new file mode 100644 index 000000000..c30a817b2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_auto_scaling_update.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_description.rs new file mode 100644 index 000000000..ed1ffbfd5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_info.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_info.rs new file mode 100644 index 000000000..9d89e817d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_update.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_secondary_index_update.rs new file mode 100644 index 000000000..d532e03e8 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table.rs new file mode 100644 index 000000000..3d96ab990 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_description.rs new file mode 100644 index 000000000..72d718c60 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_global_secondary_index_settings_update.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/global_table_status.rs new file mode 100644 index 000000000..632a61104 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/import_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/import_status.rs new file mode 100644 index 000000000..a0373b8d4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/import_summary.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/import_summary.rs new file mode 100644 index 000000000..30c510473 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table.rs new file mode 100644 index 000000000..3699c845e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table/_import_table_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table/_import_table_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/import_table_description.rs new file mode 100644 index 000000000..813477e93 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/incremental_export_specification.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/incremental_export_specification.rs new file mode 100644 index 000000000..4e54f629c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/index_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/index_status.rs new file mode 100644 index 000000000..df88cdcb2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/input_compression_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/input_compression_type.rs new file mode 100644 index 000000000..57f33b428 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format.rs new file mode 100644 index 000000000..af98c314e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format_options.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/input_format_options.rs new file mode 100644 index 000000000..b74562f67 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/item_collection_metrics.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/item_collection_metrics.rs new file mode 100644 index 000000000..3be139281 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/item_response.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/item_response.rs new file mode 100644 index 000000000..c7ef4d668 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/key_schema_element.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/key_schema_element.rs new file mode 100644 index 000000000..8fb2d2fb7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/key_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/key_type.rs new file mode 100644 index 000000000..ea86df5b0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/keys_and_attributes.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/keys_and_attributes.rs new file mode 100644 index 000000000..6932febce --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/kinesis_data_stream_destination.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/kinesis_data_stream_destination.rs new file mode 100644 index 000000000..e070e97aa --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups.rs new file mode 100644 index 000000000..f2cc2c548 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups/_list_backups_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_backups/_list_backups_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights.rs new file mode 100644 index 000000000..472edcb87 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights/_list_contributor_insights_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_contributor_insights/_list_contributor_insights_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports.rs new file mode 100644 index 000000000..f48c1b12e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports/_list_exports_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_exports/_list_exports_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables.rs new file mode 100644 index 000000000..d3ffce053 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables/_list_global_tables_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_global_tables/_list_global_tables_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports.rs new file mode 100644 index 000000000..3861ccf0f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports/_list_imports_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_imports/_list_imports_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables.rs new file mode 100644 index 000000000..382ab1e24 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables/_list_tables_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tables/_list_tables_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource.rs new file mode 100644 index 000000000..237ce7f1f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource/_list_tags_of_resource_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/list_tags_of_resource/_list_tags_of_resource_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index.rs new file mode 100644 index 000000000..8a9851932 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_description.rs new file mode 100644 index 000000000..bad83c18a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_info.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/local_secondary_index_info.rs new file mode 100644 index 000000000..a49ef07f9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput.rs new file mode 100644 index 000000000..affc15bb1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput_override.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/on_demand_throughput_override.rs new file mode 100644 index 000000000..abad93cd4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/parameterized_statement.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/parameterized_statement.rs new file mode 100644 index 000000000..d18ee2b90 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_description.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_specification.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/point_in_time_recovery_status.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/projection.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/projection.rs new file mode 100644 index 000000000..a0a3f9a26 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/projection_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/projection_type.rs new file mode 100644 index 000000000..28b89124f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput.rs new file mode 100644 index 000000000..f5090829c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_description.rs new file mode 100644 index 000000000..bbac7e6fe --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_override.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/provisioned_throughput_override.rs new file mode 100644 index 000000000..da4165734 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put.rs new file mode 100644 index 000000000..14cdec509 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item.rs new file mode 100644 index 000000000..63379554a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item/_put_item_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put_item/_put_item_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put_request.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put_request.rs new file mode 100644 index 000000000..cbb029ec2 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy.rs new file mode 100644 index 000000000..0b1309706 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy/_put_resource_policy_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/put_resource_policy/_put_resource_policy_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/query.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/query.rs new file mode 100644 index 000000000..77293dd16 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_request.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_request.rs new file mode 100644 index 000000000..c6d820158 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_response.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/query/_query_response.rs new file mode 100644 index 000000000..c2a15cafb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica.rs new file mode 100644 index 000000000..8dff008be --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_description.rs new file mode 100644 index 000000000..99369e969 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_update.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_auto_scaling_update.rs new file mode 100644 index 000000000..723de2e58 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_description.rs new file mode 100644 index 000000000..cc2408106 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index.rs new file mode 100644 index 000000000..c7e6c1330 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_auto_scaling_description.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_auto_scaling_update.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_description.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_settings_description.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_global_secondary_index_settings_update.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_description.rs new file mode 100644 index 000000000..de28bd0b0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_update.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_settings_update.rs new file mode 100644 index 000000000..ce6e3bf8d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_status.rs new file mode 100644 index 000000000..fd626473a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_update.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replica_update.rs new file mode 100644 index 000000000..a768a899b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replication_group_update.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/replication_group_update.rs new file mode 100644 index 000000000..d2d134b4e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_summary.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_summary.rs new file mode 100644 index 000000000..f5e889989 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup.rs new file mode 100644 index 000000000..5e8fee784 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup/_restore_table_from_backup_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_from_backup/_restore_table_from_backup_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time/_restore_table_to_point_in_time_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/restore_table_to_point_in_time/_restore_table_to_point_in_time_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/return_consumed_capacity.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/return_consumed_capacity.rs new file mode 100644 index 000000000..b2526611f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/return_item_collection_metrics.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/return_item_collection_metrics.rs new file mode 100644 index 000000000..685738730 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/return_value.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/return_value.rs new file mode 100644 index 000000000..df8085df3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/return_values_on_condition_check_failure.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_bucket_source.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_bucket_source.rs new file mode 100644 index 000000000..d7540376d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_sse_algorithm.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/s3_sse_algorithm.rs new file mode 100644 index 000000000..5e7e786e1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/scalar_attribute_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/scalar_attribute_type.rs new file mode 100644 index 000000000..f921f603f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/scan.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/scan.rs new file mode 100644 index 000000000..f3cdc3a94 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_request.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_request.rs new file mode 100644 index 000000000..45fa03a39 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_response.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/scan/_scan_response.rs new file mode 100644 index 000000000..230f7d3a9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/select.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/select.rs new file mode 100644 index 000000000..c52b7a634 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_details.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_details.rs new file mode 100644 index 000000000..fc765d35d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_feature_details.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/source_table_feature_details.rs new file mode 100644 index 000000000..6ea2fcd5a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_description.rs new file mode 100644 index 000000000..3ee81984f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_specification.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_specification.rs new file mode 100644 index 000000000..dfeefcd02 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_status.rs new file mode 100644 index 000000000..a4f20bf1c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/sse_type.rs new file mode 100644 index 000000000..56f69062b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_specification.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_specification.rs new file mode 100644 index 000000000..84ff9d829 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_view_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/stream_view_type.rs new file mode 100644 index 000000000..718b38e76 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_auto_scaling_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_auto_scaling_description.rs new file mode 100644 index 000000000..7f9fb1d81 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class.rs new file mode 100644 index 000000000..f0a717fc9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class_summary.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_class_summary.rs new file mode 100644 index 000000000..1476090aa --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_creation_parameters.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_creation_parameters.rs new file mode 100644 index 000000000..83e098825 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_description.rs new file mode 100644 index 000000000..96e1eb5e6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/table_status.rs new file mode 100644 index 000000000..e996bc880 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/tag.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/tag.rs new file mode 100644 index 000000000..0cbbd267a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/tag_resource.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/tag_resource.rs new file mode 100644 index 000000000..f8ae7eb2f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/tag_resource/_tag_resource_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_description.rs new file mode 100644 index 000000000..adc162858 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_specification.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_specification.rs new file mode 100644 index 000000000..65ffe79ce --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/time_to_live_status.rs new file mode 100644 index 000000000..349a7fc89 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_item.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_item.rs new file mode 100644 index 000000000..90e660ec1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items.rs new file mode 100644 index 000000000..d2d27aa54 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items/_transact_get_items_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_get_items/_transact_get_items_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_item.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_item.rs new file mode 100644 index 000000000..9044e38e0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items.rs new file mode 100644 index 000000000..2def39272 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items/_transact_write_items_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/transact_write_items/_transact_write_items_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/untag_resource.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/untag_resource.rs new file mode 100644 index 000000000..fccbc5404 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/untag_resource/_untag_resource_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update.rs new file mode 100644 index 000000000..aaa712472 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups.rs new file mode 100644 index 000000000..04367ae61 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups/_update_continuous_backups_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_continuous_backups/_update_continuous_backups_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights.rs new file mode 100644 index 000000000..830a8f9b1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights/_update_contributor_insights_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_contributor_insights/_update_contributor_insights_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_secondary_index_action.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table.rs new file mode 100644 index 000000000..1ebe829d3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table/_update_global_table_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table/_update_global_table_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings.rs new file mode 100644 index 000000000..2e3ee86d7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings/_update_global_table_settings_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_global_table_settings/_update_global_table_settings_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item.rs new file mode 100644 index 000000000..90d7ebe39 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item/_update_item_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_item/_update_item_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_configuration.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_configuration.rs new file mode 100644 index 000000000..09664b40a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination.rs new file mode 100644 index 000000000..ffcebb92a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_replication_group_member_action.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table.rs new file mode 100644 index 000000000..80d226a91 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table/_update_table_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table/_update_table_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling/_update_table_replica_auto_scaling_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_table_replica_auto_scaling/_update_table_replica_auto_scaling_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live.rs new file mode 100644 index 000000000..316311e69 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live/_update_time_to_live_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/update_time_to_live/_update_time_to_live_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/write_request.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/conversions/write_request.rs new file mode 100644 index 000000000..41e630b69 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/types.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/types.rs new file mode 100644 index 000000000..3b699f571 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_dynamodb/types/error.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_dynamodb/types/error.rs new file mode 100644 index 000000000..73499b828 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms.rs new file mode 100644 index 000000000..ea19ab7eb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/client.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/client.rs new file mode 100644 index 000000000..76c1384c9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions.rs new file mode 100644 index 000000000..5896aa200 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/algorithm_spec.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/algorithm_spec.rs new file mode 100644 index 000000000..df6f811c7 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/alias_list_entry.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/alias_list_entry.rs new file mode 100644 index 000000000..9fdd3c218 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion.rs new file mode 100644 index 000000000..9edcbd515 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion/_cancel_key_deletion_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/cancel_key_deletion/_cancel_key_deletion_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/client.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/client.rs new file mode 100644 index 000000000..01e4d6c5a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store.rs new file mode 100644 index 000000000..0e87350da --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store/_connect_custom_key_store_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/connect_custom_key_store/_connect_custom_key_store_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/connection_error_code_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/connection_error_code_type.rs new file mode 100644 index 000000000..7b4ff2fb4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/connection_state_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/connection_state_type.rs new file mode 100644 index 000000000..b640f8aa0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/create_alias.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/create_alias.rs new file mode 100644 index 000000000..01383a4a0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/create_alias/_create_alias_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store.rs new file mode 100644 index 000000000..11658fb33 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store/_create_custom_key_store_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/create_custom_key_store/_create_custom_key_store_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/create_grant.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/create_grant.rs new file mode 100644 index 000000000..ef1feffc0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/create_grant/_create_grant_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/create_grant/_create_grant_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/create_key.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/create_key.rs new file mode 100644 index 000000000..d1b6476dd --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/create_key/_create_key_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/create_key/_create_key_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/custom_key_store_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/custom_key_store_type.rs new file mode 100644 index 000000000..3d5196b56 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/custom_key_stores_list_entry.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/customer_master_key_spec.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/customer_master_key_spec.rs new file mode 100644 index 000000000..d00e07390 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/data_key_pair_spec.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/data_key_pair_spec.rs new file mode 100644 index 000000000..cd2726064 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/data_key_spec.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/data_key_spec.rs new file mode 100644 index 000000000..f26b83c13 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/decrypt.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/decrypt.rs new file mode 100644 index 000000000..a295de458 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_request.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_request.rs new file mode 100644 index 000000000..fc1d3d213 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_response.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/decrypt/_decrypt_response.rs new file mode 100644 index 000000000..81f4f92eb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/delete_alias.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/delete_alias.rs new file mode 100644 index 000000000..f2b71aa78 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/delete_alias/_delete_alias_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store.rs new file mode 100644 index 000000000..5f51f2a04 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store/_delete_custom_key_store_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/delete_custom_key_store/_delete_custom_key_store_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/delete_imported_key_material.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/delete_imported_key_material.rs new file mode 100644 index 000000000..37241b0e3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/delete_imported_key_material/_delete_imported_key_material_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret.rs new file mode 100644 index 000000000..ad4386c24 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret/_derive_shared_secret_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/derive_shared_secret/_derive_shared_secret_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores.rs new file mode 100644 index 000000000..8fd4a74f4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores/_describe_custom_key_stores_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/describe_custom_key_stores/_describe_custom_key_stores_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/describe_key.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/describe_key.rs new file mode 100644 index 000000000..394ffa83a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/describe_key/_describe_key_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/describe_key/_describe_key_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/disable_key.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/disable_key.rs new file mode 100644 index 000000000..aed6d1341 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/disable_key/_disable_key_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/disable_key_rotation.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/disable_key_rotation.rs new file mode 100644 index 000000000..bd188a1a0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/disable_key_rotation/_disable_key_rotation_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store.rs new file mode 100644 index 000000000..b94fd563e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store/_disconnect_custom_key_store_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/disconnect_custom_key_store/_disconnect_custom_key_store_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/enable_key.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/enable_key.rs new file mode 100644 index 000000000..d01651ac1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/enable_key/_enable_key_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/enable_key_rotation.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/enable_key_rotation.rs new file mode 100644 index 000000000..7a94b52ba --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/enable_key_rotation/_enable_key_rotation_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/encrypt.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/encrypt.rs new file mode 100644 index 000000000..a199794ee --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_request.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_request.rs new file mode 100644 index 000000000..8bb7ea79f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_response.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/encrypt/_encrypt_response.rs new file mode 100644 index 000000000..88dd60282 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/encryption_algorithm_spec.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/encryption_algorithm_spec.rs new file mode 100644 index 000000000..af802a8f4 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error.rs new file mode 100644 index 000000000..df206938d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/already_exists_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/already_exists_exception.rs new file mode 100644 index 000000000..321291f5e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_in_use_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_invalid_configuration_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_active_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/cloud_hsm_cluster_not_related_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/conflict_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/conflict_exception.rs new file mode 100644 index 000000000..ccabd8933 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_has_cmks_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_invalid_state_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_name_in_use_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/custom_key_store_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/dependency_timeout_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/dependency_timeout_exception.rs new file mode 100644 index 000000000..cdf27efe1 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/disabled_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/disabled_exception.rs new file mode 100644 index 000000000..e0349cce5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/dry_run_operation_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/expired_import_token_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_key_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_key_exception.rs new file mode 100644 index 000000000..081c111ee --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_key_material_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/incorrect_trust_anchor_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_alias_name_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_arn_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_arn_exception.rs new file mode 100644 index 000000000..ff03c1b2b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_ciphertext_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_ciphertext_exception.rs new file mode 100644 index 000000000..af0615254 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_grant_id_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_grant_token_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_import_token_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_key_usage_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_marker_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/invalid_marker_exception.rs new file mode 100644 index 000000000..3283970aa --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/key_unavailable_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/key_unavailable_exception.rs new file mode 100644 index 000000000..5b9d52a4f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/kms_internal_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/kms_internal_exception.rs new file mode 100644 index 000000000..fae7573f9 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_mac_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_signature_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/kms_invalid_state_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/limit_exceeded_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/limit_exceeded_exception.rs new file mode 100644 index 000000000..570989ad5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/malformed_policy_document_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/not_found_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/not_found_exception.rs new file mode 100644 index 000000000..d5cf1dfc3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/tag_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/tag_exception.rs new file mode 100644 index 000000000..7ca252883 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/unsupported_operation_exception.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/error/unsupported_operation_exception.rs new file mode 100644 index 000000000..32ebc9435 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_already_in_use_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_invalid_configuration_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_key_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_incorrect_authentication_credential_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_invalid_configuration_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_invalid_response_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_endpoint_in_use_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_in_use_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_uri_unreachable_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_in_use_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_invalid_configuration_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/error/xks_proxy_vpc_endpoint_service_not_found_exception.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/expiration_model_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/expiration_model_type.rs new file mode 100644 index 000000000..5e671bac6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key.rs new file mode 100644 index 000000000..c46078506 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key/_generate_data_key_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key/_generate_data_key_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair.rs new file mode 100644 index 000000000..426c42178 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair/_generate_data_key_pair_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair/_generate_data_key_pair_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext/_generate_data_key_pair_without_plaintext_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_pair_without_plaintext/_generate_data_key_pair_without_plaintext_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext/_generate_data_key_without_plaintext_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_data_key_without_plaintext/_generate_data_key_without_plaintext_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_mac.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_mac.rs new file mode 100644 index 000000000..286db3f8b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_mac/_generate_mac_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_mac/_generate_mac_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_random.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_random.rs new file mode 100644 index 000000000..4dc3e6b58 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_random/_generate_random_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/generate_random/_generate_random_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy.rs new file mode 100644 index 000000000..5f0eaa606 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy/_get_key_policy_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_key_policy/_get_key_policy_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status.rs new file mode 100644 index 000000000..212961635 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status/_get_key_rotation_status_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_key_rotation_status/_get_key_rotation_status_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import.rs new file mode 100644 index 000000000..6d8912dde --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import/_get_parameters_for_import_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_parameters_for_import/_get_parameters_for_import_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_public_key.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/get_public_key.rs new file mode 100644 index 000000000..d67348c1e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_public_key/_get_public_key_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/get_public_key/_get_public_key_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/grant_constraints.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/grant_constraints.rs new file mode 100644 index 000000000..035eefa8a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/grant_list_entry.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/grant_list_entry.rs new file mode 100644 index 000000000..03a67a18a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/grant_operation.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/grant_operation.rs new file mode 100644 index 000000000..4ea909ccf --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/import_key_material.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/import_key_material.rs new file mode 100644 index 000000000..a1296a4ca --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/import_key_material/_import_key_material_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/import_key_material/_import_key_material_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/key_agreement_algorithm_spec.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/key_agreement_algorithm_spec.rs new file mode 100644 index 000000000..1693266ff --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/key_encryption_mechanism.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/key_encryption_mechanism.rs new file mode 100644 index 000000000..80c4b4d9b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/key_list_entry.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/key_list_entry.rs new file mode 100644 index 000000000..3cf21af3d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/key_manager_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/key_manager_type.rs new file mode 100644 index 000000000..59667f764 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/key_metadata.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/key_metadata.rs new file mode 100644 index 000000000..ce5ae5107 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/key_spec.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/key_spec.rs new file mode 100644 index 000000000..14c6136fc --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/key_state.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/key_state.rs new file mode 100644 index 000000000..d76b30c18 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/key_usage_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/key_usage_type.rs new file mode 100644 index 000000000..8d2db6b3c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_aliases.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/list_aliases.rs new file mode 100644 index 000000000..b36008dce --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_aliases/_list_aliases_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_aliases/_list_aliases_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_grants.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/list_grants.rs new file mode 100644 index 000000000..58e520b07 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_grants/_list_grants_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_grants/_list_grants_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies.rs new file mode 100644 index 000000000..6957fd658 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies/_list_key_policies_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_key_policies/_list_key_policies_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations.rs new file mode 100644 index 000000000..8af250c9f --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations/_list_key_rotations_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_key_rotations/_list_key_rotations_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_keys.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/list_keys.rs new file mode 100644 index 000000000..30d118f9a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_keys/_list_keys_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_keys/_list_keys_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags.rs new file mode 100644 index 000000000..a12ce1099 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags/_list_resource_tags_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/list_resource_tags/_list_resource_tags_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/mac_algorithm_spec.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/mac_algorithm_spec.rs new file mode 100644 index 000000000..78db597bb --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/message_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/message_type.rs new file mode 100644 index 000000000..adbdbf236 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/multi_region_configuration.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/multi_region_configuration.rs new file mode 100644 index 000000000..da6dcc87d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key.rs new file mode 100644 index 000000000..28033f3be --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/multi_region_key_type.rs new file mode 100644 index 000000000..e35f0d68a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/origin_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/origin_type.rs new file mode 100644 index 000000000..8878e10fa --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/put_key_policy.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/put_key_policy.rs new file mode 100644 index 000000000..3814d7976 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/put_key_policy/_put_key_policy_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt.rs new file mode 100644 index 000000000..ca76e917c --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt/_re_encrypt_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/re_encrypt/_re_encrypt_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/recipient_info.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/recipient_info.rs new file mode 100644 index 000000000..32a25c9dd --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/replicate_key.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/replicate_key.rs new file mode 100644 index 000000000..7ed2cb089 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/replicate_key/_replicate_key_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/replicate_key/_replicate_key_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/retire_grant.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/retire_grant.rs new file mode 100644 index 000000000..155d9e305 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/retire_grant/_retire_grant_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/revoke_grant.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/revoke_grant.rs new file mode 100644 index 000000000..1b0299a09 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/revoke_grant/_revoke_grant_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand.rs new file mode 100644 index 000000000..719c723cd --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand/_rotate_key_on_demand_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/rotate_key_on_demand/_rotate_key_on_demand_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/rotation_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/rotation_type.rs new file mode 100644 index 000000000..3e4bf8059 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/rotations_list_entry.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/rotations_list_entry.rs new file mode 100644 index 000000000..07b7981fc --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion.rs new file mode 100644 index 000000000..cd4724748 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion/_schedule_key_deletion_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/schedule_key_deletion/_schedule_key_deletion_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/sign.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/sign.rs new file mode 100644 index 000000000..25f961568 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_request.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_request.rs new file mode 100644 index 000000000..9e27f1110 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_response.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/sign/_sign_response.rs new file mode 100644 index 000000000..704c80309 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/signing_algorithm_spec.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/signing_algorithm_spec.rs new file mode 100644 index 000000000..4fcc04f84 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/tag.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/tag.rs new file mode 100644 index 000000000..a953e1f86 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/tag_resource.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/tag_resource.rs new file mode 100644 index 000000000..18d2d3026 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/tag_resource/_tag_resource_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/untag_resource.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/untag_resource.rs new file mode 100644 index 000000000..144986093 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/untag_resource/_untag_resource_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/update_alias.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/update_alias.rs new file mode 100644 index 000000000..3b5a2fad6 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/update_alias/_update_alias_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store.rs new file mode 100644 index 000000000..def367548 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store/_update_custom_key_store_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/update_custom_key_store/_update_custom_key_store_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/update_key_description.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/update_key_description.rs new file mode 100644 index 000000000..aec00f41d --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/update_key_description/_update_key_description_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/update_primary_region.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/update_primary_region.rs new file mode 100644 index 000000000..69d1dda0e --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/update_primary_region/_update_primary_region_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/verify.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/verify.rs new file mode 100644 index 000000000..94be57576 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_request.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_request.rs new file mode 100644 index 000000000..ec4d3d576 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_response.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/verify/_verify_response.rs new file mode 100644 index 000000000..35a5e0398 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/verify_mac.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/verify_mac.rs new file mode 100644 index 000000000..465c0eebe --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/verify_mac/_verify_mac_request.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/verify_mac/_verify_mac_response.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/wrapping_key_spec.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/wrapping_key_spec.rs new file mode 100644 index 000000000..a805e0bd0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/xks_key_configuration_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/xks_key_configuration_type.rs new file mode 100644 index 000000000..f367c4b9a --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_authentication_credential_type.rs b/releases/rust/db_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/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_configuration_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_configuration_type.rs new file mode 100644 index 000000000..14932c103 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_connectivity_type.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/conversions/xks_proxy_connectivity_type.rs new file mode 100644 index 000000000..effc597e0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/types.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/types.rs new file mode 100644 index 000000000..3b699f571 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/deps/com_amazonaws_kms/types/error.rs b/releases/rust/db_esdk/src/deps/com_amazonaws_kms/types/error.rs new file mode 100644 index 000000000..b2e572bb0 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/digest.rs b/releases/rust/db_esdk/src/digest.rs new file mode 100644 index 000000000..f3a01ce67 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/ecdh.rs b/releases/rust/db_esdk/src/ecdh.rs new file mode 100644 index 000000000..15e179505 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/ecdsa.rs b/releases/rust/db_esdk/src/ecdsa.rs new file mode 100644 index 000000000..ae4a51b7b --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/error.rs b/releases/rust/db_esdk/src/error.rs new file mode 100644 index 000000000..4cddaa7c3 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/error/sealed_unhandled.rs b/releases/rust/db_esdk/src/error/sealed_unhandled.rs new file mode 100644 index 000000000..eae800729 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/hmac.rs b/releases/rust/db_esdk/src/hmac.rs new file mode 100644 index 000000000..a336060f5 --- /dev/null +++ b/releases/rust/db_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/db_esdk/src/implementation_from_dafny.rs b/releases/rust/db_esdk/src/implementation_from_dafny.rs new file mode 100644 index 000000000..a1c33d20a --- /dev/null +++ b/releases/rust/db_esdk/src/implementation_from_dafny.rs @@ -0,0 +1,138447 @@ +#![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 ::dafny_runtime::int; + 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() - int!(encAlg.tagLength().clone()))); + let mut authTag: Sequence = s.drop(&(s.cardinality() - int!(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() == int!(input.encAlg().ivLength().clone()) && input.key().cardinality() == int!(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() == int!(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() == int!(input.encAlg().keyLength().clone()) && input.iv().cardinality() == int!(input.encAlg().ivLength().clone()) && input.authTag().cardinality() == int!(input.encAlg().tagLength().clone()), &Rc::new(Error::AwsCryptographicPrimitivesError { + 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::rd; + 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(rd!(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(rd!(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(rd!(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(rd!(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(rd!(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(rd!(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(rd!(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 dbencryptionsdk { + pub mod dynamodb { + pub mod itemencryptor { + pub mod internaldafny { + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DynamoDbItemEncryptorConfig; + pub use ::dafny_runtime::string_utf16_of; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + pub use ::dafny_runtime::Sequence; + pub use ::dafny_runtime::DafnyCharUTF16; + pub use ::dafny_runtime::map; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeNameList; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::DBEAlgorithmSuiteId; + pub use ::dafny_runtime::Object; + 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::ICryptographicMaterialsManager; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyOverride; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PlaintextOverride; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result; + pub use ::dafny_runtime::MaybePlacebo; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Outcome; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option::None; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option::Some; + pub use crate::implementation_from_dafny::r#_StructuredEncryptionHeader_Compile::Version; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction; + pub use ::dafny_runtime::DafnyInt; + pub use ::dafny_runtime::integer_range; + pub use ::dafny_runtime::int; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::StructuredEncryptionClient; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::IStructuredEncryptionClient; + 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 ::dafny_runtime::rd; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CreateDefaultCryptographicMaterialsManagerInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::legacy::InternalLegacyOverride; + pub use crate::implementation_from_dafny::r#_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorOperations_Compile::Config; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::IDynamoDbItemEncryptorClient; + 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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemOutput; + + pub struct _default {} + + impl _default { + pub fn DefaultDynamoDbItemEncryptorConfig() -> Rc { + Rc::new(DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig { + logicalTableName: string_utf16_of("foo"), + partitionKeyName: string_utf16_of("bar"), + sortKeyName: Rc::new(Option::>::None {}), + attributeActionsOnEncrypt: map![], + allowedUnsignedAttributes: Rc::new(Option::::None {}), + allowedUnsignedAttributePrefix: Rc::new(Option::>::None {}), + algorithmSuiteId: Rc::new(Option::>::None {}), + keyring: Rc::new(Option::>::None {}), + cmm: Rc::new(Option::>::None {}), + legacyOverride: Rc::new(Option::>::None {}), + plaintextOverride: Rc::new(Option::>::None {}) + }) + } + pub fn UnreservedPrefix(attr: &Sequence) -> bool { + !(crate::implementation_from_dafny::r#_DynamoDbItemEncryptorUtil_Compile::_default::ReservedPrefix() <= attr.clone()) && !(crate::implementation_from_dafny::r#_StructuredEncryptionUtil_Compile::_default::ReservedCryptoContextPrefixString() <= attr.clone()) + } + pub fn DynamoDbItemEncryptor(config: &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::>(matches!(config.keyring().as_ref(), None{ .. }) || matches!(config.cmm().as_ref(), None{ .. }), &Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::DynamoDbItemEncryptorException { + message: string_utf16_of("Cannot provide both a keyring and a CMM") + }))); + if valueOrError0.read().IsFailure() { + res = MaybePlacebo::from(valueOrError0.read().PropagateFailure::>()); + return res.read(); + }; + let mut valueOrError1 = MaybePlacebo::>>>::new(); + valueOrError1 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(matches!(config.keyring().as_ref(), Some{ .. }) || matches!(config.cmm().as_ref(), Some{ .. }), &Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::DynamoDbItemEncryptorException { + message: string_utf16_of("Must provide either a keyring or a CMM") + }))); + if valueOrError1.read().IsFailure() { + res = MaybePlacebo::from(valueOrError1.read().PropagateFailure::>()); + return res.read(); + }; + let mut version: Version = crate::implementation_from_dafny::r#_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorOperations_Compile::_default::VersionFromActions(config.attributeActionsOnEncrypt()); + let mut keyAction: Rc = crate::implementation_from_dafny::r#_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorOperations_Compile::_default::KeyActionFromVersion(version); + let mut keyActionStr: Sequence = crate::implementation_from_dafny::r#_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorOperations_Compile::_default::KeyActionStringFromVersion(version); + let mut valueOrError2 = MaybePlacebo::>>>::new(); + valueOrError2 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(config.attributeActionsOnEncrypt().contains(config.partitionKeyName()) && config.attributeActionsOnEncrypt().get(config.partitionKeyName()) == keyAction.clone(), &Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::DynamoDbItemEncryptorException { + message: string_utf16_of("Partition key attribute action MUST be ").concat(&keyActionStr) + }))); + 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::>(!matches!(config.sortKeyName().as_ref(), Some{ .. }) || config.attributeActionsOnEncrypt().contains(config.sortKeyName().value()) && config.attributeActionsOnEncrypt().get(config.sortKeyName().value()) == keyAction.clone(), &Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::DynamoDbItemEncryptorException { + message: string_utf16_of("Sort key attribute action MUST be ").concat(&keyActionStr) + }))); + if valueOrError3.read().IsFailure() { + res = MaybePlacebo::from(valueOrError3.read().PropagateFailure::>()); + return res.read(); + }; + let mut attributeNames: Sequence> = crate::implementation_from_dafny::SortedSets::_default::SetToOrderedSequence2::(&config.attributeActionsOnEncrypt().keys(), &(Rc::new(move |x0: &DafnyCharUTF16,x1: &DafnyCharUTF16| crate::implementation_from_dafny::r#_DynamoDbItemEncryptorUtil_Compile::_default::CharLess(x0, x1)) as Rc _>)); + let mut _hi0: DafnyInt = attributeNames.cardinality(); + for i in integer_range(int!(0), _hi0.clone()) { + let mut attributeName: Sequence = attributeNames.get(&i); + let mut action: Rc = config.attributeActionsOnEncrypt().get(&attributeName); + if !crate::implementation_from_dafny::r#_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorOperations_Compile::_default::ForwardCompatibleAttributeAction(&attributeName, &action, config.allowedUnsignedAttributes(), config.allowedUnsignedAttributePrefix()) { + res = MaybePlacebo::from(Rc::new(Result::, Rc>::Failure { + error: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::DynamoDbItemEncryptorException { + message: crate::implementation_from_dafny::r#_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorOperations_Compile::_default::ExplainNotForwardCompatible(&attributeName, &action, config.allowedUnsignedAttributes(), config.allowedUnsignedAttributePrefix()) + }) + })); + return res.read(); + }; + if !crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::_default::UnreservedPrefix(&attributeName) { + res = MaybePlacebo::from(Rc::new(Result::, Rc>::Failure { + error: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::DynamoDbItemEncryptorException { + message: string_utf16_of("Attribute: ").concat(&attributeName).concat(&string_utf16_of(" is reserved, and may not be configured.")) + }) + })); + return res.read(); + } + } + let mut structuredEncryptionRes = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::_default::StructuredEncryption(&crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::_default::DefaultStructuredEncryptionConfig())); + structuredEncryptionRes = MaybePlacebo::from(_out0.read()); + let mut valueOrError4: Rc, Rc>> = structuredEncryptionRes.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkDynamoDb { + AwsCryptographyDbEncryptionSdkDynamoDb: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkStructuredEncryption { + AwsCryptographyDbEncryptionSdkStructuredEncryption: e.clone() + }) + }) + }) + })); + if valueOrError4.IsFailure() { + res = MaybePlacebo::from(valueOrError4.PropagateFailure::>()); + return res.read(); + }; + let mut structuredEncryptionX: Object = upcast_object::()(valueOrError4.Extract()); + let mut structuredEncryption: Object = cast_object!(structuredEncryptionX.clone(), StructuredEncryptionClient); + let mut cmm = MaybePlacebo::>::new(); + if matches!(config.cmm().as_ref(), Some{ .. }) { + cmm = MaybePlacebo::from(config.cmm().value().clone()); + } else { + let mut keyring: Object = config.keyring().value().clone(); + let mut valueOrError5 = 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())); + valueOrError5 = MaybePlacebo::from(_out1.read()); + if !(!valueOrError5.read().IsFailure()) { + panic!("Halt") + }; + let mut matProv: Object = valueOrError5.read().Extract(); + let mut maybeCmm = MaybePlacebo::, Rc>>>::new(); + let mut _out2 = MaybePlacebo::, Rc>>>::new(); + _out2 = MaybePlacebo::from(IAwsCryptographicMaterialProvidersClient::CreateDefaultCryptographicMaterialsManager(rd!(matProv.clone()), &Rc::new(CreateDefaultCryptographicMaterialsManagerInput::CreateDefaultCryptographicMaterialsManagerInput { + keyring: keyring.clone() + }))); + maybeCmm = MaybePlacebo::from(_out2.read()); + let mut valueOrError6: Rc, Rc>> = maybeCmm.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: e.clone() + }) + }) + })); + if valueOrError6.IsFailure() { + res = MaybePlacebo::from(valueOrError6.PropagateFailure::>()); + return res.read(); + }; + cmm = MaybePlacebo::from(valueOrError6.Extract()); + }; + let mut maybeCmpClient = MaybePlacebo::, Rc>>>::new(); + let mut _out3 = MaybePlacebo::, Rc>>>::new(); + _out3 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::_default::MaterialProviders(&crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::_default::DefaultMaterialProvidersConfig())); + maybeCmpClient = MaybePlacebo::from(_out3.read()); + let mut valueOrError7 = MaybePlacebo::>>, Rc>>>::new(); + let mut _out4 = MaybePlacebo::>>, Rc>>>::new(); + _out4 = MaybePlacebo::from(InternalLegacyOverride::Build(config)); + valueOrError7 = MaybePlacebo::from(_out4.read()); + if valueOrError7.read().IsFailure() { + res = MaybePlacebo::from(valueOrError7.read().PropagateFailure::>()); + return res.read(); + }; + let mut internalLegacyOverride: Rc>> = valueOrError7.read().Extract(); + let mut valueOrError8: Rc, Rc>> = maybeCmpClient.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: e.clone() + }) + }) + })); + if valueOrError8.IsFailure() { + res = MaybePlacebo::from(valueOrError8.PropagateFailure::>()); + return res.read(); + }; + let mut cmpClient: Object = valueOrError8.Extract(); + if !(matches!((&internalLegacyOverride).as_ref(), None{ .. }) || matches!(config.plaintextOverride().as_ref(), None{ .. })) { + res = MaybePlacebo::from(Rc::new(Result::, Rc>::Failure { + error: Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error::DynamoDbItemEncryptorException { + message: string_utf16_of("Cannot configure both a plaintext policy and a legacy config.") + }) + })); + return res.read(); + }; + let mut plaintextOverride = MaybePlacebo::>::new(); + if matches!(config.plaintextOverride().as_ref(), Some{ .. }) { + plaintextOverride = MaybePlacebo::from(config.plaintextOverride().value().clone()); + } else { + plaintextOverride = MaybePlacebo::from(Rc::new(PlaintextOverride::FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ {})); + }; + let mut internalConfig: Rc = Rc::new(Config::Config { + version: version, + cmpClient: cmpClient.clone(), + logicalTableName: config.logicalTableName().clone(), + partitionKeyName: config.partitionKeyName().clone(), + sortKeyName: config.sortKeyName().clone(), + cmm: cmm.read(), + attributeActionsOnEncrypt: config.attributeActionsOnEncrypt().clone(), + allowedUnsignedAttributes: config.allowedUnsignedAttributes().clone(), + allowedUnsignedAttributePrefix: config.allowedUnsignedAttributePrefix().clone(), + algorithmSuiteId: config.algorithmSuiteId().clone(), + structuredEncryption: structuredEncryption.clone(), + plaintextOverride: plaintextOverride.read(), + internalLegacyOverride: internalLegacyOverride.clone() + }); + let mut client = MaybePlacebo::>::new(); + let mut _nw0: Object = crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::DynamoDbItemEncryptorClient::_allocate_object(); + crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::DynamoDbItemEncryptorClient::_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 DynamoDbItemEncryptorClient { + pub r#__i_config: Rc + } + + impl DynamoDbItemEncryptorClient { + 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::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::DynamoDbItemEncryptorClient { + UpcastObjectFn!(dyn Any); + } + + impl IDynamoDbItemEncryptorClient + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::DynamoDbItemEncryptorClient { + fn EncryptItem(&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#_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorOperations_Compile::_default::EncryptItem(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn DecryptItem(&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#_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorOperations_Compile::_default::DecryptItem(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::DynamoDbItemEncryptorClient { + UpcastObjectFn!(dyn IDynamoDbItemEncryptorClient); + } + + 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::Map; + pub use ::dafny_runtime::Sequence; + pub use ::dafny_runtime::DafnyCharUTF16; + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue; + 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 crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeNameList; + 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::IKeyring; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyOverride; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PlaintextOverride; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EncryptedDataKey; + pub use crate::implementation_from_dafny::UTF8::ValidUTF8Bytes; + + 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.dbencryptionsdk.dynamodb.itemencryptor.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 DecryptItemInput { + DecryptItemInput { + encryptedItem: Map, Rc> + } + } + + impl DecryptItemInput { + pub fn encryptedItem(&self) -> &Map, Rc> { + match self { + DecryptItemInput::DecryptItemInput{encryptedItem, } => encryptedItem, + } + } + } + + impl Debug + for DecryptItemInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecryptItemInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecryptItemInput::DecryptItemInput{encryptedItem, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.DecryptItemInput.DecryptItemInput(")?; + DafnyPrint::fmt_print(encryptedItem, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecryptItemInput {} + + impl Hash + for DecryptItemInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecryptItemInput::DecryptItemInput{encryptedItem, } => { + Hash::hash(encryptedItem, _state) + }, + } + } + } + + impl Default + for DecryptItemInput { + fn default() -> DecryptItemInput { + DecryptItemInput::DecryptItemInput { + encryptedItem: Default::default() + } + } + } + + impl AsRef + for DecryptItemInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DecryptItemOutput { + DecryptItemOutput { + plaintextItem: Map, Rc>, + parsedHeader: Rc>> + } + } + + impl DecryptItemOutput { + pub fn plaintextItem(&self) -> &Map, Rc> { + match self { + DecryptItemOutput::DecryptItemOutput{plaintextItem, parsedHeader, } => plaintextItem, + } + } + pub fn parsedHeader(&self) -> &Rc>> { + match self { + DecryptItemOutput::DecryptItemOutput{plaintextItem, parsedHeader, } => parsedHeader, + } + } + } + + impl Debug + for DecryptItemOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecryptItemOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecryptItemOutput::DecryptItemOutput{plaintextItem, parsedHeader, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.DecryptItemOutput.DecryptItemOutput(")?; + DafnyPrint::fmt_print(plaintextItem, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(parsedHeader, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecryptItemOutput {} + + impl Hash + for DecryptItemOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecryptItemOutput::DecryptItemOutput{plaintextItem, parsedHeader, } => { + Hash::hash(plaintextItem, _state); + Hash::hash(parsedHeader, _state) + }, + } + } + } + + impl Default + for DecryptItemOutput { + fn default() -> DecryptItemOutput { + DecryptItemOutput::DecryptItemOutput { + plaintextItem: Default::default(), + parsedHeader: Default::default() + } + } + } + + impl AsRef + for DecryptItemOutput { + fn as_ref(&self) -> &Self { + self + } + } + + pub struct IDynamoDbItemEncryptorClientCallHistory {} + + impl IDynamoDbItemEncryptorClientCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::IDynamoDbItemEncryptorClientCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IDynamoDbItemEncryptorClient: Any + UpcastObject { + fn EncryptItem(&self, input: &Rc) -> Rc, Rc>>; + fn DecryptItem(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum DynamoDbItemEncryptorConfig { + DynamoDbItemEncryptorConfig { + logicalTableName: Sequence, + partitionKeyName: Sequence, + sortKeyName: Rc>>, + attributeActionsOnEncrypt: Map, Rc>, + allowedUnsignedAttributes: Rc>, + allowedUnsignedAttributePrefix: Rc>>, + algorithmSuiteId: Rc>>, + keyring: Rc>>, + cmm: Rc>>, + legacyOverride: Rc>>, + plaintextOverride: Rc>> + } + } + + impl DynamoDbItemEncryptorConfig { + pub fn logicalTableName(&self) -> &Sequence { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => logicalTableName, + } + } + pub fn partitionKeyName(&self) -> &Sequence { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => partitionKeyName, + } + } + pub fn sortKeyName(&self) -> &Rc>> { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => sortKeyName, + } + } + pub fn attributeActionsOnEncrypt(&self) -> &Map, Rc> { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => attributeActionsOnEncrypt, + } + } + pub fn allowedUnsignedAttributes(&self) -> &Rc> { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => allowedUnsignedAttributes, + } + } + pub fn allowedUnsignedAttributePrefix(&self) -> &Rc>> { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => allowedUnsignedAttributePrefix, + } + } + pub fn algorithmSuiteId(&self) -> &Rc>> { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => algorithmSuiteId, + } + } + pub fn keyring(&self) -> &Rc>> { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => keyring, + } + } + pub fn cmm(&self) -> &Rc>> { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => cmm, + } + } + pub fn legacyOverride(&self) -> &Rc>> { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => legacyOverride, + } + } + pub fn plaintextOverride(&self) -> &Rc>> { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => plaintextOverride, + } + } + } + + impl Debug + for DynamoDbItemEncryptorConfig { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DynamoDbItemEncryptorConfig { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.DynamoDbItemEncryptorConfig.DynamoDbItemEncryptorConfig(")?; + DafnyPrint::fmt_print(logicalTableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(partitionKeyName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(sortKeyName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(attributeActionsOnEncrypt, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(allowedUnsignedAttributes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(allowedUnsignedAttributePrefix, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyring, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cmm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(legacyOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(plaintextOverride, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DynamoDbItemEncryptorConfig {} + + impl Hash + for DynamoDbItemEncryptorConfig { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig{logicalTableName, partitionKeyName, sortKeyName, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => { + Hash::hash(logicalTableName, _state); + Hash::hash(partitionKeyName, _state); + Hash::hash(sortKeyName, _state); + Hash::hash(attributeActionsOnEncrypt, _state); + Hash::hash(allowedUnsignedAttributes, _state); + Hash::hash(allowedUnsignedAttributePrefix, _state); + Hash::hash(algorithmSuiteId, _state); + Hash::hash(keyring, _state); + Hash::hash(cmm, _state); + Hash::hash(legacyOverride, _state); + Hash::hash(plaintextOverride, _state) + }, + } + } + } + + impl Default + for DynamoDbItemEncryptorConfig { + fn default() -> DynamoDbItemEncryptorConfig { + DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig { + logicalTableName: Default::default(), + partitionKeyName: Default::default(), + sortKeyName: Default::default(), + attributeActionsOnEncrypt: Default::default(), + allowedUnsignedAttributes: Default::default(), + allowedUnsignedAttributePrefix: Default::default(), + algorithmSuiteId: Default::default(), + keyring: Default::default(), + cmm: Default::default(), + legacyOverride: Default::default(), + plaintextOverride: Default::default() + } + } + } + + impl AsRef + for DynamoDbItemEncryptorConfig { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptItemInput { + EncryptItemInput { + plaintextItem: Map, Rc> + } + } + + impl EncryptItemInput { + pub fn plaintextItem(&self) -> &Map, Rc> { + match self { + EncryptItemInput::EncryptItemInput{plaintextItem, } => plaintextItem, + } + } + } + + impl Debug + for EncryptItemInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptItemInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptItemInput::EncryptItemInput{plaintextItem, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.EncryptItemInput.EncryptItemInput(")?; + DafnyPrint::fmt_print(plaintextItem, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptItemInput {} + + impl Hash + for EncryptItemInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptItemInput::EncryptItemInput{plaintextItem, } => { + Hash::hash(plaintextItem, _state) + }, + } + } + } + + impl Default + for EncryptItemInput { + fn default() -> EncryptItemInput { + EncryptItemInput::EncryptItemInput { + plaintextItem: Default::default() + } + } + } + + impl AsRef + for EncryptItemInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptItemOutput { + EncryptItemOutput { + encryptedItem: Map, Rc>, + parsedHeader: Rc>> + } + } + + impl EncryptItemOutput { + pub fn encryptedItem(&self) -> &Map, Rc> { + match self { + EncryptItemOutput::EncryptItemOutput{encryptedItem, parsedHeader, } => encryptedItem, + } + } + pub fn parsedHeader(&self) -> &Rc>> { + match self { + EncryptItemOutput::EncryptItemOutput{encryptedItem, parsedHeader, } => parsedHeader, + } + } + } + + impl Debug + for EncryptItemOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptItemOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptItemOutput::EncryptItemOutput{encryptedItem, parsedHeader, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.EncryptItemOutput.EncryptItemOutput(")?; + DafnyPrint::fmt_print(encryptedItem, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(parsedHeader, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptItemOutput {} + + impl Hash + for EncryptItemOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptItemOutput::EncryptItemOutput{encryptedItem, parsedHeader, } => { + Hash::hash(encryptedItem, _state); + Hash::hash(parsedHeader, _state) + }, + } + } + } + + impl Default + for EncryptItemOutput { + fn default() -> EncryptItemOutput { + EncryptItemOutput::EncryptItemOutput { + encryptedItem: Default::default(), + parsedHeader: Default::default() + } + } + } + + impl AsRef + for EncryptItemOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ParsedHeader { + ParsedHeader { + attributeActionsOnEncrypt: Map, Rc>, + algorithmSuiteId: Rc, + encryptedDataKeys: Sequence>, + storedEncryptionContext: Map, + encryptionContext: Map, + selectorContext: Map, Rc> + } + } + + impl ParsedHeader { + pub fn attributeActionsOnEncrypt(&self) -> &Map, Rc> { + match self { + ParsedHeader::ParsedHeader{attributeActionsOnEncrypt, algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, selectorContext, } => attributeActionsOnEncrypt, + } + } + pub fn algorithmSuiteId(&self) -> &Rc { + match self { + ParsedHeader::ParsedHeader{attributeActionsOnEncrypt, algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, selectorContext, } => algorithmSuiteId, + } + } + pub fn encryptedDataKeys(&self) -> &Sequence> { + match self { + ParsedHeader::ParsedHeader{attributeActionsOnEncrypt, algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, selectorContext, } => encryptedDataKeys, + } + } + pub fn storedEncryptionContext(&self) -> &Map { + match self { + ParsedHeader::ParsedHeader{attributeActionsOnEncrypt, algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, selectorContext, } => storedEncryptionContext, + } + } + pub fn encryptionContext(&self) -> &Map { + match self { + ParsedHeader::ParsedHeader{attributeActionsOnEncrypt, algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, selectorContext, } => encryptionContext, + } + } + pub fn selectorContext(&self) -> &Map, Rc> { + match self { + ParsedHeader::ParsedHeader{attributeActionsOnEncrypt, algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, selectorContext, } => selectorContext, + } + } + } + + impl Debug + for ParsedHeader { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ParsedHeader { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ParsedHeader::ParsedHeader{attributeActionsOnEncrypt, algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, selectorContext, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.ParsedHeader.ParsedHeader(")?; + DafnyPrint::fmt_print(attributeActionsOnEncrypt, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptedDataKeys, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(storedEncryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(selectorContext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ParsedHeader {} + + impl Hash + for ParsedHeader { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ParsedHeader::ParsedHeader{attributeActionsOnEncrypt, algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, selectorContext, } => { + Hash::hash(attributeActionsOnEncrypt, _state); + Hash::hash(algorithmSuiteId, _state); + Hash::hash(encryptedDataKeys, _state); + Hash::hash(storedEncryptionContext, _state); + Hash::hash(encryptionContext, _state); + Hash::hash(selectorContext, _state) + }, + } + } + } + + impl Default + for ParsedHeader { + fn default() -> ParsedHeader { + ParsedHeader::ParsedHeader { + attributeActionsOnEncrypt: Default::default(), + algorithmSuiteId: Default::default(), + encryptedDataKeys: Default::default(), + storedEncryptionContext: Default::default(), + encryptionContext: Default::default(), + selectorContext: Default::default() + } + } + } + + impl AsRef + for ParsedHeader { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Error { + DynamoDbItemEncryptorException { + message: Sequence + }, + AwsCryptographyDbEncryptionSdkDynamoDb { + AwsCryptographyDbEncryptionSdkDynamoDb: Rc + }, + AwsCryptographyDbEncryptionSdkStructuredEncryption { + AwsCryptographyDbEncryptionSdkStructuredEncryption: Rc + }, + AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: Rc + }, + AwsCryptographyPrimitives { + AwsCryptographyPrimitives: Rc + }, + ComAmazonawsDynamodb { + ComAmazonawsDynamodb: Rc + }, + CollectionOfErrors { + list: Sequence>, + message: Sequence + }, + Opaque { + obj: Object + }, + OpaqueWithText { + obj: Object, + objMessage: Sequence + } + } + + impl Error { + pub fn message(&self) -> &Sequence { + match self { + Error::DynamoDbItemEncryptorException{message, } => message, + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => 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::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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 AwsCryptographyDbEncryptionSdkDynamoDb(&self) -> &Rc { + match self { + Error::DynamoDbItemEncryptorException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => AwsCryptographyDbEncryptionSdkDynamoDb, + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => 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::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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 AwsCryptographyDbEncryptionSdkStructuredEncryption(&self) -> &Rc { + match self { + Error::DynamoDbItemEncryptorException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => AwsCryptographyDbEncryptionSdkStructuredEncryption, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => 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::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 AwsCryptographyMaterialProviders(&self) -> &Rc { + match self { + Error::DynamoDbItemEncryptorException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => AwsCryptographyMaterialProviders, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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::DynamoDbItemEncryptorException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => AwsCryptographyPrimitives, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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::DynamoDbItemEncryptorException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => 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::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => ComAmazonawsDynamodb, + 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::DynamoDbItemEncryptorException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => 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::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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::DynamoDbItemEncryptorException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => 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::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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::DynamoDbItemEncryptorException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => 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::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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::DynamoDbItemEncryptorException{message, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.Error.DynamoDbItemEncryptorException(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.Error.AwsCryptographyDbEncryptionSdkDynamoDb(")?; + DafnyPrint::fmt_print(AwsCryptographyDbEncryptionSdkDynamoDb, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.Error.AwsCryptographyDbEncryptionSdkStructuredEncryption(")?; + DafnyPrint::fmt_print(AwsCryptographyDbEncryptionSdkStructuredEncryption, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.Error.AwsCryptographyMaterialProviders(")?; + DafnyPrint::fmt_print(AwsCryptographyMaterialProviders, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.Error.AwsCryptographyPrimitives(")?; + DafnyPrint::fmt_print(AwsCryptographyPrimitives, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.Error.ComAmazonawsDynamodb(")?; + DafnyPrint::fmt_print(ComAmazonawsDynamodb, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::CollectionOfErrors{list, message, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.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.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.Error.Opaque(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::OpaqueWithText{obj, objMessage, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.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::DynamoDbItemEncryptorException{message, } => { + Hash::hash(message, _state) + }, + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => { + Hash::hash(AwsCryptographyDbEncryptionSdkDynamoDb, _state) + }, + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => { + Hash::hash(AwsCryptographyDbEncryptionSdkStructuredEncryption, _state) + }, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => { + Hash::hash(AwsCryptographyMaterialProviders, _state) + }, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => { + Hash::hash(AwsCryptographyPrimitives, _state) + }, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => { + Hash::hash(ComAmazonawsDynamodb, _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::DynamoDbItemEncryptorException { + 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 legacy { + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + pub use ::dafny_runtime::Object; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::legacy::InternalLegacyOverride; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::Error; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::EncryptItemOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DecryptItemOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::LegacyPolicy; + pub use ::dafny_runtime::UpcastObject; + pub use ::std::any::Any; + pub use ::dafny_runtime::UpcastObjectFn; + pub use crate::implementation_from_dafny::_dafny_externs::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::legacy::*; + + impl InternalLegacyOverride { + pub fn CreateBuildSuccess(value: &Rc>>) -> Rc>>, Rc>> { + Rc::new(Result::>>, Rc>::Success { + value: value.clone() + }) + } + pub fn CreateBuildFailure(error: &Rc) -> Rc>>, Rc>> { + Rc::new(Result::>>, Rc>::Failure { + error: error.clone() + }) + } + pub fn CreateInternalLegacyOverrideSome(value: &Object) -> Rc>> { + Rc::new(Option::>::Some { + value: value.clone() + }) + } + pub fn CreateInternalLegacyOverrideNone() -> Rc>> { + Rc::new(Option::>::None {}) + } + pub fn CreateEncryptItemSuccess(&self, value: &Rc) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Success { + value: value.clone() + }) + } + pub fn CreateEncryptItemFailure(&self, error: &Rc) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Failure { + error: error.clone() + }) + } + pub fn CreateDecryptItemSuccess(&self, value: &Rc) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Success { + value: value.clone() + }) + } + pub fn CreateDecryptItemFailure(&self, error: &Rc) -> Rc, Rc>> { + Rc::new(Result::, Rc>::Failure { + error: error.clone() + }) + } + pub fn policy(&self) -> Rc { + self.r#__i_policy.clone() + } + } + + impl UpcastObject + for InternalLegacyOverride { + UpcastObjectFn!(dyn Any); + } + } + } + } + + pub mod transforms { + pub mod internaldafny { + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTablesEncryptionConfig; + pub use ::dafny_runtime::map; + pub use ::dafny_runtime::Sequence; + pub use ::dafny_runtime::DafnyCharUTF16; + pub use ::dafny_runtime::Map; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction; + pub use ::dafny_runtime::int; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbTableEncryptionConfig; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option::Some; + 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::r#_DdbMiddlewareConfig_Compile::ValidTableConfig; + pub use ::dafny_runtime::Set; + pub use ::dafny_runtime::set; + pub use ::dafny_runtime::DafnyInt; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Outcome; + pub use ::dafny_runtime::string_utf16_of; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + pub use crate::implementation_from_dafny::r#_SearchableEncryptionInfo_Compile::SearchInfo; + pub use crate::implementation_from_dafny::r#_SearchableEncryptionInfo_Compile::ValidSearchInfo; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option::None; + pub use ::dafny_runtime::seq; + pub use ::dafny_runtime::itertools::Itertools; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::DynamoDbItemEncryptorConfig; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::DynamoDbItemEncryptorClient; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::types::IDynamoDbItemEncryptorClient; + pub use ::dafny_runtime::upcast_object; + pub use ::dafny_runtime::cast_object; + pub use ::dafny_runtime::rd; + pub use crate::implementation_from_dafny::r#_DdbMiddlewareConfig_Compile::TableConfig; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::PlaintextOverride; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::IDynamoDbEncryptionTransformsClient; + 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::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::PutItemOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::GetItemOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchWriteItemOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchGetItemOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ScanOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::QueryOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactWriteItemsOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::UpdateItemOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::DeleteItemOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::TransactGetItemsOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteStatementOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::BatchExecuteStatementOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionInputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ExecuteTransactionOutputTransformOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::ResolveAttributesOutput; + + pub struct _default {} + + impl _default { + pub fn DefaultDynamoDbTablesEncryptionConfig() -> Rc { + Rc::new(DynamoDbTablesEncryptionConfig::DynamoDbTablesEncryptionConfig { + tableEncryptionConfigs: map![] + }) + } + pub fn AddSignedBeaconActions(names: &Sequence>, actions: &Map, Rc>) -> Map, Rc> { + let mut _r0 = names.clone(); + let mut _r1 = actions.clone(); + 'TAIL_CALL_START: loop { + let names = _r0; + let actions = _r1; + if names.cardinality() == int!(0) { + return actions.clone(); + } else { + let mut _in0: Sequence> = names.drop(&int!(1)); + let mut _in1: Map, Rc> = actions.update_index(&names.get(&int!(0)), &Rc::new(CryptoAction::SIGN_ONLY {})); + _r0 = _in0.clone(); + _r1 = _in1.clone(); + continue 'TAIL_CALL_START; + } + } + } + pub fn IsConfigured(config: &Rc, name: &Sequence) -> bool { + config.attributeActionsOnEncrypt().contains(name) || matches!(config.allowedUnsignedAttributes().as_ref(), Some{ .. }) && config.allowedUnsignedAttributes().value().contains(name) || matches!(config.allowedUnsignedAttributePrefix().as_ref(), Some{ .. }) && config.allowedUnsignedAttributePrefix().value().clone() <= name.clone() + } + pub fn DynamoDbEncryptionTransforms(config: &Rc) -> Rc, Rc>> { + let mut res = MaybePlacebo::, Rc>>>::new(); + let mut internalConfigs: Map, ValidTableConfig> = map![]; + let mut r#_m_k: Map, Rc> = config.tableEncryptionConfigs().clone(); + let mut mKeys: Set> = r#_m_k.keys(); + let mut tableNamesSeq = MaybePlacebo::>>::new(); + let mut _out0 = MaybePlacebo::>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::SortedSets::_default::SetToSequence::>(&mKeys)); + tableNamesSeq = MaybePlacebo::from(_out0.read()); + let mut allLogicalTableNames: Set> = set!{}; + let mut i: DafnyInt = int!(0); + while i.clone() < tableNamesSeq.read().cardinality() { + let mut tableName: Sequence = tableNamesSeq.read().get(&i); + let mut inputConfig: Rc = config.tableEncryptionConfigs().get(&tableName); + let mut valueOrError0 = MaybePlacebo::>>>::new(); + valueOrError0 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(!allLogicalTableNames.contains(inputConfig.logicalTableName()), &crate::implementation_from_dafny::r#_DdbMiddlewareConfig_Compile::_default::E(&string_utf16_of("Duplicate logical table maped to multipule physical tables: ").concat(inputConfig.logicalTableName())))); + if valueOrError0.read().IsFailure() { + res = MaybePlacebo::from(valueOrError0.read().PropagateFailure::>()); + return res.read(); + }; + let mut searchR = MaybePlacebo::>>, Rc>>>::new(); + let mut _out1 = MaybePlacebo::>, Rc>>>::new(); + _out1 = MaybePlacebo::from(crate::implementation_from_dafny::r#_SearchConfigToInfo_Compile::_default::Convert(&inputConfig)); + searchR = MaybePlacebo::from(_out1.read()); + let mut valueOrError1 = MaybePlacebo::>>, Rc>>>::new(); + valueOrError1 = MaybePlacebo::from(searchR.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkDynamoDb { + AwsCryptographyDbEncryptionSdkDynamoDb: e.clone() + }) + }) + }))); + if valueOrError1.read().IsFailure() { + res = MaybePlacebo::from(valueOrError1.read().PropagateFailure::>()); + return res.read(); + }; + let mut search: Rc>> = valueOrError1.read().Extract(); + let mut signedBeacons = MaybePlacebo::>>::new(); + if matches!((&search).as_ref(), None{ .. }) { + signedBeacons = MaybePlacebo::from(seq![] as Sequence>); + } else { + signedBeacons = MaybePlacebo::from(search.value().curr().ListSignedBeacons()); + }; + let mut badBeacons: Sequence> = crate::implementation_from_dafny::r#_Seq_Compile::_default::Filter::>({ + let inputConfig: Rc = inputConfig.clone(); + &({ + let mut inputConfig = inputConfig.clone(); + Rc::new(move |s: &Sequence| -> bool{ + crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::_default::IsConfigured(&inputConfig, s) + }) + }) + }, &signedBeacons.read()); + if int!(0) < badBeacons.cardinality() { + res = MaybePlacebo::from(Rc::new(Result::, Rc>::Failure { + error: crate::implementation_from_dafny::r#_DdbMiddlewareConfig_Compile::_default::E(&string_utf16_of("Signed beacons cannot be configured with CryptoActions or as unauthenticated : ").concat(&crate::implementation_from_dafny::r#_StandardLibrary_Compile::_default::Join::(&badBeacons, &string_utf16_of(", ")))) + })); + return res.read(); + }; + let mut valueOrError2 = MaybePlacebo::>>>::new(); + valueOrError2 = MaybePlacebo::from(crate::implementation_from_dafny::r#_Wrappers_Compile::_default::Need::>(Itertools::unique((&signedBeacons.read()).iter()).all(({ + let mut signedBeacons = signedBeacons.clone(); + Rc::new(move |r#__forall_var_0: Sequence| -> bool{ + let mut k: Sequence = r#__forall_var_0.clone(); + !signedBeacons.read().contains(&k) || crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::_default::IsValid_AttributeName(&k) + }) + }).as_ref()), &crate::implementation_from_dafny::r#_DdbMiddlewareConfig_Compile::_default::E(&string_utf16_of("Beacon configured with bad name")))); + if valueOrError2.read().IsFailure() { + res = MaybePlacebo::from(valueOrError2.read().PropagateFailure::>()); + return res.read(); + }; + let mut newActions: Map, Rc> = crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::_default::AddSignedBeaconActions(&signedBeacons.read(), inputConfig.attributeActionsOnEncrypt()); + let mut encryptorConfig: Rc = Rc::new(DynamoDbItemEncryptorConfig::DynamoDbItemEncryptorConfig { + logicalTableName: inputConfig.logicalTableName().clone(), + partitionKeyName: inputConfig.partitionKeyName().clone(), + sortKeyName: inputConfig.sortKeyName().clone(), + attributeActionsOnEncrypt: newActions.clone(), + allowedUnsignedAttributes: inputConfig.allowedUnsignedAttributes().clone(), + allowedUnsignedAttributePrefix: inputConfig.allowedUnsignedAttributePrefix().clone(), + algorithmSuiteId: inputConfig.algorithmSuiteId().clone(), + keyring: inputConfig.keyring().clone(), + cmm: inputConfig.cmm().clone(), + legacyOverride: inputConfig.legacyOverride().clone(), + plaintextOverride: inputConfig.plaintextOverride().clone() + }); + let mut itemEncryptorRes = MaybePlacebo::, Rc>>>::new(); + let mut _out2 = MaybePlacebo::, Rc>>>::new(); + _out2 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::itemencryptor::internaldafny::_default::DynamoDbItemEncryptor(&encryptorConfig)); + itemEncryptorRes = MaybePlacebo::from(_out2.read()); + let mut valueOrError3: Rc, Rc>> = itemEncryptorRes.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor { + AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor: e.clone() + }) + }) + })); + if valueOrError3.IsFailure() { + res = MaybePlacebo::from(valueOrError3.PropagateFailure::>()); + return res.read(); + }; + let mut itemEncryptorX: Object = upcast_object::()(valueOrError3.Extract()); + let mut itemEncryptor: Object = cast_object!(itemEncryptorX.clone(), DynamoDbItemEncryptorClient); + let mut encConfig: Rc = rd!(itemEncryptor.clone()).config().clone(); + let mut internalConfig: ValidTableConfig = Rc::new(TableConfig::TableConfig { + physicalTableName: tableName.clone(), + logicalTableName: inputConfig.logicalTableName().clone(), + partitionKeyName: inputConfig.partitionKeyName().clone(), + sortKeyName: inputConfig.sortKeyName().clone(), + itemEncryptor: itemEncryptor.clone(), + search: search.clone(), + plaintextOverride: inputConfig.plaintextOverride().UnwrapOr(&Rc::new(PlaintextOverride::FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ {})) + }); + internalConfigs = internalConfigs.update_index(&tableName, &internalConfig); + allLogicalTableNames = allLogicalTableNames.merge(&set!{internalConfig.logicalTableName().clone()}); + i = i.clone() + int!(1); + }; + let mut newConfig: Rc = Rc::new(crate::implementation_from_dafny::r#_DdbMiddlewareConfig_Compile::Config::Config { + tableEncryptionConfigs: internalConfigs.clone() + }); + let mut client = MaybePlacebo::>::new(); + let mut _nw0: Object = crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::DynamoDbEncryptionTransformsClient::_allocate_object(); + crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::DynamoDbEncryptionTransformsClient::_ctor(&_nw0, &newConfig); + 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 DynamoDbEncryptionTransformsClient { + pub r#__i_config: Rc + } + + impl DynamoDbEncryptionTransformsClient { + 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::dbencryptionsdk::dynamodb::transforms::internaldafny::DynamoDbEncryptionTransformsClient { + UpcastObjectFn!(dyn Any); + } + + impl IDynamoDbEncryptionTransformsClient + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::DynamoDbEncryptionTransformsClient { + fn PutItemInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::PutItemInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn PutItemOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::PutItemOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn GetItemInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::GetItemInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn GetItemOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::GetItemOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn BatchWriteItemInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::BatchWriteItemInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn BatchWriteItemOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::BatchWriteItemOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn BatchGetItemInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::BatchGetItemInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn BatchGetItemOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::BatchGetItemOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ScanInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::ScanInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ScanOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::ScanOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn QueryInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::QueryInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn QueryOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::QueryOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn TransactWriteItemsInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::TransactWriteItemsInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn TransactWriteItemsOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::TransactWriteItemsOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn UpdateItemInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::UpdateItemInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn UpdateItemOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::UpdateItemOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn DeleteItemInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::DeleteItemInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn DeleteItemOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::DeleteItemOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn TransactGetItemsInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::TransactGetItemsInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn TransactGetItemsOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::TransactGetItemsOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ExecuteStatementInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::ExecuteStatementInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ExecuteStatementOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::ExecuteStatementOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn BatchExecuteStatementInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::BatchExecuteStatementInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn BatchExecuteStatementOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::BatchExecuteStatementOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ExecuteTransactionInputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::ExecuteTransactionInputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ExecuteTransactionOutputTransform(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::ExecuteTransactionOutputTransform(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ResolveAttributes(&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#_AwsCryptographyDbEncryptionSdkDynamoDbTransformsOperations_Compile::_default::ResolveAttributes(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::DynamoDbEncryptionTransformsClient { + UpcastObjectFn!(dyn IDynamoDbEncryptionTransformsClient); + } + + 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 ::std::rc::Rc; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchExecuteStatementInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchExecuteStatementOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchGetItemInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchGetItemOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchWriteItemInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::BatchWriteItemOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteItemInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::DeleteItemOutput; + 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::ExecuteStatementInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteStatementOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteTransactionInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::ExecuteTransactionOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::GetItemInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::GetItemOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::PutItemInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::PutItemOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::QueryInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::QueryOutput; + pub use ::dafny_runtime::Sequence; + pub use ::dafny_runtime::DafnyCharUTF16; + pub use ::dafny_runtime::Map; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VersionNumber; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::ScanInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::ScanOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactGetItemsInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactGetItemsOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactWriteItemsInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::TransactWriteItemsOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateItemInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::UpdateItemOutput; + + 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.dbencryptionsdk.dynamodb.transforms.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 BatchExecuteStatementInputTransformInput { + BatchExecuteStatementInputTransformInput { + sdkInput: Rc + } + } + + impl BatchExecuteStatementInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + BatchExecuteStatementInputTransformInput::BatchExecuteStatementInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for BatchExecuteStatementInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchExecuteStatementInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchExecuteStatementInputTransformInput::BatchExecuteStatementInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchExecuteStatementInputTransformInput.BatchExecuteStatementInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchExecuteStatementInputTransformInput {} + + impl Hash + for BatchExecuteStatementInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchExecuteStatementInputTransformInput::BatchExecuteStatementInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for BatchExecuteStatementInputTransformInput { + fn default() -> BatchExecuteStatementInputTransformInput { + BatchExecuteStatementInputTransformInput::BatchExecuteStatementInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for BatchExecuteStatementInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchExecuteStatementInputTransformOutput { + BatchExecuteStatementInputTransformOutput { + transformedInput: Rc + } + } + + impl BatchExecuteStatementInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + BatchExecuteStatementInputTransformOutput::BatchExecuteStatementInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for BatchExecuteStatementInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchExecuteStatementInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchExecuteStatementInputTransformOutput::BatchExecuteStatementInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchExecuteStatementInputTransformOutput.BatchExecuteStatementInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchExecuteStatementInputTransformOutput {} + + impl Hash + for BatchExecuteStatementInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchExecuteStatementInputTransformOutput::BatchExecuteStatementInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for BatchExecuteStatementInputTransformOutput { + fn default() -> BatchExecuteStatementInputTransformOutput { + BatchExecuteStatementInputTransformOutput::BatchExecuteStatementInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for BatchExecuteStatementInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchExecuteStatementOutputTransformInput { + BatchExecuteStatementOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl BatchExecuteStatementOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + BatchExecuteStatementOutputTransformInput::BatchExecuteStatementOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + BatchExecuteStatementOutputTransformInput::BatchExecuteStatementOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for BatchExecuteStatementOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchExecuteStatementOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchExecuteStatementOutputTransformInput::BatchExecuteStatementOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchExecuteStatementOutputTransformInput.BatchExecuteStatementOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchExecuteStatementOutputTransformInput {} + + impl Hash + for BatchExecuteStatementOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchExecuteStatementOutputTransformInput::BatchExecuteStatementOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for BatchExecuteStatementOutputTransformInput { + fn default() -> BatchExecuteStatementOutputTransformInput { + BatchExecuteStatementOutputTransformInput::BatchExecuteStatementOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for BatchExecuteStatementOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchExecuteStatementOutputTransformOutput { + BatchExecuteStatementOutputTransformOutput { + transformedOutput: Rc + } + } + + impl BatchExecuteStatementOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + BatchExecuteStatementOutputTransformOutput::BatchExecuteStatementOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for BatchExecuteStatementOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchExecuteStatementOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchExecuteStatementOutputTransformOutput::BatchExecuteStatementOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchExecuteStatementOutputTransformOutput.BatchExecuteStatementOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchExecuteStatementOutputTransformOutput {} + + impl Hash + for BatchExecuteStatementOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchExecuteStatementOutputTransformOutput::BatchExecuteStatementOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for BatchExecuteStatementOutputTransformOutput { + fn default() -> BatchExecuteStatementOutputTransformOutput { + BatchExecuteStatementOutputTransformOutput::BatchExecuteStatementOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for BatchExecuteStatementOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchGetItemInputTransformInput { + BatchGetItemInputTransformInput { + sdkInput: Rc + } + } + + impl BatchGetItemInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + BatchGetItemInputTransformInput::BatchGetItemInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for BatchGetItemInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchGetItemInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchGetItemInputTransformInput::BatchGetItemInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchGetItemInputTransformInput.BatchGetItemInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchGetItemInputTransformInput {} + + impl Hash + for BatchGetItemInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchGetItemInputTransformInput::BatchGetItemInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for BatchGetItemInputTransformInput { + fn default() -> BatchGetItemInputTransformInput { + BatchGetItemInputTransformInput::BatchGetItemInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for BatchGetItemInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchGetItemInputTransformOutput { + BatchGetItemInputTransformOutput { + transformedInput: Rc + } + } + + impl BatchGetItemInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + BatchGetItemInputTransformOutput::BatchGetItemInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for BatchGetItemInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchGetItemInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchGetItemInputTransformOutput::BatchGetItemInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchGetItemInputTransformOutput.BatchGetItemInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchGetItemInputTransformOutput {} + + impl Hash + for BatchGetItemInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchGetItemInputTransformOutput::BatchGetItemInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for BatchGetItemInputTransformOutput { + fn default() -> BatchGetItemInputTransformOutput { + BatchGetItemInputTransformOutput::BatchGetItemInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for BatchGetItemInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchGetItemOutputTransformInput { + BatchGetItemOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl BatchGetItemOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + BatchGetItemOutputTransformInput::BatchGetItemOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + BatchGetItemOutputTransformInput::BatchGetItemOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for BatchGetItemOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchGetItemOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchGetItemOutputTransformInput::BatchGetItemOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchGetItemOutputTransformInput.BatchGetItemOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchGetItemOutputTransformInput {} + + impl Hash + for BatchGetItemOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchGetItemOutputTransformInput::BatchGetItemOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for BatchGetItemOutputTransformInput { + fn default() -> BatchGetItemOutputTransformInput { + BatchGetItemOutputTransformInput::BatchGetItemOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for BatchGetItemOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchGetItemOutputTransformOutput { + BatchGetItemOutputTransformOutput { + transformedOutput: Rc + } + } + + impl BatchGetItemOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + BatchGetItemOutputTransformOutput::BatchGetItemOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for BatchGetItemOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchGetItemOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchGetItemOutputTransformOutput::BatchGetItemOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchGetItemOutputTransformOutput.BatchGetItemOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchGetItemOutputTransformOutput {} + + impl Hash + for BatchGetItemOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchGetItemOutputTransformOutput::BatchGetItemOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for BatchGetItemOutputTransformOutput { + fn default() -> BatchGetItemOutputTransformOutput { + BatchGetItemOutputTransformOutput::BatchGetItemOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for BatchGetItemOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchWriteItemInputTransformInput { + BatchWriteItemInputTransformInput { + sdkInput: Rc + } + } + + impl BatchWriteItemInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + BatchWriteItemInputTransformInput::BatchWriteItemInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for BatchWriteItemInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchWriteItemInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchWriteItemInputTransformInput::BatchWriteItemInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchWriteItemInputTransformInput.BatchWriteItemInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchWriteItemInputTransformInput {} + + impl Hash + for BatchWriteItemInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchWriteItemInputTransformInput::BatchWriteItemInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for BatchWriteItemInputTransformInput { + fn default() -> BatchWriteItemInputTransformInput { + BatchWriteItemInputTransformInput::BatchWriteItemInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for BatchWriteItemInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchWriteItemInputTransformOutput { + BatchWriteItemInputTransformOutput { + transformedInput: Rc + } + } + + impl BatchWriteItemInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + BatchWriteItemInputTransformOutput::BatchWriteItemInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for BatchWriteItemInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchWriteItemInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchWriteItemInputTransformOutput::BatchWriteItemInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchWriteItemInputTransformOutput.BatchWriteItemInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchWriteItemInputTransformOutput {} + + impl Hash + for BatchWriteItemInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchWriteItemInputTransformOutput::BatchWriteItemInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for BatchWriteItemInputTransformOutput { + fn default() -> BatchWriteItemInputTransformOutput { + BatchWriteItemInputTransformOutput::BatchWriteItemInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for BatchWriteItemInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchWriteItemOutputTransformInput { + BatchWriteItemOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl BatchWriteItemOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + BatchWriteItemOutputTransformInput::BatchWriteItemOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + BatchWriteItemOutputTransformInput::BatchWriteItemOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for BatchWriteItemOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchWriteItemOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchWriteItemOutputTransformInput::BatchWriteItemOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchWriteItemOutputTransformInput.BatchWriteItemOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchWriteItemOutputTransformInput {} + + impl Hash + for BatchWriteItemOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchWriteItemOutputTransformInput::BatchWriteItemOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for BatchWriteItemOutputTransformInput { + fn default() -> BatchWriteItemOutputTransformInput { + BatchWriteItemOutputTransformInput::BatchWriteItemOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for BatchWriteItemOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BatchWriteItemOutputTransformOutput { + BatchWriteItemOutputTransformOutput { + transformedOutput: Rc + } + } + + impl BatchWriteItemOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + BatchWriteItemOutputTransformOutput::BatchWriteItemOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for BatchWriteItemOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BatchWriteItemOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BatchWriteItemOutputTransformOutput::BatchWriteItemOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.BatchWriteItemOutputTransformOutput.BatchWriteItemOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BatchWriteItemOutputTransformOutput {} + + impl Hash + for BatchWriteItemOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BatchWriteItemOutputTransformOutput::BatchWriteItemOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for BatchWriteItemOutputTransformOutput { + fn default() -> BatchWriteItemOutputTransformOutput { + BatchWriteItemOutputTransformOutput::BatchWriteItemOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for BatchWriteItemOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteItemInputTransformInput { + DeleteItemInputTransformInput { + sdkInput: Rc + } + } + + impl DeleteItemInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + DeleteItemInputTransformInput::DeleteItemInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for DeleteItemInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteItemInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteItemInputTransformInput::DeleteItemInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.DeleteItemInputTransformInput.DeleteItemInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteItemInputTransformInput {} + + impl Hash + for DeleteItemInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteItemInputTransformInput::DeleteItemInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for DeleteItemInputTransformInput { + fn default() -> DeleteItemInputTransformInput { + DeleteItemInputTransformInput::DeleteItemInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for DeleteItemInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteItemInputTransformOutput { + DeleteItemInputTransformOutput { + transformedInput: Rc + } + } + + impl DeleteItemInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + DeleteItemInputTransformOutput::DeleteItemInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for DeleteItemInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteItemInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteItemInputTransformOutput::DeleteItemInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.DeleteItemInputTransformOutput.DeleteItemInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteItemInputTransformOutput {} + + impl Hash + for DeleteItemInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteItemInputTransformOutput::DeleteItemInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for DeleteItemInputTransformOutput { + fn default() -> DeleteItemInputTransformOutput { + DeleteItemInputTransformOutput::DeleteItemInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for DeleteItemInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteItemOutputTransformInput { + DeleteItemOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl DeleteItemOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + DeleteItemOutputTransformInput::DeleteItemOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + DeleteItemOutputTransformInput::DeleteItemOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for DeleteItemOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteItemOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteItemOutputTransformInput::DeleteItemOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.DeleteItemOutputTransformInput.DeleteItemOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteItemOutputTransformInput {} + + impl Hash + for DeleteItemOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteItemOutputTransformInput::DeleteItemOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for DeleteItemOutputTransformInput { + fn default() -> DeleteItemOutputTransformInput { + DeleteItemOutputTransformInput::DeleteItemOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for DeleteItemOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DeleteItemOutputTransformOutput { + DeleteItemOutputTransformOutput { + transformedOutput: Rc + } + } + + impl DeleteItemOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + DeleteItemOutputTransformOutput::DeleteItemOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for DeleteItemOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DeleteItemOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DeleteItemOutputTransformOutput::DeleteItemOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.DeleteItemOutputTransformOutput.DeleteItemOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DeleteItemOutputTransformOutput {} + + impl Hash + for DeleteItemOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DeleteItemOutputTransformOutput::DeleteItemOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for DeleteItemOutputTransformOutput { + fn default() -> DeleteItemOutputTransformOutput { + DeleteItemOutputTransformOutput::DeleteItemOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for DeleteItemOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + pub struct IDynamoDbEncryptionTransformsClientCallHistory {} + + impl IDynamoDbEncryptionTransformsClientCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::transforms::internaldafny::types::IDynamoDbEncryptionTransformsClientCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IDynamoDbEncryptionTransformsClient: Any + UpcastObject { + fn PutItemInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn PutItemOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn GetItemInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn GetItemOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn BatchWriteItemInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn BatchWriteItemOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn BatchGetItemInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn BatchGetItemOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn ScanInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn ScanOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn QueryInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn QueryOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn TransactWriteItemsInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn TransactWriteItemsOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn UpdateItemInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn UpdateItemOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn DeleteItemInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn DeleteItemOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn TransactGetItemsInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn TransactGetItemsOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn ExecuteStatementInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn ExecuteStatementOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn BatchExecuteStatementInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn BatchExecuteStatementOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn ExecuteTransactionInputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn ExecuteTransactionOutputTransform(&self, input: &Rc) -> Rc, Rc>>; + fn ResolveAttributes(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum ExecuteStatementInputTransformInput { + ExecuteStatementInputTransformInput { + sdkInput: Rc + } + } + + impl ExecuteStatementInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + ExecuteStatementInputTransformInput::ExecuteStatementInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for ExecuteStatementInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteStatementInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteStatementInputTransformInput::ExecuteStatementInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ExecuteStatementInputTransformInput.ExecuteStatementInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteStatementInputTransformInput {} + + impl Hash + for ExecuteStatementInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteStatementInputTransformInput::ExecuteStatementInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for ExecuteStatementInputTransformInput { + fn default() -> ExecuteStatementInputTransformInput { + ExecuteStatementInputTransformInput::ExecuteStatementInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for ExecuteStatementInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExecuteStatementInputTransformOutput { + ExecuteStatementInputTransformOutput { + transformedInput: Rc + } + } + + impl ExecuteStatementInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + ExecuteStatementInputTransformOutput::ExecuteStatementInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for ExecuteStatementInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteStatementInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteStatementInputTransformOutput::ExecuteStatementInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ExecuteStatementInputTransformOutput.ExecuteStatementInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteStatementInputTransformOutput {} + + impl Hash + for ExecuteStatementInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteStatementInputTransformOutput::ExecuteStatementInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for ExecuteStatementInputTransformOutput { + fn default() -> ExecuteStatementInputTransformOutput { + ExecuteStatementInputTransformOutput::ExecuteStatementInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for ExecuteStatementInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExecuteStatementOutputTransformInput { + ExecuteStatementOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl ExecuteStatementOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + ExecuteStatementOutputTransformInput::ExecuteStatementOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + ExecuteStatementOutputTransformInput::ExecuteStatementOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for ExecuteStatementOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteStatementOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteStatementOutputTransformInput::ExecuteStatementOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ExecuteStatementOutputTransformInput.ExecuteStatementOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteStatementOutputTransformInput {} + + impl Hash + for ExecuteStatementOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteStatementOutputTransformInput::ExecuteStatementOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for ExecuteStatementOutputTransformInput { + fn default() -> ExecuteStatementOutputTransformInput { + ExecuteStatementOutputTransformInput::ExecuteStatementOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for ExecuteStatementOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExecuteStatementOutputTransformOutput { + ExecuteStatementOutputTransformOutput { + transformedOutput: Rc + } + } + + impl ExecuteStatementOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + ExecuteStatementOutputTransformOutput::ExecuteStatementOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for ExecuteStatementOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteStatementOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteStatementOutputTransformOutput::ExecuteStatementOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ExecuteStatementOutputTransformOutput.ExecuteStatementOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteStatementOutputTransformOutput {} + + impl Hash + for ExecuteStatementOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteStatementOutputTransformOutput::ExecuteStatementOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for ExecuteStatementOutputTransformOutput { + fn default() -> ExecuteStatementOutputTransformOutput { + ExecuteStatementOutputTransformOutput::ExecuteStatementOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for ExecuteStatementOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExecuteTransactionInputTransformInput { + ExecuteTransactionInputTransformInput { + sdkInput: Rc + } + } + + impl ExecuteTransactionInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + ExecuteTransactionInputTransformInput::ExecuteTransactionInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for ExecuteTransactionInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteTransactionInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteTransactionInputTransformInput::ExecuteTransactionInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ExecuteTransactionInputTransformInput.ExecuteTransactionInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteTransactionInputTransformInput {} + + impl Hash + for ExecuteTransactionInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteTransactionInputTransformInput::ExecuteTransactionInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for ExecuteTransactionInputTransformInput { + fn default() -> ExecuteTransactionInputTransformInput { + ExecuteTransactionInputTransformInput::ExecuteTransactionInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for ExecuteTransactionInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExecuteTransactionInputTransformOutput { + ExecuteTransactionInputTransformOutput { + transformedInput: Rc + } + } + + impl ExecuteTransactionInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + ExecuteTransactionInputTransformOutput::ExecuteTransactionInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for ExecuteTransactionInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteTransactionInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteTransactionInputTransformOutput::ExecuteTransactionInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ExecuteTransactionInputTransformOutput.ExecuteTransactionInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteTransactionInputTransformOutput {} + + impl Hash + for ExecuteTransactionInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteTransactionInputTransformOutput::ExecuteTransactionInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for ExecuteTransactionInputTransformOutput { + fn default() -> ExecuteTransactionInputTransformOutput { + ExecuteTransactionInputTransformOutput::ExecuteTransactionInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for ExecuteTransactionInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExecuteTransactionOutputTransformInput { + ExecuteTransactionOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl ExecuteTransactionOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + ExecuteTransactionOutputTransformInput::ExecuteTransactionOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + ExecuteTransactionOutputTransformInput::ExecuteTransactionOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for ExecuteTransactionOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteTransactionOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteTransactionOutputTransformInput::ExecuteTransactionOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ExecuteTransactionOutputTransformInput.ExecuteTransactionOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteTransactionOutputTransformInput {} + + impl Hash + for ExecuteTransactionOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteTransactionOutputTransformInput::ExecuteTransactionOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for ExecuteTransactionOutputTransformInput { + fn default() -> ExecuteTransactionOutputTransformInput { + ExecuteTransactionOutputTransformInput::ExecuteTransactionOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for ExecuteTransactionOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ExecuteTransactionOutputTransformOutput { + ExecuteTransactionOutputTransformOutput { + transformedOutput: Rc + } + } + + impl ExecuteTransactionOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + ExecuteTransactionOutputTransformOutput::ExecuteTransactionOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for ExecuteTransactionOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ExecuteTransactionOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ExecuteTransactionOutputTransformOutput::ExecuteTransactionOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ExecuteTransactionOutputTransformOutput.ExecuteTransactionOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ExecuteTransactionOutputTransformOutput {} + + impl Hash + for ExecuteTransactionOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ExecuteTransactionOutputTransformOutput::ExecuteTransactionOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for ExecuteTransactionOutputTransformOutput { + fn default() -> ExecuteTransactionOutputTransformOutput { + ExecuteTransactionOutputTransformOutput::ExecuteTransactionOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for ExecuteTransactionOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetItemInputTransformInput { + GetItemInputTransformInput { + sdkInput: Rc + } + } + + impl GetItemInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + GetItemInputTransformInput::GetItemInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for GetItemInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetItemInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetItemInputTransformInput::GetItemInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.GetItemInputTransformInput.GetItemInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetItemInputTransformInput {} + + impl Hash + for GetItemInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetItemInputTransformInput::GetItemInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for GetItemInputTransformInput { + fn default() -> GetItemInputTransformInput { + GetItemInputTransformInput::GetItemInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for GetItemInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetItemInputTransformOutput { + GetItemInputTransformOutput { + transformedInput: Rc + } + } + + impl GetItemInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + GetItemInputTransformOutput::GetItemInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for GetItemInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetItemInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetItemInputTransformOutput::GetItemInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.GetItemInputTransformOutput.GetItemInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetItemInputTransformOutput {} + + impl Hash + for GetItemInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetItemInputTransformOutput::GetItemInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for GetItemInputTransformOutput { + fn default() -> GetItemInputTransformOutput { + GetItemInputTransformOutput::GetItemInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for GetItemInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetItemOutputTransformInput { + GetItemOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl GetItemOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + GetItemOutputTransformInput::GetItemOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + GetItemOutputTransformInput::GetItemOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for GetItemOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetItemOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetItemOutputTransformInput::GetItemOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.GetItemOutputTransformInput.GetItemOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetItemOutputTransformInput {} + + impl Hash + for GetItemOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetItemOutputTransformInput::GetItemOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for GetItemOutputTransformInput { + fn default() -> GetItemOutputTransformInput { + GetItemOutputTransformInput::GetItemOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for GetItemOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetItemOutputTransformOutput { + GetItemOutputTransformOutput { + transformedOutput: Rc + } + } + + impl GetItemOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + GetItemOutputTransformOutput::GetItemOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for GetItemOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetItemOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetItemOutputTransformOutput::GetItemOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.GetItemOutputTransformOutput.GetItemOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetItemOutputTransformOutput {} + + impl Hash + for GetItemOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetItemOutputTransformOutput::GetItemOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for GetItemOutputTransformOutput { + fn default() -> GetItemOutputTransformOutput { + GetItemOutputTransformOutput::GetItemOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for GetItemOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PutItemInputTransformInput { + PutItemInputTransformInput { + sdkInput: Rc + } + } + + impl PutItemInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + PutItemInputTransformInput::PutItemInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for PutItemInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PutItemInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PutItemInputTransformInput::PutItemInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.PutItemInputTransformInput.PutItemInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PutItemInputTransformInput {} + + impl Hash + for PutItemInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PutItemInputTransformInput::PutItemInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for PutItemInputTransformInput { + fn default() -> PutItemInputTransformInput { + PutItemInputTransformInput::PutItemInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for PutItemInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PutItemInputTransformOutput { + PutItemInputTransformOutput { + transformedInput: Rc + } + } + + impl PutItemInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + PutItemInputTransformOutput::PutItemInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for PutItemInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PutItemInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PutItemInputTransformOutput::PutItemInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.PutItemInputTransformOutput.PutItemInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PutItemInputTransformOutput {} + + impl Hash + for PutItemInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PutItemInputTransformOutput::PutItemInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for PutItemInputTransformOutput { + fn default() -> PutItemInputTransformOutput { + PutItemInputTransformOutput::PutItemInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for PutItemInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PutItemOutputTransformInput { + PutItemOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl PutItemOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + PutItemOutputTransformInput::PutItemOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + PutItemOutputTransformInput::PutItemOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for PutItemOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PutItemOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PutItemOutputTransformInput::PutItemOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.PutItemOutputTransformInput.PutItemOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PutItemOutputTransformInput {} + + impl Hash + for PutItemOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PutItemOutputTransformInput::PutItemOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for PutItemOutputTransformInput { + fn default() -> PutItemOutputTransformInput { + PutItemOutputTransformInput::PutItemOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for PutItemOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PutItemOutputTransformOutput { + PutItemOutputTransformOutput { + transformedOutput: Rc + } + } + + impl PutItemOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + PutItemOutputTransformOutput::PutItemOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for PutItemOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PutItemOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PutItemOutputTransformOutput::PutItemOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.PutItemOutputTransformOutput.PutItemOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PutItemOutputTransformOutput {} + + impl Hash + for PutItemOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PutItemOutputTransformOutput::PutItemOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for PutItemOutputTransformOutput { + fn default() -> PutItemOutputTransformOutput { + PutItemOutputTransformOutput::PutItemOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for PutItemOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum QueryInputTransformInput { + QueryInputTransformInput { + sdkInput: Rc + } + } + + impl QueryInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + QueryInputTransformInput::QueryInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for QueryInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for QueryInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + QueryInputTransformInput::QueryInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.QueryInputTransformInput.QueryInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for QueryInputTransformInput {} + + impl Hash + for QueryInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + QueryInputTransformInput::QueryInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for QueryInputTransformInput { + fn default() -> QueryInputTransformInput { + QueryInputTransformInput::QueryInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for QueryInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum QueryInputTransformOutput { + QueryInputTransformOutput { + transformedInput: Rc + } + } + + impl QueryInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + QueryInputTransformOutput::QueryInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for QueryInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for QueryInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + QueryInputTransformOutput::QueryInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.QueryInputTransformOutput.QueryInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for QueryInputTransformOutput {} + + impl Hash + for QueryInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + QueryInputTransformOutput::QueryInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for QueryInputTransformOutput { + fn default() -> QueryInputTransformOutput { + QueryInputTransformOutput::QueryInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for QueryInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum QueryOutputTransformInput { + QueryOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl QueryOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + QueryOutputTransformInput::QueryOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + QueryOutputTransformInput::QueryOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for QueryOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for QueryOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + QueryOutputTransformInput::QueryOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.QueryOutputTransformInput.QueryOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for QueryOutputTransformInput {} + + impl Hash + for QueryOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + QueryOutputTransformInput::QueryOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for QueryOutputTransformInput { + fn default() -> QueryOutputTransformInput { + QueryOutputTransformInput::QueryOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for QueryOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum QueryOutputTransformOutput { + QueryOutputTransformOutput { + transformedOutput: Rc + } + } + + impl QueryOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + QueryOutputTransformOutput::QueryOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for QueryOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for QueryOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + QueryOutputTransformOutput::QueryOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.QueryOutputTransformOutput.QueryOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for QueryOutputTransformOutput {} + + impl Hash + for QueryOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + QueryOutputTransformOutput::QueryOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for QueryOutputTransformOutput { + fn default() -> QueryOutputTransformOutput { + QueryOutputTransformOutput::QueryOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for QueryOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ResolveAttributesInput { + ResolveAttributesInput { + TableName: Sequence, + Item: Map, Rc>, + Version: Rc> + } + } + + impl ResolveAttributesInput { + pub fn TableName(&self) -> &Sequence { + match self { + ResolveAttributesInput::ResolveAttributesInput{TableName, Item, Version, } => TableName, + } + } + pub fn Item(&self) -> &Map, Rc> { + match self { + ResolveAttributesInput::ResolveAttributesInput{TableName, Item, Version, } => Item, + } + } + pub fn Version(&self) -> &Rc> { + match self { + ResolveAttributesInput::ResolveAttributesInput{TableName, Item, Version, } => Version, + } + } + } + + impl Debug + for ResolveAttributesInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ResolveAttributesInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ResolveAttributesInput::ResolveAttributesInput{TableName, Item, Version, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ResolveAttributesInput.ResolveAttributesInput(")?; + DafnyPrint::fmt_print(TableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Item, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(Version, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ResolveAttributesInput {} + + impl Hash + for ResolveAttributesInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ResolveAttributesInput::ResolveAttributesInput{TableName, Item, Version, } => { + Hash::hash(TableName, _state); + Hash::hash(Item, _state); + Hash::hash(Version, _state) + }, + } + } + } + + impl Default + for ResolveAttributesInput { + fn default() -> ResolveAttributesInput { + ResolveAttributesInput::ResolveAttributesInput { + TableName: Default::default(), + Item: Default::default(), + Version: Default::default() + } + } + } + + impl AsRef + for ResolveAttributesInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ResolveAttributesOutput { + ResolveAttributesOutput { + VirtualFields: Map, Sequence>, + CompoundBeacons: Map, Sequence> + } + } + + impl ResolveAttributesOutput { + pub fn VirtualFields(&self) -> &Map, Sequence> { + match self { + ResolveAttributesOutput::ResolveAttributesOutput{VirtualFields, CompoundBeacons, } => VirtualFields, + } + } + pub fn CompoundBeacons(&self) -> &Map, Sequence> { + match self { + ResolveAttributesOutput::ResolveAttributesOutput{VirtualFields, CompoundBeacons, } => CompoundBeacons, + } + } + } + + impl Debug + for ResolveAttributesOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ResolveAttributesOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ResolveAttributesOutput::ResolveAttributesOutput{VirtualFields, CompoundBeacons, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ResolveAttributesOutput.ResolveAttributesOutput(")?; + DafnyPrint::fmt_print(VirtualFields, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(CompoundBeacons, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ResolveAttributesOutput {} + + impl Hash + for ResolveAttributesOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ResolveAttributesOutput::ResolveAttributesOutput{VirtualFields, CompoundBeacons, } => { + Hash::hash(VirtualFields, _state); + Hash::hash(CompoundBeacons, _state) + }, + } + } + } + + impl Default + for ResolveAttributesOutput { + fn default() -> ResolveAttributesOutput { + ResolveAttributesOutput::ResolveAttributesOutput { + VirtualFields: Default::default(), + CompoundBeacons: Default::default() + } + } + } + + impl AsRef + for ResolveAttributesOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ScanInputTransformInput { + ScanInputTransformInput { + sdkInput: Rc + } + } + + impl ScanInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + ScanInputTransformInput::ScanInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for ScanInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ScanInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ScanInputTransformInput::ScanInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ScanInputTransformInput.ScanInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ScanInputTransformInput {} + + impl Hash + for ScanInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ScanInputTransformInput::ScanInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for ScanInputTransformInput { + fn default() -> ScanInputTransformInput { + ScanInputTransformInput::ScanInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for ScanInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ScanInputTransformOutput { + ScanInputTransformOutput { + transformedInput: Rc + } + } + + impl ScanInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + ScanInputTransformOutput::ScanInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for ScanInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ScanInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ScanInputTransformOutput::ScanInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ScanInputTransformOutput.ScanInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ScanInputTransformOutput {} + + impl Hash + for ScanInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ScanInputTransformOutput::ScanInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for ScanInputTransformOutput { + fn default() -> ScanInputTransformOutput { + ScanInputTransformOutput::ScanInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for ScanInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ScanOutputTransformInput { + ScanOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl ScanOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + ScanOutputTransformInput::ScanOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + ScanOutputTransformInput::ScanOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for ScanOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ScanOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ScanOutputTransformInput::ScanOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ScanOutputTransformInput.ScanOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ScanOutputTransformInput {} + + impl Hash + for ScanOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ScanOutputTransformInput::ScanOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for ScanOutputTransformInput { + fn default() -> ScanOutputTransformInput { + ScanOutputTransformInput::ScanOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for ScanOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ScanOutputTransformOutput { + ScanOutputTransformOutput { + transformedOutput: Rc + } + } + + impl ScanOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + ScanOutputTransformOutput::ScanOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for ScanOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ScanOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ScanOutputTransformOutput::ScanOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.ScanOutputTransformOutput.ScanOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ScanOutputTransformOutput {} + + impl Hash + for ScanOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ScanOutputTransformOutput::ScanOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for ScanOutputTransformOutput { + fn default() -> ScanOutputTransformOutput { + ScanOutputTransformOutput::ScanOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for ScanOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum TransactGetItemsInputTransformInput { + TransactGetItemsInputTransformInput { + sdkInput: Rc + } + } + + impl TransactGetItemsInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + TransactGetItemsInputTransformInput::TransactGetItemsInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for TransactGetItemsInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for TransactGetItemsInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + TransactGetItemsInputTransformInput::TransactGetItemsInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.TransactGetItemsInputTransformInput.TransactGetItemsInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for TransactGetItemsInputTransformInput {} + + impl Hash + for TransactGetItemsInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + TransactGetItemsInputTransformInput::TransactGetItemsInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for TransactGetItemsInputTransformInput { + fn default() -> TransactGetItemsInputTransformInput { + TransactGetItemsInputTransformInput::TransactGetItemsInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for TransactGetItemsInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum TransactGetItemsInputTransformOutput { + TransactGetItemsInputTransformOutput { + transformedInput: Rc + } + } + + impl TransactGetItemsInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + TransactGetItemsInputTransformOutput::TransactGetItemsInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for TransactGetItemsInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for TransactGetItemsInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + TransactGetItemsInputTransformOutput::TransactGetItemsInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.TransactGetItemsInputTransformOutput.TransactGetItemsInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for TransactGetItemsInputTransformOutput {} + + impl Hash + for TransactGetItemsInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + TransactGetItemsInputTransformOutput::TransactGetItemsInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for TransactGetItemsInputTransformOutput { + fn default() -> TransactGetItemsInputTransformOutput { + TransactGetItemsInputTransformOutput::TransactGetItemsInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for TransactGetItemsInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum TransactGetItemsOutputTransformInput { + TransactGetItemsOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl TransactGetItemsOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + TransactGetItemsOutputTransformInput::TransactGetItemsOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + TransactGetItemsOutputTransformInput::TransactGetItemsOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for TransactGetItemsOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for TransactGetItemsOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + TransactGetItemsOutputTransformInput::TransactGetItemsOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.TransactGetItemsOutputTransformInput.TransactGetItemsOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for TransactGetItemsOutputTransformInput {} + + impl Hash + for TransactGetItemsOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + TransactGetItemsOutputTransformInput::TransactGetItemsOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for TransactGetItemsOutputTransformInput { + fn default() -> TransactGetItemsOutputTransformInput { + TransactGetItemsOutputTransformInput::TransactGetItemsOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for TransactGetItemsOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum TransactGetItemsOutputTransformOutput { + TransactGetItemsOutputTransformOutput { + transformedOutput: Rc + } + } + + impl TransactGetItemsOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + TransactGetItemsOutputTransformOutput::TransactGetItemsOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for TransactGetItemsOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for TransactGetItemsOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + TransactGetItemsOutputTransformOutput::TransactGetItemsOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.TransactGetItemsOutputTransformOutput.TransactGetItemsOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for TransactGetItemsOutputTransformOutput {} + + impl Hash + for TransactGetItemsOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + TransactGetItemsOutputTransformOutput::TransactGetItemsOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for TransactGetItemsOutputTransformOutput { + fn default() -> TransactGetItemsOutputTransformOutput { + TransactGetItemsOutputTransformOutput::TransactGetItemsOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for TransactGetItemsOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum TransactWriteItemsInputTransformInput { + TransactWriteItemsInputTransformInput { + sdkInput: Rc + } + } + + impl TransactWriteItemsInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + TransactWriteItemsInputTransformInput::TransactWriteItemsInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for TransactWriteItemsInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for TransactWriteItemsInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + TransactWriteItemsInputTransformInput::TransactWriteItemsInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.TransactWriteItemsInputTransformInput.TransactWriteItemsInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for TransactWriteItemsInputTransformInput {} + + impl Hash + for TransactWriteItemsInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + TransactWriteItemsInputTransformInput::TransactWriteItemsInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for TransactWriteItemsInputTransformInput { + fn default() -> TransactWriteItemsInputTransformInput { + TransactWriteItemsInputTransformInput::TransactWriteItemsInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for TransactWriteItemsInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum TransactWriteItemsInputTransformOutput { + TransactWriteItemsInputTransformOutput { + transformedInput: Rc + } + } + + impl TransactWriteItemsInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + TransactWriteItemsInputTransformOutput::TransactWriteItemsInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for TransactWriteItemsInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for TransactWriteItemsInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + TransactWriteItemsInputTransformOutput::TransactWriteItemsInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.TransactWriteItemsInputTransformOutput.TransactWriteItemsInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for TransactWriteItemsInputTransformOutput {} + + impl Hash + for TransactWriteItemsInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + TransactWriteItemsInputTransformOutput::TransactWriteItemsInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for TransactWriteItemsInputTransformOutput { + fn default() -> TransactWriteItemsInputTransformOutput { + TransactWriteItemsInputTransformOutput::TransactWriteItemsInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for TransactWriteItemsInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum TransactWriteItemsOutputTransformInput { + TransactWriteItemsOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl TransactWriteItemsOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + TransactWriteItemsOutputTransformInput::TransactWriteItemsOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + TransactWriteItemsOutputTransformInput::TransactWriteItemsOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for TransactWriteItemsOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for TransactWriteItemsOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + TransactWriteItemsOutputTransformInput::TransactWriteItemsOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.TransactWriteItemsOutputTransformInput.TransactWriteItemsOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for TransactWriteItemsOutputTransformInput {} + + impl Hash + for TransactWriteItemsOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + TransactWriteItemsOutputTransformInput::TransactWriteItemsOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for TransactWriteItemsOutputTransformInput { + fn default() -> TransactWriteItemsOutputTransformInput { + TransactWriteItemsOutputTransformInput::TransactWriteItemsOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for TransactWriteItemsOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum TransactWriteItemsOutputTransformOutput { + TransactWriteItemsOutputTransformOutput { + transformedOutput: Rc + } + } + + impl TransactWriteItemsOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + TransactWriteItemsOutputTransformOutput::TransactWriteItemsOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for TransactWriteItemsOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for TransactWriteItemsOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + TransactWriteItemsOutputTransformOutput::TransactWriteItemsOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.TransactWriteItemsOutputTransformOutput.TransactWriteItemsOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for TransactWriteItemsOutputTransformOutput {} + + impl Hash + for TransactWriteItemsOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + TransactWriteItemsOutputTransformOutput::TransactWriteItemsOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for TransactWriteItemsOutputTransformOutput { + fn default() -> TransactWriteItemsOutputTransformOutput { + TransactWriteItemsOutputTransformOutput::TransactWriteItemsOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for TransactWriteItemsOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum UpdateItemInputTransformInput { + UpdateItemInputTransformInput { + sdkInput: Rc + } + } + + impl UpdateItemInputTransformInput { + pub fn sdkInput(&self) -> &Rc { + match self { + UpdateItemInputTransformInput::UpdateItemInputTransformInput{sdkInput, } => sdkInput, + } + } + } + + impl Debug + for UpdateItemInputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for UpdateItemInputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + UpdateItemInputTransformInput::UpdateItemInputTransformInput{sdkInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.UpdateItemInputTransformInput.UpdateItemInputTransformInput(")?; + DafnyPrint::fmt_print(sdkInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for UpdateItemInputTransformInput {} + + impl Hash + for UpdateItemInputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + UpdateItemInputTransformInput::UpdateItemInputTransformInput{sdkInput, } => { + Hash::hash(sdkInput, _state) + }, + } + } + } + + impl Default + for UpdateItemInputTransformInput { + fn default() -> UpdateItemInputTransformInput { + UpdateItemInputTransformInput::UpdateItemInputTransformInput { + sdkInput: Default::default() + } + } + } + + impl AsRef + for UpdateItemInputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum UpdateItemInputTransformOutput { + UpdateItemInputTransformOutput { + transformedInput: Rc + } + } + + impl UpdateItemInputTransformOutput { + pub fn transformedInput(&self) -> &Rc { + match self { + UpdateItemInputTransformOutput::UpdateItemInputTransformOutput{transformedInput, } => transformedInput, + } + } + } + + impl Debug + for UpdateItemInputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for UpdateItemInputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + UpdateItemInputTransformOutput::UpdateItemInputTransformOutput{transformedInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.UpdateItemInputTransformOutput.UpdateItemInputTransformOutput(")?; + DafnyPrint::fmt_print(transformedInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for UpdateItemInputTransformOutput {} + + impl Hash + for UpdateItemInputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + UpdateItemInputTransformOutput::UpdateItemInputTransformOutput{transformedInput, } => { + Hash::hash(transformedInput, _state) + }, + } + } + } + + impl Default + for UpdateItemInputTransformOutput { + fn default() -> UpdateItemInputTransformOutput { + UpdateItemInputTransformOutput::UpdateItemInputTransformOutput { + transformedInput: Default::default() + } + } + } + + impl AsRef + for UpdateItemInputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum UpdateItemOutputTransformInput { + UpdateItemOutputTransformInput { + sdkOutput: Rc, + originalInput: Rc + } + } + + impl UpdateItemOutputTransformInput { + pub fn sdkOutput(&self) -> &Rc { + match self { + UpdateItemOutputTransformInput::UpdateItemOutputTransformInput{sdkOutput, originalInput, } => sdkOutput, + } + } + pub fn originalInput(&self) -> &Rc { + match self { + UpdateItemOutputTransformInput::UpdateItemOutputTransformInput{sdkOutput, originalInput, } => originalInput, + } + } + } + + impl Debug + for UpdateItemOutputTransformInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for UpdateItemOutputTransformInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + UpdateItemOutputTransformInput::UpdateItemOutputTransformInput{sdkOutput, originalInput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.UpdateItemOutputTransformInput.UpdateItemOutputTransformInput(")?; + DafnyPrint::fmt_print(sdkOutput, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(originalInput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for UpdateItemOutputTransformInput {} + + impl Hash + for UpdateItemOutputTransformInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + UpdateItemOutputTransformInput::UpdateItemOutputTransformInput{sdkOutput, originalInput, } => { + Hash::hash(sdkOutput, _state); + Hash::hash(originalInput, _state) + }, + } + } + } + + impl Default + for UpdateItemOutputTransformInput { + fn default() -> UpdateItemOutputTransformInput { + UpdateItemOutputTransformInput::UpdateItemOutputTransformInput { + sdkOutput: Default::default(), + originalInput: Default::default() + } + } + } + + impl AsRef + for UpdateItemOutputTransformInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum UpdateItemOutputTransformOutput { + UpdateItemOutputTransformOutput { + transformedOutput: Rc + } + } + + impl UpdateItemOutputTransformOutput { + pub fn transformedOutput(&self) -> &Rc { + match self { + UpdateItemOutputTransformOutput::UpdateItemOutputTransformOutput{transformedOutput, } => transformedOutput, + } + } + } + + impl Debug + for UpdateItemOutputTransformOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for UpdateItemOutputTransformOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + UpdateItemOutputTransformOutput::UpdateItemOutputTransformOutput{transformedOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.UpdateItemOutputTransformOutput.UpdateItemOutputTransformOutput(")?; + DafnyPrint::fmt_print(transformedOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for UpdateItemOutputTransformOutput {} + + impl Hash + for UpdateItemOutputTransformOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + UpdateItemOutputTransformOutput::UpdateItemOutputTransformOutput{transformedOutput, } => { + Hash::hash(transformedOutput, _state) + }, + } + } + } + + impl Default + for UpdateItemOutputTransformOutput { + fn default() -> UpdateItemOutputTransformOutput { + UpdateItemOutputTransformOutput::UpdateItemOutputTransformOutput { + transformedOutput: Default::default() + } + } + } + + impl AsRef + for UpdateItemOutputTransformOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Error { + DynamoDbEncryptionTransformsException { + message: Sequence + }, + AwsCryptographyDbEncryptionSdkDynamoDb { + AwsCryptographyDbEncryptionSdkDynamoDb: Rc + }, + AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor { + AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor: Rc + }, + AwsCryptographyDbEncryptionSdkStructuredEncryption { + AwsCryptographyDbEncryptionSdkStructuredEncryption: Rc + }, + AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: Rc + }, + ComAmazonawsDynamodb { + ComAmazonawsDynamodb: Rc + }, + CollectionOfErrors { + list: Sequence>, + message: Sequence + }, + Opaque { + obj: Object + }, + OpaqueWithText { + obj: Object, + objMessage: Sequence + } + } + + impl Error { + pub fn message(&self) -> &Sequence { + match self { + Error::DynamoDbEncryptionTransformsException{message, } => message, + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor{AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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 AwsCryptographyDbEncryptionSdkDynamoDb(&self) -> &Rc { + match self { + Error::DynamoDbEncryptionTransformsException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => AwsCryptographyDbEncryptionSdkDynamoDb, + Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor{AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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 AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor(&self) -> &Rc { + match self { + Error::DynamoDbEncryptionTransformsException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor{AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, } => AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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 AwsCryptographyDbEncryptionSdkStructuredEncryption(&self) -> &Rc { + match self { + Error::DynamoDbEncryptionTransformsException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor{AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => AwsCryptographyDbEncryptionSdkStructuredEncryption, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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 AwsCryptographyMaterialProviders(&self) -> &Rc { + match self { + Error::DynamoDbEncryptionTransformsException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor{AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => AwsCryptographyMaterialProviders, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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::DynamoDbEncryptionTransformsException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor{AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => ComAmazonawsDynamodb, + 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::DynamoDbEncryptionTransformsException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor{AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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::DynamoDbEncryptionTransformsException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor{AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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::DynamoDbEncryptionTransformsException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor{AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => panic!("field does not exist on this variant"), + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => 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::DynamoDbEncryptionTransformsException{message, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error.DynamoDbEncryptionTransformsException(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error.AwsCryptographyDbEncryptionSdkDynamoDb(")?; + DafnyPrint::fmt_print(AwsCryptographyDbEncryptionSdkDynamoDb, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor{AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error.AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor(")?; + DafnyPrint::fmt_print(AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error.AwsCryptographyDbEncryptionSdkStructuredEncryption(")?; + DafnyPrint::fmt_print(AwsCryptographyDbEncryptionSdkStructuredEncryption, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error.AwsCryptographyMaterialProviders(")?; + DafnyPrint::fmt_print(AwsCryptographyMaterialProviders, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error.ComAmazonawsDynamodb(")?; + DafnyPrint::fmt_print(ComAmazonawsDynamodb, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::CollectionOfErrors{list, message, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.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.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error.Opaque(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::OpaqueWithText{obj, objMessage, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.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::DynamoDbEncryptionTransformsException{message, } => { + Hash::hash(message, _state) + }, + Error::AwsCryptographyDbEncryptionSdkDynamoDb{AwsCryptographyDbEncryptionSdkDynamoDb, } => { + Hash::hash(AwsCryptographyDbEncryptionSdkDynamoDb, _state) + }, + Error::AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor{AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, } => { + Hash::hash(AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor, _state) + }, + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => { + Hash::hash(AwsCryptographyDbEncryptionSdkStructuredEncryption, _state) + }, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => { + Hash::hash(AwsCryptographyMaterialProviders, _state) + }, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => { + Hash::hash(ComAmazonawsDynamodb, _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::DynamoDbEncryptionTransformsException { + 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 internaldafny { + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::DynamoDbEncryptionConfig; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Result; + pub use ::dafny_runtime::Object; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::Error; + pub use ::dafny_runtime::MaybePlacebo; + pub use crate::implementation_from_dafny::r#_AwsCryptographyDbEncryptionSdkDynamoDbOperations_Compile::Config; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbEncryptionClient; + 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::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::GetEncryptedDataKeyDescriptionOutput; + + pub struct _default {} + + impl _default { + pub fn DefaultDynamoDbEncryptionConfig() -> Rc { + Rc::new(DynamoDbEncryptionConfig::DynamoDbEncryptionConfig {}) + } + pub fn DynamoDbEncryption(config: &Rc) -> Rc, Rc>> { + let mut res = MaybePlacebo::, Rc>>>::new(); + let mut internalConfig: Rc = Rc::new(Config::Config {}); + let mut client = MaybePlacebo::>::new(); + let mut _nw0: Object = crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::DynamoDbEncryptionClient::_allocate_object(); + crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::DynamoDbEncryptionClient::_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 DynamoDbEncryptionClient { + pub r#__i_config: Rc + } + + impl DynamoDbEncryptionClient { + 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::dbencryptionsdk::dynamodb::internaldafny::DynamoDbEncryptionClient { + UpcastObjectFn!(dyn Any); + } + + impl IDynamoDbEncryptionClient + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::DynamoDbEncryptionClient { + fn CreateDynamoDbEncryptionBranchKeyIdSupplier(&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#_AwsCryptographyDbEncryptionSdkDynamoDbOperations_Compile::_default::CreateDynamoDbEncryptionBranchKeyIdSupplier(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn GetEncryptedDataKeyDescription(&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#_AwsCryptographyDbEncryptionSdkDynamoDbOperations_Compile::_default::GetEncryptedDataKeyDescription(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::DynamoDbEncryptionClient { + UpcastObjectFn!(dyn IDynamoDbEncryptionClient); + } + + pub mod types { + pub use ::dafny_runtime::truncate; + pub use ::dafny_runtime::int; + pub use ::dafny_runtime::Sequence; + pub use ::std::rc::Rc; + pub use ::dafny_runtime::DafnyCharUTF16; + 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 ::dafny_runtime::Object; + pub use crate::implementation_from_dafny::software::amazon::cryptography::keystore::internaldafny::types::IKeyStoreClient; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::IBranchKeyIdSupplier; + 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::rd; + pub use ::dafny_runtime::Map; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::CryptoAction; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeNameList; + 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::IKeyring; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager; + pub use crate::implementation_from_dafny::software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::CacheType; + + pub struct _default {} + + impl _default { + pub fn IsValid_BeaconBitLength(x: i32) -> bool { + !(x < truncate!(int!(1), i32)) && !(truncate!(int!(63), i32) < x) + } + pub fn IsValid_BeaconVersionList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) && !(int!(1) < x.cardinality()) + } + pub fn IsValid_Char(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) && !(int!(1) < x.cardinality()) + } + pub fn IsValid_CompoundBeaconList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_ConstructorList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_ConstructorPartList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_EncryptedPartsList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_Prefix(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_SignedPartsList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_StandardBeaconList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_TerminalLocation(x: &Sequence) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_VersionNumber(x: i32) -> bool { + !(x < truncate!(int!(1), i32)) + } + pub fn IsValid_VirtualFieldList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_VirtualPartList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + pub fn IsValid_VirtualTransformList(x: &Sequence>) -> bool { + !(x.cardinality() < int!(1)) + } + 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.dbencryptionsdk.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 AsSet { + AsSet {} + } + + impl AsSet {} + + impl Debug + for AsSet { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AsSet { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AsSet::AsSet{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.AsSet.AsSet")?; + Ok(()) + }, + } + } + } + + impl AsSet { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(AsSet::AsSet {})].iter() + } + } + + impl Eq + for AsSet {} + + impl Hash + for AsSet { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AsSet::AsSet{} => { + + }, + } + } + } + + impl Default + for AsSet { + fn default() -> AsSet { + AsSet::AsSet {} + } + } + + impl AsRef + for AsSet { + fn as_ref(&self) -> &Self { + self + } + } + + pub type BeaconBitLength = i32; + + #[derive(PartialEq, Clone)] + pub enum BeaconKeySource { + single { + single: Rc + }, + multi { + multi: Rc + } + } + + impl BeaconKeySource { + pub fn single(&self) -> &Rc { + match self { + BeaconKeySource::single{single, } => single, + BeaconKeySource::multi{multi, } => panic!("field does not exist on this variant"), + } + } + pub fn multi(&self) -> &Rc { + match self { + BeaconKeySource::single{single, } => panic!("field does not exist on this variant"), + BeaconKeySource::multi{multi, } => multi, + } + } + } + + impl Debug + for BeaconKeySource { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BeaconKeySource { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BeaconKeySource::single{single, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.BeaconKeySource.single(")?; + DafnyPrint::fmt_print(single, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + BeaconKeySource::multi{multi, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.BeaconKeySource.multi(")?; + DafnyPrint::fmt_print(multi, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BeaconKeySource {} + + impl Hash + for BeaconKeySource { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BeaconKeySource::single{single, } => { + Hash::hash(single, _state) + }, + BeaconKeySource::multi{multi, } => { + Hash::hash(multi, _state) + }, + } + } + } + + impl Default + for BeaconKeySource { + fn default() -> BeaconKeySource { + BeaconKeySource::single { + single: Default::default() + } + } + } + + impl AsRef + for BeaconKeySource { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BeaconStyle { + partOnly { + partOnly: Rc + }, + shared { + shared: Rc + }, + asSet { + asSet: Rc + }, + sharedSet { + sharedSet: Rc + } + } + + impl BeaconStyle { + pub fn partOnly(&self) -> &Rc { + match self { + BeaconStyle::partOnly{partOnly, } => partOnly, + BeaconStyle::shared{shared, } => panic!("field does not exist on this variant"), + BeaconStyle::asSet{asSet, } => panic!("field does not exist on this variant"), + BeaconStyle::sharedSet{sharedSet, } => panic!("field does not exist on this variant"), + } + } + pub fn shared(&self) -> &Rc { + match self { + BeaconStyle::partOnly{partOnly, } => panic!("field does not exist on this variant"), + BeaconStyle::shared{shared, } => shared, + BeaconStyle::asSet{asSet, } => panic!("field does not exist on this variant"), + BeaconStyle::sharedSet{sharedSet, } => panic!("field does not exist on this variant"), + } + } + pub fn asSet(&self) -> &Rc { + match self { + BeaconStyle::partOnly{partOnly, } => panic!("field does not exist on this variant"), + BeaconStyle::shared{shared, } => panic!("field does not exist on this variant"), + BeaconStyle::asSet{asSet, } => asSet, + BeaconStyle::sharedSet{sharedSet, } => panic!("field does not exist on this variant"), + } + } + pub fn sharedSet(&self) -> &Rc { + match self { + BeaconStyle::partOnly{partOnly, } => panic!("field does not exist on this variant"), + BeaconStyle::shared{shared, } => panic!("field does not exist on this variant"), + BeaconStyle::asSet{asSet, } => panic!("field does not exist on this variant"), + BeaconStyle::sharedSet{sharedSet, } => sharedSet, + } + } + } + + impl Debug + for BeaconStyle { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BeaconStyle { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BeaconStyle::partOnly{partOnly, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.BeaconStyle.partOnly(")?; + DafnyPrint::fmt_print(partOnly, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + BeaconStyle::shared{shared, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.BeaconStyle.shared(")?; + DafnyPrint::fmt_print(shared, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + BeaconStyle::asSet{asSet, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.BeaconStyle.asSet(")?; + DafnyPrint::fmt_print(asSet, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + BeaconStyle::sharedSet{sharedSet, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.BeaconStyle.sharedSet(")?; + DafnyPrint::fmt_print(sharedSet, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BeaconStyle {} + + impl Hash + for BeaconStyle { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BeaconStyle::partOnly{partOnly, } => { + Hash::hash(partOnly, _state) + }, + BeaconStyle::shared{shared, } => { + Hash::hash(shared, _state) + }, + BeaconStyle::asSet{asSet, } => { + Hash::hash(asSet, _state) + }, + BeaconStyle::sharedSet{sharedSet, } => { + Hash::hash(sharedSet, _state) + }, + } + } + } + + impl Default + for BeaconStyle { + fn default() -> BeaconStyle { + BeaconStyle::partOnly { + partOnly: Default::default() + } + } + } + + impl AsRef + for BeaconStyle { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum BeaconVersion { + BeaconVersion { + version: crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VersionNumber, + keyStore: Object, + keySource: Rc, + standardBeacons: crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::StandardBeaconList, + compoundBeacons: Rc>, + virtualFields: Rc>, + encryptedParts: Rc>, + signedParts: Rc> + } + } + + impl BeaconVersion { + pub fn version(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VersionNumber { + match self { + BeaconVersion::BeaconVersion{version, keyStore, keySource, standardBeacons, compoundBeacons, virtualFields, encryptedParts, signedParts, } => version, + } + } + pub fn keyStore(&self) -> &Object { + match self { + BeaconVersion::BeaconVersion{version, keyStore, keySource, standardBeacons, compoundBeacons, virtualFields, encryptedParts, signedParts, } => keyStore, + } + } + pub fn keySource(&self) -> &Rc { + match self { + BeaconVersion::BeaconVersion{version, keyStore, keySource, standardBeacons, compoundBeacons, virtualFields, encryptedParts, signedParts, } => keySource, + } + } + pub fn standardBeacons(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::StandardBeaconList { + match self { + BeaconVersion::BeaconVersion{version, keyStore, keySource, standardBeacons, compoundBeacons, virtualFields, encryptedParts, signedParts, } => standardBeacons, + } + } + pub fn compoundBeacons(&self) -> &Rc> { + match self { + BeaconVersion::BeaconVersion{version, keyStore, keySource, standardBeacons, compoundBeacons, virtualFields, encryptedParts, signedParts, } => compoundBeacons, + } + } + pub fn virtualFields(&self) -> &Rc> { + match self { + BeaconVersion::BeaconVersion{version, keyStore, keySource, standardBeacons, compoundBeacons, virtualFields, encryptedParts, signedParts, } => virtualFields, + } + } + pub fn encryptedParts(&self) -> &Rc> { + match self { + BeaconVersion::BeaconVersion{version, keyStore, keySource, standardBeacons, compoundBeacons, virtualFields, encryptedParts, signedParts, } => encryptedParts, + } + } + pub fn signedParts(&self) -> &Rc> { + match self { + BeaconVersion::BeaconVersion{version, keyStore, keySource, standardBeacons, compoundBeacons, virtualFields, encryptedParts, signedParts, } => signedParts, + } + } + } + + impl Debug + for BeaconVersion { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for BeaconVersion { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + BeaconVersion::BeaconVersion{version, keyStore, keySource, standardBeacons, compoundBeacons, virtualFields, encryptedParts, signedParts, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.BeaconVersion.BeaconVersion(")?; + DafnyPrint::fmt_print(version, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyStore, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keySource, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(standardBeacons, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(compoundBeacons, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(virtualFields, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptedParts, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(signedParts, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for BeaconVersion {} + + impl Hash + for BeaconVersion { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + BeaconVersion::BeaconVersion{version, keyStore, keySource, standardBeacons, compoundBeacons, virtualFields, encryptedParts, signedParts, } => { + Hash::hash(version, _state); + Hash::hash(keyStore, _state); + Hash::hash(keySource, _state); + Hash::hash(standardBeacons, _state); + Hash::hash(compoundBeacons, _state); + Hash::hash(virtualFields, _state); + Hash::hash(encryptedParts, _state); + Hash::hash(signedParts, _state) + }, + } + } + } + + impl Default + for BeaconVersion { + fn default() -> BeaconVersion { + BeaconVersion::BeaconVersion { + version: Default::default(), + keyStore: Default::default(), + keySource: Default::default(), + standardBeacons: Default::default(), + compoundBeacons: Default::default(), + virtualFields: Default::default(), + encryptedParts: Default::default(), + signedParts: Default::default() + } + } + } + + impl AsRef + for BeaconVersion { + fn as_ref(&self) -> &Self { + self + } + } + + pub type BeaconVersionList = Sequence>; + + pub type Char = Sequence; + + #[derive(PartialEq, Clone)] + pub enum CompoundBeacon { + CompoundBeacon { + name: Sequence, + split: Sequence, + encrypted: Rc>, + signed: Rc>, + constructors: Rc> + } + } + + impl CompoundBeacon { + pub fn name(&self) -> &Sequence { + match self { + CompoundBeacon::CompoundBeacon{name, split, encrypted, signed, constructors, } => name, + } + } + pub fn split(&self) -> &Sequence { + match self { + CompoundBeacon::CompoundBeacon{name, split, encrypted, signed, constructors, } => split, + } + } + pub fn encrypted(&self) -> &Rc> { + match self { + CompoundBeacon::CompoundBeacon{name, split, encrypted, signed, constructors, } => encrypted, + } + } + pub fn signed(&self) -> &Rc> { + match self { + CompoundBeacon::CompoundBeacon{name, split, encrypted, signed, constructors, } => signed, + } + } + pub fn constructors(&self) -> &Rc> { + match self { + CompoundBeacon::CompoundBeacon{name, split, encrypted, signed, constructors, } => constructors, + } + } + } + + impl Debug + for CompoundBeacon { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CompoundBeacon { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CompoundBeacon::CompoundBeacon{name, split, encrypted, signed, constructors, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.CompoundBeacon.CompoundBeacon(")?; + DafnyPrint::fmt_print(name, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(split, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encrypted, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(signed, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(constructors, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CompoundBeacon {} + + impl Hash + for CompoundBeacon { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CompoundBeacon::CompoundBeacon{name, split, encrypted, signed, constructors, } => { + Hash::hash(name, _state); + Hash::hash(split, _state); + Hash::hash(encrypted, _state); + Hash::hash(signed, _state); + Hash::hash(constructors, _state) + }, + } + } + } + + impl Default + for CompoundBeacon { + fn default() -> CompoundBeacon { + CompoundBeacon::CompoundBeacon { + name: Default::default(), + split: Default::default(), + encrypted: Default::default(), + signed: Default::default(), + constructors: Default::default() + } + } + } + + impl AsRef + for CompoundBeacon { + fn as_ref(&self) -> &Self { + self + } + } + + pub type CompoundBeaconList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum Constructor { + Constructor { + parts: crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::ConstructorPartList + } + } + + impl Constructor { + pub fn parts(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::ConstructorPartList { + match self { + Constructor::Constructor{parts, } => parts, + } + } + } + + impl Debug + for Constructor { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Constructor { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Constructor::Constructor{parts, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Constructor.Constructor(")?; + DafnyPrint::fmt_print(parts, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Constructor {} + + impl Hash + for Constructor { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Constructor::Constructor{parts, } => { + Hash::hash(parts, _state) + }, + } + } + } + + impl Default + for Constructor { + fn default() -> Constructor { + Constructor::Constructor { + parts: Default::default() + } + } + } + + impl AsRef + for Constructor { + fn as_ref(&self) -> &Self { + self + } + } + + pub type ConstructorList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum ConstructorPart { + ConstructorPart { + name: Sequence, + required: bool + } + } + + impl ConstructorPart { + pub fn name(&self) -> &Sequence { + match self { + ConstructorPart::ConstructorPart{name, required, } => name, + } + } + pub fn required(&self) -> &bool { + match self { + ConstructorPart::ConstructorPart{name, required, } => required, + } + } + } + + impl Debug + for ConstructorPart { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ConstructorPart { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ConstructorPart::ConstructorPart{name, required, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.ConstructorPart.ConstructorPart(")?; + DafnyPrint::fmt_print(name, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(required, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ConstructorPart {} + + impl Hash + for ConstructorPart { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ConstructorPart::ConstructorPart{name, required, } => { + Hash::hash(name, _state); + Hash::hash(required, _state) + }, + } + } + } + + impl Default + for ConstructorPart { + fn default() -> ConstructorPart { + ConstructorPart::ConstructorPart { + name: Default::default(), + required: Default::default() + } + } + } + + impl AsRef + for ConstructorPart { + fn as_ref(&self) -> &Self { + self + } + } + + pub type ConstructorPartList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + ddbKeyBranchKeyIdSupplier: Object + } + } + + impl CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + pub fn ddbKeyBranchKeyIdSupplier(&self) -> &Object { + match self { + CreateDynamoDbEncryptionBranchKeyIdSupplierInput::CreateDynamoDbEncryptionBranchKeyIdSupplierInput{ddbKeyBranchKeyIdSupplier, } => ddbKeyBranchKeyIdSupplier, + } + } + } + + impl Debug + for CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateDynamoDbEncryptionBranchKeyIdSupplierInput::CreateDynamoDbEncryptionBranchKeyIdSupplierInput{ddbKeyBranchKeyIdSupplier, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.CreateDynamoDbEncryptionBranchKeyIdSupplierInput.CreateDynamoDbEncryptionBranchKeyIdSupplierInput(")?; + DafnyPrint::fmt_print(ddbKeyBranchKeyIdSupplier, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateDynamoDbEncryptionBranchKeyIdSupplierInput {} + + impl Hash + for CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateDynamoDbEncryptionBranchKeyIdSupplierInput::CreateDynamoDbEncryptionBranchKeyIdSupplierInput{ddbKeyBranchKeyIdSupplier, } => { + Hash::hash(ddbKeyBranchKeyIdSupplier, _state) + }, + } + } + } + + impl Default + for CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + fn default() -> CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + CreateDynamoDbEncryptionBranchKeyIdSupplierInput::CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + ddbKeyBranchKeyIdSupplier: Default::default() + } + } + } + + impl AsRef + for CreateDynamoDbEncryptionBranchKeyIdSupplierInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + branchKeyIdSupplier: Object + } + } + + impl CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + pub fn branchKeyIdSupplier(&self) -> &Object { + match self { + CreateDynamoDbEncryptionBranchKeyIdSupplierOutput::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput{branchKeyIdSupplier, } => branchKeyIdSupplier, + } + } + } + + impl Debug + for CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CreateDynamoDbEncryptionBranchKeyIdSupplierOutput::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput{branchKeyIdSupplier, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.CreateDynamoDbEncryptionBranchKeyIdSupplierOutput.CreateDynamoDbEncryptionBranchKeyIdSupplierOutput(")?; + DafnyPrint::fmt_print(branchKeyIdSupplier, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CreateDynamoDbEncryptionBranchKeyIdSupplierOutput {} + + impl Hash + for CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CreateDynamoDbEncryptionBranchKeyIdSupplierOutput::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput{branchKeyIdSupplier, } => { + Hash::hash(branchKeyIdSupplier, _state) + }, + } + } + } + + impl Default + for CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + fn default() -> CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + CreateDynamoDbEncryptionBranchKeyIdSupplierOutput::CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + branchKeyIdSupplier: Default::default() + } + } + } + + impl AsRef + for CreateDynamoDbEncryptionBranchKeyIdSupplierOutput { + fn as_ref(&self) -> &Self { + self + } + } + + pub struct IDynamoDbEncryptionClientCallHistory {} + + impl IDynamoDbEncryptionClientCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbEncryptionClientCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IDynamoDbEncryptionClient: Any + UpcastObject { + fn CreateDynamoDbEncryptionBranchKeyIdSupplier(&self, input: &Rc) -> Rc, Rc>>; + fn GetEncryptedDataKeyDescription(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum DynamoDbEncryptionConfig { + DynamoDbEncryptionConfig {} + } + + impl DynamoDbEncryptionConfig {} + + impl Debug + for DynamoDbEncryptionConfig { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DynamoDbEncryptionConfig { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DynamoDbEncryptionConfig::DynamoDbEncryptionConfig{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.DynamoDbEncryptionConfig.DynamoDbEncryptionConfig")?; + Ok(()) + }, + } + } + } + + impl DynamoDbEncryptionConfig { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(DynamoDbEncryptionConfig::DynamoDbEncryptionConfig {})].iter() + } + } + + impl Eq + for DynamoDbEncryptionConfig {} + + impl Hash + for DynamoDbEncryptionConfig { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DynamoDbEncryptionConfig::DynamoDbEncryptionConfig{} => { + + }, + } + } + } + + impl Default + for DynamoDbEncryptionConfig { + fn default() -> DynamoDbEncryptionConfig { + DynamoDbEncryptionConfig::DynamoDbEncryptionConfig {} + } + } + + impl AsRef + for DynamoDbEncryptionConfig { + fn as_ref(&self) -> &Self { + self + } + } + + pub struct IDynamoDbKeyBranchKeyIdSupplierCallHistory {} + + impl IDynamoDbKeyBranchKeyIdSupplierCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbKeyBranchKeyIdSupplierCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IDynamoDbKeyBranchKeyIdSupplier: Any + UpcastObject { + fn GetBranchKeyIdFromDdbKey(&self, input: &Rc) -> Rc, Rc>> { + let mut output = MaybePlacebo::, Rc>>>::new(); + let mut _out0 = MaybePlacebo::, Rc>>>::new(); + _out0 = MaybePlacebo::from(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::IDynamoDbKeyBranchKeyIdSupplier::r#_GetBranchKeyIdFromDdbKey_k(rd!(Object::<_>::from_ref(self)), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn r#_GetBranchKeyIdFromDdbKey_k(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum DynamoDbTableEncryptionConfig { + DynamoDbTableEncryptionConfig { + logicalTableName: Sequence, + partitionKeyName: Sequence, + sortKeyName: Rc>>, + search: Rc>>, + attributeActionsOnEncrypt: Map, Rc>, + allowedUnsignedAttributes: Rc>, + allowedUnsignedAttributePrefix: Rc>>, + algorithmSuiteId: Rc>>, + keyring: Rc>>, + cmm: Rc>>, + legacyOverride: Rc>>, + plaintextOverride: Rc>> + } + } + + impl DynamoDbTableEncryptionConfig { + pub fn logicalTableName(&self) -> &Sequence { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => logicalTableName, + } + } + pub fn partitionKeyName(&self) -> &Sequence { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => partitionKeyName, + } + } + pub fn sortKeyName(&self) -> &Rc>> { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => sortKeyName, + } + } + pub fn search(&self) -> &Rc>> { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => search, + } + } + pub fn attributeActionsOnEncrypt(&self) -> &Map, Rc> { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => attributeActionsOnEncrypt, + } + } + pub fn allowedUnsignedAttributes(&self) -> &Rc> { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => allowedUnsignedAttributes, + } + } + pub fn allowedUnsignedAttributePrefix(&self) -> &Rc>> { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => allowedUnsignedAttributePrefix, + } + } + pub fn algorithmSuiteId(&self) -> &Rc>> { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => algorithmSuiteId, + } + } + pub fn keyring(&self) -> &Rc>> { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => keyring, + } + } + pub fn cmm(&self) -> &Rc>> { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => cmm, + } + } + pub fn legacyOverride(&self) -> &Rc>> { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => legacyOverride, + } + } + pub fn plaintextOverride(&self) -> &Rc>> { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => plaintextOverride, + } + } + } + + impl Debug + for DynamoDbTableEncryptionConfig { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DynamoDbTableEncryptionConfig { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.DynamoDbTableEncryptionConfig.DynamoDbTableEncryptionConfig(")?; + DafnyPrint::fmt_print(logicalTableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(partitionKeyName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(sortKeyName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(search, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(attributeActionsOnEncrypt, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(allowedUnsignedAttributes, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(allowedUnsignedAttributePrefix, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyring, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cmm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(legacyOverride, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(plaintextOverride, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DynamoDbTableEncryptionConfig {} + + impl Hash + for DynamoDbTableEncryptionConfig { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig{logicalTableName, partitionKeyName, sortKeyName, search, attributeActionsOnEncrypt, allowedUnsignedAttributes, allowedUnsignedAttributePrefix, algorithmSuiteId, keyring, cmm, legacyOverride, plaintextOverride, } => { + Hash::hash(logicalTableName, _state); + Hash::hash(partitionKeyName, _state); + Hash::hash(sortKeyName, _state); + Hash::hash(search, _state); + Hash::hash(attributeActionsOnEncrypt, _state); + Hash::hash(allowedUnsignedAttributes, _state); + Hash::hash(allowedUnsignedAttributePrefix, _state); + Hash::hash(algorithmSuiteId, _state); + Hash::hash(keyring, _state); + Hash::hash(cmm, _state); + Hash::hash(legacyOverride, _state); + Hash::hash(plaintextOverride, _state) + }, + } + } + } + + impl Default + for DynamoDbTableEncryptionConfig { + fn default() -> DynamoDbTableEncryptionConfig { + DynamoDbTableEncryptionConfig::DynamoDbTableEncryptionConfig { + logicalTableName: Default::default(), + partitionKeyName: Default::default(), + sortKeyName: Default::default(), + search: Default::default(), + attributeActionsOnEncrypt: Default::default(), + allowedUnsignedAttributes: Default::default(), + allowedUnsignedAttributePrefix: Default::default(), + algorithmSuiteId: Default::default(), + keyring: Default::default(), + cmm: Default::default(), + legacyOverride: Default::default(), + plaintextOverride: Default::default() + } + } + } + + impl AsRef + for DynamoDbTableEncryptionConfig { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DynamoDbTablesEncryptionConfig { + DynamoDbTablesEncryptionConfig { + tableEncryptionConfigs: Map, Rc> + } + } + + impl DynamoDbTablesEncryptionConfig { + pub fn tableEncryptionConfigs(&self) -> &Map, Rc> { + match self { + DynamoDbTablesEncryptionConfig::DynamoDbTablesEncryptionConfig{tableEncryptionConfigs, } => tableEncryptionConfigs, + } + } + } + + impl Debug + for DynamoDbTablesEncryptionConfig { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DynamoDbTablesEncryptionConfig { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DynamoDbTablesEncryptionConfig::DynamoDbTablesEncryptionConfig{tableEncryptionConfigs, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.DynamoDbTablesEncryptionConfig.DynamoDbTablesEncryptionConfig(")?; + DafnyPrint::fmt_print(tableEncryptionConfigs, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DynamoDbTablesEncryptionConfig {} + + impl Hash + for DynamoDbTablesEncryptionConfig { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DynamoDbTablesEncryptionConfig::DynamoDbTablesEncryptionConfig{tableEncryptionConfigs, } => { + Hash::hash(tableEncryptionConfigs, _state) + }, + } + } + } + + impl Default + for DynamoDbTablesEncryptionConfig { + fn default() -> DynamoDbTablesEncryptionConfig { + DynamoDbTablesEncryptionConfig::DynamoDbTablesEncryptionConfig { + tableEncryptionConfigs: Default::default() + } + } + } + + impl AsRef + for DynamoDbTablesEncryptionConfig { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptedDataKeyDescription { + EncryptedDataKeyDescription { + keyProviderId: Sequence, + keyProviderInfo: Rc>>, + branchKeyId: Rc>>, + branchKeyVersion: Rc>> + } + } + + impl EncryptedDataKeyDescription { + pub fn keyProviderId(&self) -> &Sequence { + match self { + EncryptedDataKeyDescription::EncryptedDataKeyDescription{keyProviderId, keyProviderInfo, branchKeyId, branchKeyVersion, } => keyProviderId, + } + } + pub fn keyProviderInfo(&self) -> &Rc>> { + match self { + EncryptedDataKeyDescription::EncryptedDataKeyDescription{keyProviderId, keyProviderInfo, branchKeyId, branchKeyVersion, } => keyProviderInfo, + } + } + pub fn branchKeyId(&self) -> &Rc>> { + match self { + EncryptedDataKeyDescription::EncryptedDataKeyDescription{keyProviderId, keyProviderInfo, branchKeyId, branchKeyVersion, } => branchKeyId, + } + } + pub fn branchKeyVersion(&self) -> &Rc>> { + match self { + EncryptedDataKeyDescription::EncryptedDataKeyDescription{keyProviderId, keyProviderInfo, branchKeyId, branchKeyVersion, } => branchKeyVersion, + } + } + } + + impl Debug + for EncryptedDataKeyDescription { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptedDataKeyDescription { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptedDataKeyDescription::EncryptedDataKeyDescription{keyProviderId, keyProviderInfo, branchKeyId, branchKeyVersion, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.EncryptedDataKeyDescription.EncryptedDataKeyDescription(")?; + DafnyPrint::fmt_print(keyProviderId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(keyProviderInfo, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(branchKeyId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(branchKeyVersion, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptedDataKeyDescription {} + + impl Hash + for EncryptedDataKeyDescription { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptedDataKeyDescription::EncryptedDataKeyDescription{keyProviderId, keyProviderInfo, branchKeyId, branchKeyVersion, } => { + Hash::hash(keyProviderId, _state); + Hash::hash(keyProviderInfo, _state); + Hash::hash(branchKeyId, _state); + Hash::hash(branchKeyVersion, _state) + }, + } + } + } + + impl Default + for EncryptedDataKeyDescription { + fn default() -> EncryptedDataKeyDescription { + EncryptedDataKeyDescription::EncryptedDataKeyDescription { + keyProviderId: Default::default(), + keyProviderInfo: Default::default(), + branchKeyId: Default::default(), + branchKeyVersion: Default::default() + } + } + } + + impl AsRef + for EncryptedDataKeyDescription { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptedPart { + EncryptedPart { + name: Sequence, + prefix: Sequence + } + } + + impl EncryptedPart { + pub fn name(&self) -> &Sequence { + match self { + EncryptedPart::EncryptedPart{name, prefix, } => name, + } + } + pub fn prefix(&self) -> &Sequence { + match self { + EncryptedPart::EncryptedPart{name, prefix, } => prefix, + } + } + } + + impl Debug + for EncryptedPart { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptedPart { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptedPart::EncryptedPart{name, prefix, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.EncryptedPart.EncryptedPart(")?; + DafnyPrint::fmt_print(name, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(prefix, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptedPart {} + + impl Hash + for EncryptedPart { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptedPart::EncryptedPart{name, prefix, } => { + Hash::hash(name, _state); + Hash::hash(prefix, _state) + }, + } + } + } + + impl Default + for EncryptedPart { + fn default() -> EncryptedPart { + EncryptedPart::EncryptedPart { + name: Default::default(), + prefix: Default::default() + } + } + } + + impl AsRef + for EncryptedPart { + fn as_ref(&self) -> &Self { + self + } + } + + pub type EncryptedPartsList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum GetBranchKeyIdFromDdbKeyInput { + GetBranchKeyIdFromDdbKeyInput { + ddbKey: Map, Rc> + } + } + + impl GetBranchKeyIdFromDdbKeyInput { + pub fn ddbKey(&self) -> &Map, Rc> { + match self { + GetBranchKeyIdFromDdbKeyInput::GetBranchKeyIdFromDdbKeyInput{ddbKey, } => ddbKey, + } + } + } + + impl Debug + for GetBranchKeyIdFromDdbKeyInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetBranchKeyIdFromDdbKeyInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetBranchKeyIdFromDdbKeyInput::GetBranchKeyIdFromDdbKeyInput{ddbKey, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetBranchKeyIdFromDdbKeyInput.GetBranchKeyIdFromDdbKeyInput(")?; + DafnyPrint::fmt_print(ddbKey, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetBranchKeyIdFromDdbKeyInput {} + + impl Hash + for GetBranchKeyIdFromDdbKeyInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetBranchKeyIdFromDdbKeyInput::GetBranchKeyIdFromDdbKeyInput{ddbKey, } => { + Hash::hash(ddbKey, _state) + }, + } + } + } + + impl Default + for GetBranchKeyIdFromDdbKeyInput { + fn default() -> GetBranchKeyIdFromDdbKeyInput { + GetBranchKeyIdFromDdbKeyInput::GetBranchKeyIdFromDdbKeyInput { + ddbKey: Default::default() + } + } + } + + impl AsRef + for GetBranchKeyIdFromDdbKeyInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetBranchKeyIdFromDdbKeyOutput { + GetBranchKeyIdFromDdbKeyOutput { + branchKeyId: Sequence + } + } + + impl GetBranchKeyIdFromDdbKeyOutput { + pub fn branchKeyId(&self) -> &Sequence { + match self { + GetBranchKeyIdFromDdbKeyOutput::GetBranchKeyIdFromDdbKeyOutput{branchKeyId, } => branchKeyId, + } + } + } + + impl Debug + for GetBranchKeyIdFromDdbKeyOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetBranchKeyIdFromDdbKeyOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetBranchKeyIdFromDdbKeyOutput::GetBranchKeyIdFromDdbKeyOutput{branchKeyId, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetBranchKeyIdFromDdbKeyOutput.GetBranchKeyIdFromDdbKeyOutput(")?; + DafnyPrint::fmt_print(branchKeyId, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetBranchKeyIdFromDdbKeyOutput {} + + impl Hash + for GetBranchKeyIdFromDdbKeyOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetBranchKeyIdFromDdbKeyOutput::GetBranchKeyIdFromDdbKeyOutput{branchKeyId, } => { + Hash::hash(branchKeyId, _state) + }, + } + } + } + + impl Default + for GetBranchKeyIdFromDdbKeyOutput { + fn default() -> GetBranchKeyIdFromDdbKeyOutput { + GetBranchKeyIdFromDdbKeyOutput::GetBranchKeyIdFromDdbKeyOutput { + branchKeyId: Default::default() + } + } + } + + impl AsRef + for GetBranchKeyIdFromDdbKeyOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetEncryptedDataKeyDescriptionInput { + GetEncryptedDataKeyDescriptionInput { + input: Rc + } + } + + impl GetEncryptedDataKeyDescriptionInput { + pub fn input(&self) -> &Rc { + match self { + GetEncryptedDataKeyDescriptionInput::GetEncryptedDataKeyDescriptionInput{input, } => input, + } + } + } + + impl Debug + for GetEncryptedDataKeyDescriptionInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetEncryptedDataKeyDescriptionInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetEncryptedDataKeyDescriptionInput::GetEncryptedDataKeyDescriptionInput{input, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetEncryptedDataKeyDescriptionInput.GetEncryptedDataKeyDescriptionInput(")?; + DafnyPrint::fmt_print(input, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetEncryptedDataKeyDescriptionInput {} + + impl Hash + for GetEncryptedDataKeyDescriptionInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetEncryptedDataKeyDescriptionInput::GetEncryptedDataKeyDescriptionInput{input, } => { + Hash::hash(input, _state) + }, + } + } + } + + impl Default + for GetEncryptedDataKeyDescriptionInput { + fn default() -> GetEncryptedDataKeyDescriptionInput { + GetEncryptedDataKeyDescriptionInput::GetEncryptedDataKeyDescriptionInput { + input: Default::default() + } + } + } + + impl AsRef + for GetEncryptedDataKeyDescriptionInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetEncryptedDataKeyDescriptionOutput { + GetEncryptedDataKeyDescriptionOutput { + EncryptedDataKeyDescriptionOutput: Sequence> + } + } + + impl GetEncryptedDataKeyDescriptionOutput { + pub fn EncryptedDataKeyDescriptionOutput(&self) -> &Sequence> { + match self { + GetEncryptedDataKeyDescriptionOutput::GetEncryptedDataKeyDescriptionOutput{EncryptedDataKeyDescriptionOutput, } => EncryptedDataKeyDescriptionOutput, + } + } + } + + impl Debug + for GetEncryptedDataKeyDescriptionOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetEncryptedDataKeyDescriptionOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetEncryptedDataKeyDescriptionOutput::GetEncryptedDataKeyDescriptionOutput{EncryptedDataKeyDescriptionOutput, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetEncryptedDataKeyDescriptionOutput.GetEncryptedDataKeyDescriptionOutput(")?; + DafnyPrint::fmt_print(EncryptedDataKeyDescriptionOutput, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetEncryptedDataKeyDescriptionOutput {} + + impl Hash + for GetEncryptedDataKeyDescriptionOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetEncryptedDataKeyDescriptionOutput::GetEncryptedDataKeyDescriptionOutput{EncryptedDataKeyDescriptionOutput, } => { + Hash::hash(EncryptedDataKeyDescriptionOutput, _state) + }, + } + } + } + + impl Default + for GetEncryptedDataKeyDescriptionOutput { + fn default() -> GetEncryptedDataKeyDescriptionOutput { + GetEncryptedDataKeyDescriptionOutput::GetEncryptedDataKeyDescriptionOutput { + EncryptedDataKeyDescriptionOutput: Default::default() + } + } + } + + impl AsRef + for GetEncryptedDataKeyDescriptionOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetEncryptedDataKeyDescriptionUnion { + header { + header: Sequence + }, + item { + item: Map, Rc> + } + } + + impl GetEncryptedDataKeyDescriptionUnion { + pub fn header(&self) -> &Sequence { + match self { + GetEncryptedDataKeyDescriptionUnion::header{header, } => header, + GetEncryptedDataKeyDescriptionUnion::item{item, } => panic!("field does not exist on this variant"), + } + } + pub fn item(&self) -> &Map, Rc> { + match self { + GetEncryptedDataKeyDescriptionUnion::header{header, } => panic!("field does not exist on this variant"), + GetEncryptedDataKeyDescriptionUnion::item{item, } => item, + } + } + } + + impl Debug + for GetEncryptedDataKeyDescriptionUnion { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetEncryptedDataKeyDescriptionUnion { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetEncryptedDataKeyDescriptionUnion::header{header, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetEncryptedDataKeyDescriptionUnion.header(")?; + DafnyPrint::fmt_print(header, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + GetEncryptedDataKeyDescriptionUnion::item{item, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetEncryptedDataKeyDescriptionUnion.item(")?; + DafnyPrint::fmt_print(item, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetEncryptedDataKeyDescriptionUnion {} + + impl Hash + for GetEncryptedDataKeyDescriptionUnion { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetEncryptedDataKeyDescriptionUnion::header{header, } => { + Hash::hash(header, _state) + }, + GetEncryptedDataKeyDescriptionUnion::item{item, } => { + Hash::hash(item, _state) + }, + } + } + } + + impl Default + for GetEncryptedDataKeyDescriptionUnion { + fn default() -> GetEncryptedDataKeyDescriptionUnion { + GetEncryptedDataKeyDescriptionUnion::header { + header: Default::default() + } + } + } + + impl AsRef + for GetEncryptedDataKeyDescriptionUnion { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetPrefix { + GetPrefix { + length: i32 + } + } + + impl GetPrefix { + pub fn length(&self) -> &i32 { + match self { + GetPrefix::GetPrefix{length, } => length, + } + } + } + + impl Debug + for GetPrefix { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetPrefix { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetPrefix::GetPrefix{length, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetPrefix.GetPrefix(")?; + DafnyPrint::fmt_print(length, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetPrefix {} + + impl Hash + for GetPrefix { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetPrefix::GetPrefix{length, } => { + Hash::hash(length, _state) + }, + } + } + } + + impl Default + for GetPrefix { + fn default() -> GetPrefix { + GetPrefix::GetPrefix { + length: Default::default() + } + } + } + + impl AsRef + for GetPrefix { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetSegment { + GetSegment { + split: Sequence, + index: i32 + } + } + + impl GetSegment { + pub fn split(&self) -> &Sequence { + match self { + GetSegment::GetSegment{split, index, } => split, + } + } + pub fn index(&self) -> &i32 { + match self { + GetSegment::GetSegment{split, index, } => index, + } + } + } + + impl Debug + for GetSegment { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetSegment { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetSegment::GetSegment{split, index, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetSegment.GetSegment(")?; + DafnyPrint::fmt_print(split, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(index, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetSegment {} + + impl Hash + for GetSegment { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetSegment::GetSegment{split, index, } => { + Hash::hash(split, _state); + Hash::hash(index, _state) + }, + } + } + } + + impl Default + for GetSegment { + fn default() -> GetSegment { + GetSegment::GetSegment { + split: Default::default(), + index: Default::default() + } + } + } + + impl AsRef + for GetSegment { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetSegments { + GetSegments { + split: Sequence, + low: i32, + high: i32 + } + } + + impl GetSegments { + pub fn split(&self) -> &Sequence { + match self { + GetSegments::GetSegments{split, low, high, } => split, + } + } + pub fn low(&self) -> &i32 { + match self { + GetSegments::GetSegments{split, low, high, } => low, + } + } + pub fn high(&self) -> &i32 { + match self { + GetSegments::GetSegments{split, low, high, } => high, + } + } + } + + impl Debug + for GetSegments { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetSegments { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetSegments::GetSegments{split, low, high, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetSegments.GetSegments(")?; + DafnyPrint::fmt_print(split, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(low, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(high, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetSegments {} + + impl Hash + for GetSegments { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetSegments::GetSegments{split, low, high, } => { + Hash::hash(split, _state); + Hash::hash(low, _state); + Hash::hash(high, _state) + }, + } + } + } + + impl Default + for GetSegments { + fn default() -> GetSegments { + GetSegments::GetSegments { + split: Default::default(), + low: Default::default(), + high: Default::default() + } + } + } + + impl AsRef + for GetSegments { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetSubstring { + GetSubstring { + low: i32, + high: i32 + } + } + + impl GetSubstring { + pub fn low(&self) -> &i32 { + match self { + GetSubstring::GetSubstring{low, high, } => low, + } + } + pub fn high(&self) -> &i32 { + match self { + GetSubstring::GetSubstring{low, high, } => high, + } + } + } + + impl Debug + for GetSubstring { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetSubstring { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetSubstring::GetSubstring{low, high, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetSubstring.GetSubstring(")?; + DafnyPrint::fmt_print(low, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(high, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetSubstring {} + + impl Hash + for GetSubstring { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetSubstring::GetSubstring{low, high, } => { + Hash::hash(low, _state); + Hash::hash(high, _state) + }, + } + } + } + + impl Default + for GetSubstring { + fn default() -> GetSubstring { + GetSubstring::GetSubstring { + low: Default::default(), + high: Default::default() + } + } + } + + impl AsRef + for GetSubstring { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum GetSuffix { + GetSuffix { + length: i32 + } + } + + impl GetSuffix { + pub fn length(&self) -> &i32 { + match self { + GetSuffix::GetSuffix{length, } => length, + } + } + } + + impl Debug + for GetSuffix { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for GetSuffix { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + GetSuffix::GetSuffix{length, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetSuffix.GetSuffix(")?; + DafnyPrint::fmt_print(length, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for GetSuffix {} + + impl Hash + for GetSuffix { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + GetSuffix::GetSuffix{length, } => { + Hash::hash(length, _state) + }, + } + } + } + + impl Default + for GetSuffix { + fn default() -> GetSuffix { + GetSuffix::GetSuffix { + length: Default::default() + } + } + } + + impl AsRef + for GetSuffix { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Insert { + Insert { + literal: Sequence + } + } + + impl Insert { + pub fn literal(&self) -> &Sequence { + match self { + Insert::Insert{literal, } => literal, + } + } + } + + impl Debug + for Insert { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Insert { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Insert::Insert{literal, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Insert.Insert(")?; + DafnyPrint::fmt_print(literal, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Insert {} + + impl Hash + for Insert { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Insert::Insert{literal, } => { + Hash::hash(literal, _state) + }, + } + } + } + + impl Default + for Insert { + fn default() -> Insert { + Insert::Insert { + literal: Default::default() + } + } + } + + impl AsRef + for Insert { + fn as_ref(&self) -> &Self { + self + } + } + + pub struct ILegacyDynamoDbEncryptorCallHistory {} + + impl ILegacyDynamoDbEncryptorCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::ILegacyDynamoDbEncryptorCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait ILegacyDynamoDbEncryptor: Any + UpcastObject {} + + #[derive(PartialEq, Clone)] + pub enum LegacyOverride { + LegacyOverride { + policy: Rc, + encryptor: Object, + attributeActionsOnEncrypt: Map, Rc>, + defaultAttributeFlag: Rc>> + } + } + + impl LegacyOverride { + pub fn policy(&self) -> &Rc { + match self { + LegacyOverride::LegacyOverride{policy, encryptor, attributeActionsOnEncrypt, defaultAttributeFlag, } => policy, + } + } + pub fn encryptor(&self) -> &Object { + match self { + LegacyOverride::LegacyOverride{policy, encryptor, attributeActionsOnEncrypt, defaultAttributeFlag, } => encryptor, + } + } + pub fn attributeActionsOnEncrypt(&self) -> &Map, Rc> { + match self { + LegacyOverride::LegacyOverride{policy, encryptor, attributeActionsOnEncrypt, defaultAttributeFlag, } => attributeActionsOnEncrypt, + } + } + pub fn defaultAttributeFlag(&self) -> &Rc>> { + match self { + LegacyOverride::LegacyOverride{policy, encryptor, attributeActionsOnEncrypt, defaultAttributeFlag, } => defaultAttributeFlag, + } + } + } + + impl Debug + for LegacyOverride { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for LegacyOverride { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + LegacyOverride::LegacyOverride{policy, encryptor, attributeActionsOnEncrypt, defaultAttributeFlag, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.LegacyOverride.LegacyOverride(")?; + DafnyPrint::fmt_print(policy, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptor, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(attributeActionsOnEncrypt, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(defaultAttributeFlag, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for LegacyOverride {} + + impl Hash + for LegacyOverride { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + LegacyOverride::LegacyOverride{policy, encryptor, attributeActionsOnEncrypt, defaultAttributeFlag, } => { + Hash::hash(policy, _state); + Hash::hash(encryptor, _state); + Hash::hash(attributeActionsOnEncrypt, _state); + Hash::hash(defaultAttributeFlag, _state) + }, + } + } + } + + impl Default + for LegacyOverride { + fn default() -> LegacyOverride { + LegacyOverride::LegacyOverride { + policy: Default::default(), + encryptor: Default::default(), + attributeActionsOnEncrypt: Default::default(), + defaultAttributeFlag: Default::default() + } + } + } + + impl AsRef + for LegacyOverride { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum LegacyPolicy { + FORCE_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT {}, + FORBID_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT {}, + FORBID_LEGACY_ENCRYPT_FORBID_LEGACY_DECRYPT {} + } + + impl LegacyPolicy {} + + impl Debug + for LegacyPolicy { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for LegacyPolicy { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + LegacyPolicy::FORCE_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.LegacyPolicy.FORCE__LEGACY__ENCRYPT__ALLOW__LEGACY__DECRYPT")?; + Ok(()) + }, + LegacyPolicy::FORBID_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.LegacyPolicy.FORBID__LEGACY__ENCRYPT__ALLOW__LEGACY__DECRYPT")?; + Ok(()) + }, + LegacyPolicy::FORBID_LEGACY_ENCRYPT_FORBID_LEGACY_DECRYPT{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.LegacyPolicy.FORBID__LEGACY__ENCRYPT__FORBID__LEGACY__DECRYPT")?; + Ok(()) + }, + } + } + } + + impl LegacyPolicy { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(LegacyPolicy::FORCE_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT {}), Rc::new(LegacyPolicy::FORBID_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT {}), Rc::new(LegacyPolicy::FORBID_LEGACY_ENCRYPT_FORBID_LEGACY_DECRYPT {})].iter() + } + } + + impl Eq + for LegacyPolicy {} + + impl Hash + for LegacyPolicy { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + LegacyPolicy::FORCE_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT{} => { + + }, + LegacyPolicy::FORBID_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT{} => { + + }, + LegacyPolicy::FORBID_LEGACY_ENCRYPT_FORBID_LEGACY_DECRYPT{} => { + + }, + } + } + } + + impl Default + for LegacyPolicy { + fn default() -> LegacyPolicy { + LegacyPolicy::FORCE_LEGACY_ENCRYPT_ALLOW_LEGACY_DECRYPT {} + } + } + + impl AsRef + for LegacyPolicy { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Lower { + Lower {} + } + + impl Lower {} + + impl Debug + for Lower { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Lower { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Lower::Lower{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Lower.Lower")?; + Ok(()) + }, + } + } + } + + impl Lower { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(Lower::Lower {})].iter() + } + } + + impl Eq + for Lower {} + + impl Hash + for Lower { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Lower::Lower{} => { + + }, + } + } + } + + impl Default + for Lower { + fn default() -> Lower { + Lower::Lower {} + } + } + + impl AsRef + for Lower { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum MultiKeyStore { + MultiKeyStore { + keyFieldName: Sequence, + cacheTTL: i32, + cache: Rc>> + } + } + + impl MultiKeyStore { + pub fn keyFieldName(&self) -> &Sequence { + match self { + MultiKeyStore::MultiKeyStore{keyFieldName, cacheTTL, cache, } => keyFieldName, + } + } + pub fn cacheTTL(&self) -> &i32 { + match self { + MultiKeyStore::MultiKeyStore{keyFieldName, cacheTTL, cache, } => cacheTTL, + } + } + pub fn cache(&self) -> &Rc>> { + match self { + MultiKeyStore::MultiKeyStore{keyFieldName, cacheTTL, cache, } => cache, + } + } + } + + impl Debug + for MultiKeyStore { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for MultiKeyStore { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + MultiKeyStore::MultiKeyStore{keyFieldName, cacheTTL, cache, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.MultiKeyStore.MultiKeyStore(")?; + DafnyPrint::fmt_print(keyFieldName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cacheTTL, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cache, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for MultiKeyStore {} + + impl Hash + for MultiKeyStore { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + MultiKeyStore::MultiKeyStore{keyFieldName, cacheTTL, cache, } => { + Hash::hash(keyFieldName, _state); + Hash::hash(cacheTTL, _state); + Hash::hash(cache, _state) + }, + } + } + } + + impl Default + for MultiKeyStore { + fn default() -> MultiKeyStore { + MultiKeyStore::MultiKeyStore { + keyFieldName: Default::default(), + cacheTTL: Default::default(), + cache: Default::default() + } + } + } + + impl AsRef + for MultiKeyStore { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PartOnly { + PartOnly {} + } + + impl PartOnly {} + + impl Debug + for PartOnly { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PartOnly { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PartOnly::PartOnly{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.PartOnly.PartOnly")?; + Ok(()) + }, + } + } + } + + impl PartOnly { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(PartOnly::PartOnly {})].iter() + } + } + + impl Eq + for PartOnly {} + + impl Hash + for PartOnly { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PartOnly::PartOnly{} => { + + }, + } + } + } + + impl Default + for PartOnly { + fn default() -> PartOnly { + PartOnly::PartOnly {} + } + } + + impl AsRef + for PartOnly { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PlaintextOverride { + FORCE_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ {}, + FORBID_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ {}, + FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ {} + } + + impl PlaintextOverride {} + + impl Debug + for PlaintextOverride { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PlaintextOverride { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PlaintextOverride::FORCE_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.PlaintextOverride.FORCE__PLAINTEXT__WRITE__ALLOW__PLAINTEXT__READ")?; + Ok(()) + }, + PlaintextOverride::FORBID_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.PlaintextOverride.FORBID__PLAINTEXT__WRITE__ALLOW__PLAINTEXT__READ")?; + Ok(()) + }, + PlaintextOverride::FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.PlaintextOverride.FORBID__PLAINTEXT__WRITE__FORBID__PLAINTEXT__READ")?; + Ok(()) + }, + } + } + } + + impl PlaintextOverride { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(PlaintextOverride::FORCE_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ {}), Rc::new(PlaintextOverride::FORBID_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ {}), Rc::new(PlaintextOverride::FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ {})].iter() + } + } + + impl Eq + for PlaintextOverride {} + + impl Hash + for PlaintextOverride { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PlaintextOverride::FORCE_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ{} => { + + }, + PlaintextOverride::FORBID_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ{} => { + + }, + PlaintextOverride::FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ{} => { + + }, + } + } + } + + impl Default + for PlaintextOverride { + fn default() -> PlaintextOverride { + PlaintextOverride::FORCE_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ {} + } + } + + impl AsRef + for PlaintextOverride { + fn as_ref(&self) -> &Self { + self + } + } + + pub type Prefix = Sequence; + + #[derive(PartialEq, Clone)] + pub enum SearchConfig { + SearchConfig { + versions: crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconVersionList, + writeVersion: crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VersionNumber + } + } + + impl SearchConfig { + pub fn versions(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconVersionList { + match self { + SearchConfig::SearchConfig{versions, writeVersion, } => versions, + } + } + pub fn writeVersion(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VersionNumber { + match self { + SearchConfig::SearchConfig{versions, writeVersion, } => writeVersion, + } + } + } + + impl Debug + for SearchConfig { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for SearchConfig { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + SearchConfig::SearchConfig{versions, writeVersion, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.SearchConfig.SearchConfig(")?; + DafnyPrint::fmt_print(versions, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(writeVersion, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for SearchConfig {} + + impl Hash + for SearchConfig { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + SearchConfig::SearchConfig{versions, writeVersion, } => { + Hash::hash(versions, _state); + Hash::hash(writeVersion, _state) + }, + } + } + } + + impl Default + for SearchConfig { + fn default() -> SearchConfig { + SearchConfig::SearchConfig { + versions: Default::default(), + writeVersion: Default::default() + } + } + } + + impl AsRef + for SearchConfig { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum Shared { + Shared { + other: Sequence + } + } + + impl Shared { + pub fn other(&self) -> &Sequence { + match self { + Shared::Shared{other, } => other, + } + } + } + + impl Debug + for Shared { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Shared { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Shared::Shared{other, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Shared.Shared(")?; + DafnyPrint::fmt_print(other, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for Shared {} + + impl Hash + for Shared { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Shared::Shared{other, } => { + Hash::hash(other, _state) + }, + } + } + } + + impl Default + for Shared { + fn default() -> Shared { + Shared::Shared { + other: Default::default() + } + } + } + + impl AsRef + for Shared { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum SharedSet { + SharedSet { + other: Sequence + } + } + + impl SharedSet { + pub fn other(&self) -> &Sequence { + match self { + SharedSet::SharedSet{other, } => other, + } + } + } + + impl Debug + for SharedSet { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for SharedSet { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + SharedSet::SharedSet{other, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.SharedSet.SharedSet(")?; + DafnyPrint::fmt_print(other, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for SharedSet {} + + impl Hash + for SharedSet { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + SharedSet::SharedSet{other, } => { + Hash::hash(other, _state) + }, + } + } + } + + impl Default + for SharedSet { + fn default() -> SharedSet { + SharedSet::SharedSet { + other: Default::default() + } + } + } + + impl AsRef + for SharedSet { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum SignedPart { + SignedPart { + name: Sequence, + prefix: Sequence, + loc: Rc>> + } + } + + impl SignedPart { + pub fn name(&self) -> &Sequence { + match self { + SignedPart::SignedPart{name, prefix, loc, } => name, + } + } + pub fn prefix(&self) -> &Sequence { + match self { + SignedPart::SignedPart{name, prefix, loc, } => prefix, + } + } + pub fn loc(&self) -> &Rc>> { + match self { + SignedPart::SignedPart{name, prefix, loc, } => loc, + } + } + } + + impl Debug + for SignedPart { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for SignedPart { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + SignedPart::SignedPart{name, prefix, loc, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.SignedPart.SignedPart(")?; + DafnyPrint::fmt_print(name, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(prefix, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(loc, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for SignedPart {} + + impl Hash + for SignedPart { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + SignedPart::SignedPart{name, prefix, loc, } => { + Hash::hash(name, _state); + Hash::hash(prefix, _state); + Hash::hash(loc, _state) + }, + } + } + } + + impl Default + for SignedPart { + fn default() -> SignedPart { + SignedPart::SignedPart { + name: Default::default(), + prefix: Default::default(), + loc: Default::default() + } + } + } + + impl AsRef + for SignedPart { + fn as_ref(&self) -> &Self { + self + } + } + + pub type SignedPartsList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum SingleKeyStore { + SingleKeyStore { + keyId: Sequence, + cacheTTL: i32 + } + } + + impl SingleKeyStore { + pub fn keyId(&self) -> &Sequence { + match self { + SingleKeyStore::SingleKeyStore{keyId, cacheTTL, } => keyId, + } + } + pub fn cacheTTL(&self) -> &i32 { + match self { + SingleKeyStore::SingleKeyStore{keyId, cacheTTL, } => cacheTTL, + } + } + } + + impl Debug + for SingleKeyStore { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for SingleKeyStore { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + SingleKeyStore::SingleKeyStore{keyId, cacheTTL, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.SingleKeyStore.SingleKeyStore(")?; + DafnyPrint::fmt_print(keyId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cacheTTL, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for SingleKeyStore {} + + impl Hash + for SingleKeyStore { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + SingleKeyStore::SingleKeyStore{keyId, cacheTTL, } => { + Hash::hash(keyId, _state); + Hash::hash(cacheTTL, _state) + }, + } + } + } + + impl Default + for SingleKeyStore { + fn default() -> SingleKeyStore { + SingleKeyStore::SingleKeyStore { + keyId: Default::default(), + cacheTTL: Default::default() + } + } + } + + impl AsRef + for SingleKeyStore { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum StandardBeacon { + StandardBeacon { + name: Sequence, + length: crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconBitLength, + loc: Rc>>, + style: Rc>> + } + } + + impl StandardBeacon { + pub fn name(&self) -> &Sequence { + match self { + StandardBeacon::StandardBeacon{name, length, loc, style, } => name, + } + } + pub fn length(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::BeaconBitLength { + match self { + StandardBeacon::StandardBeacon{name, length, loc, style, } => length, + } + } + pub fn loc(&self) -> &Rc>> { + match self { + StandardBeacon::StandardBeacon{name, length, loc, style, } => loc, + } + } + pub fn style(&self) -> &Rc>> { + match self { + StandardBeacon::StandardBeacon{name, length, loc, style, } => style, + } + } + } + + impl Debug + for StandardBeacon { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for StandardBeacon { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + StandardBeacon::StandardBeacon{name, length, loc, style, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.StandardBeacon.StandardBeacon(")?; + DafnyPrint::fmt_print(name, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(length, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(loc, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(style, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for StandardBeacon {} + + impl Hash + for StandardBeacon { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + StandardBeacon::StandardBeacon{name, length, loc, style, } => { + Hash::hash(name, _state); + Hash::hash(length, _state); + Hash::hash(loc, _state); + Hash::hash(style, _state) + }, + } + } + } + + impl Default + for StandardBeacon { + fn default() -> StandardBeacon { + StandardBeacon::StandardBeacon { + name: Default::default(), + length: Default::default(), + loc: Default::default(), + style: Default::default() + } + } + } + + impl AsRef + for StandardBeacon { + fn as_ref(&self) -> &Self { + self + } + } + + pub type StandardBeaconList = Sequence>; + + pub type TerminalLocation = Sequence; + + #[derive(PartialEq, Clone)] + pub enum Upper { + Upper {} + } + + impl Upper {} + + impl Debug + for Upper { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for Upper { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + Upper::Upper{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Upper.Upper")?; + Ok(()) + }, + } + } + } + + impl Upper { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(Upper::Upper {})].iter() + } + } + + impl Eq + for Upper {} + + impl Hash + for Upper { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + Upper::Upper{} => { + + }, + } + } + } + + impl Default + for Upper { + fn default() -> Upper { + Upper::Upper {} + } + } + + impl AsRef + for Upper { + fn as_ref(&self) -> &Self { + self + } + } + + pub type VersionNumber = i32; + + #[derive(PartialEq, Clone)] + pub enum VirtualField { + VirtualField { + name: Sequence, + parts: crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualPartList + } + } + + impl VirtualField { + pub fn name(&self) -> &Sequence { + match self { + VirtualField::VirtualField{name, parts, } => name, + } + } + pub fn parts(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::dynamodb::internaldafny::types::VirtualPartList { + match self { + VirtualField::VirtualField{name, parts, } => parts, + } + } + } + + impl Debug + for VirtualField { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for VirtualField { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + VirtualField::VirtualField{name, parts, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.VirtualField.VirtualField(")?; + DafnyPrint::fmt_print(name, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(parts, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for VirtualField {} + + impl Hash + for VirtualField { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + VirtualField::VirtualField{name, parts, } => { + Hash::hash(name, _state); + Hash::hash(parts, _state) + }, + } + } + } + + impl Default + for VirtualField { + fn default() -> VirtualField { + VirtualField::VirtualField { + name: Default::default(), + parts: Default::default() + } + } + } + + impl AsRef + for VirtualField { + fn as_ref(&self) -> &Self { + self + } + } + + pub type VirtualFieldList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum VirtualPart { + VirtualPart { + loc: Sequence, + trans: Rc> + } + } + + impl VirtualPart { + pub fn loc(&self) -> &Sequence { + match self { + VirtualPart::VirtualPart{loc, trans, } => loc, + } + } + pub fn trans(&self) -> &Rc> { + match self { + VirtualPart::VirtualPart{loc, trans, } => trans, + } + } + } + + impl Debug + for VirtualPart { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for VirtualPart { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + VirtualPart::VirtualPart{loc, trans, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.VirtualPart.VirtualPart(")?; + DafnyPrint::fmt_print(loc, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(trans, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for VirtualPart {} + + impl Hash + for VirtualPart { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + VirtualPart::VirtualPart{loc, trans, } => { + Hash::hash(loc, _state); + Hash::hash(trans, _state) + }, + } + } + } + + impl Default + for VirtualPart { + fn default() -> VirtualPart { + VirtualPart::VirtualPart { + loc: Default::default(), + trans: Default::default() + } + } + } + + impl AsRef + for VirtualPart { + fn as_ref(&self) -> &Self { + self + } + } + + pub type VirtualPartList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum VirtualTransform { + upper { + upper: Rc + }, + lower { + lower: Rc + }, + insert { + insert: Rc + }, + prefix { + prefix: Rc + }, + suffix { + suffix: Rc + }, + substring { + substring: Rc + }, + segment { + segment: Rc + }, + segments { + segments: Rc + } + } + + impl VirtualTransform { + pub fn upper(&self) -> &Rc { + match self { + VirtualTransform::upper{upper, } => upper, + VirtualTransform::lower{lower, } => panic!("field does not exist on this variant"), + VirtualTransform::insert{insert, } => panic!("field does not exist on this variant"), + VirtualTransform::prefix{prefix, } => panic!("field does not exist on this variant"), + VirtualTransform::suffix{suffix, } => panic!("field does not exist on this variant"), + VirtualTransform::substring{substring, } => panic!("field does not exist on this variant"), + VirtualTransform::segment{segment, } => panic!("field does not exist on this variant"), + VirtualTransform::segments{segments, } => panic!("field does not exist on this variant"), + } + } + pub fn lower(&self) -> &Rc { + match self { + VirtualTransform::upper{upper, } => panic!("field does not exist on this variant"), + VirtualTransform::lower{lower, } => lower, + VirtualTransform::insert{insert, } => panic!("field does not exist on this variant"), + VirtualTransform::prefix{prefix, } => panic!("field does not exist on this variant"), + VirtualTransform::suffix{suffix, } => panic!("field does not exist on this variant"), + VirtualTransform::substring{substring, } => panic!("field does not exist on this variant"), + VirtualTransform::segment{segment, } => panic!("field does not exist on this variant"), + VirtualTransform::segments{segments, } => panic!("field does not exist on this variant"), + } + } + pub fn insert(&self) -> &Rc { + match self { + VirtualTransform::upper{upper, } => panic!("field does not exist on this variant"), + VirtualTransform::lower{lower, } => panic!("field does not exist on this variant"), + VirtualTransform::insert{insert, } => insert, + VirtualTransform::prefix{prefix, } => panic!("field does not exist on this variant"), + VirtualTransform::suffix{suffix, } => panic!("field does not exist on this variant"), + VirtualTransform::substring{substring, } => panic!("field does not exist on this variant"), + VirtualTransform::segment{segment, } => panic!("field does not exist on this variant"), + VirtualTransform::segments{segments, } => panic!("field does not exist on this variant"), + } + } + pub fn prefix(&self) -> &Rc { + match self { + VirtualTransform::upper{upper, } => panic!("field does not exist on this variant"), + VirtualTransform::lower{lower, } => panic!("field does not exist on this variant"), + VirtualTransform::insert{insert, } => panic!("field does not exist on this variant"), + VirtualTransform::prefix{prefix, } => prefix, + VirtualTransform::suffix{suffix, } => panic!("field does not exist on this variant"), + VirtualTransform::substring{substring, } => panic!("field does not exist on this variant"), + VirtualTransform::segment{segment, } => panic!("field does not exist on this variant"), + VirtualTransform::segments{segments, } => panic!("field does not exist on this variant"), + } + } + pub fn suffix(&self) -> &Rc { + match self { + VirtualTransform::upper{upper, } => panic!("field does not exist on this variant"), + VirtualTransform::lower{lower, } => panic!("field does not exist on this variant"), + VirtualTransform::insert{insert, } => panic!("field does not exist on this variant"), + VirtualTransform::prefix{prefix, } => panic!("field does not exist on this variant"), + VirtualTransform::suffix{suffix, } => suffix, + VirtualTransform::substring{substring, } => panic!("field does not exist on this variant"), + VirtualTransform::segment{segment, } => panic!("field does not exist on this variant"), + VirtualTransform::segments{segments, } => panic!("field does not exist on this variant"), + } + } + pub fn substring(&self) -> &Rc { + match self { + VirtualTransform::upper{upper, } => panic!("field does not exist on this variant"), + VirtualTransform::lower{lower, } => panic!("field does not exist on this variant"), + VirtualTransform::insert{insert, } => panic!("field does not exist on this variant"), + VirtualTransform::prefix{prefix, } => panic!("field does not exist on this variant"), + VirtualTransform::suffix{suffix, } => panic!("field does not exist on this variant"), + VirtualTransform::substring{substring, } => substring, + VirtualTransform::segment{segment, } => panic!("field does not exist on this variant"), + VirtualTransform::segments{segments, } => panic!("field does not exist on this variant"), + } + } + pub fn segment(&self) -> &Rc { + match self { + VirtualTransform::upper{upper, } => panic!("field does not exist on this variant"), + VirtualTransform::lower{lower, } => panic!("field does not exist on this variant"), + VirtualTransform::insert{insert, } => panic!("field does not exist on this variant"), + VirtualTransform::prefix{prefix, } => panic!("field does not exist on this variant"), + VirtualTransform::suffix{suffix, } => panic!("field does not exist on this variant"), + VirtualTransform::substring{substring, } => panic!("field does not exist on this variant"), + VirtualTransform::segment{segment, } => segment, + VirtualTransform::segments{segments, } => panic!("field does not exist on this variant"), + } + } + pub fn segments(&self) -> &Rc { + match self { + VirtualTransform::upper{upper, } => panic!("field does not exist on this variant"), + VirtualTransform::lower{lower, } => panic!("field does not exist on this variant"), + VirtualTransform::insert{insert, } => panic!("field does not exist on this variant"), + VirtualTransform::prefix{prefix, } => panic!("field does not exist on this variant"), + VirtualTransform::suffix{suffix, } => panic!("field does not exist on this variant"), + VirtualTransform::substring{substring, } => panic!("field does not exist on this variant"), + VirtualTransform::segment{segment, } => panic!("field does not exist on this variant"), + VirtualTransform::segments{segments, } => segments, + } + } + } + + impl Debug + for VirtualTransform { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for VirtualTransform { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + VirtualTransform::upper{upper, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.VirtualTransform.upper(")?; + DafnyPrint::fmt_print(upper, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + VirtualTransform::lower{lower, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.VirtualTransform.lower(")?; + DafnyPrint::fmt_print(lower, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + VirtualTransform::insert{insert, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.VirtualTransform.insert(")?; + DafnyPrint::fmt_print(insert, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + VirtualTransform::prefix{prefix, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.VirtualTransform.prefix(")?; + DafnyPrint::fmt_print(prefix, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + VirtualTransform::suffix{suffix, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.VirtualTransform.suffix(")?; + DafnyPrint::fmt_print(suffix, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + VirtualTransform::substring{substring, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.VirtualTransform.substring(")?; + DafnyPrint::fmt_print(substring, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + VirtualTransform::segment{segment, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.VirtualTransform.segment(")?; + DafnyPrint::fmt_print(segment, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + VirtualTransform::segments{segments, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.VirtualTransform.segments(")?; + DafnyPrint::fmt_print(segments, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for VirtualTransform {} + + impl Hash + for VirtualTransform { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + VirtualTransform::upper{upper, } => { + Hash::hash(upper, _state) + }, + VirtualTransform::lower{lower, } => { + Hash::hash(lower, _state) + }, + VirtualTransform::insert{insert, } => { + Hash::hash(insert, _state) + }, + VirtualTransform::prefix{prefix, } => { + Hash::hash(prefix, _state) + }, + VirtualTransform::suffix{suffix, } => { + Hash::hash(suffix, _state) + }, + VirtualTransform::substring{substring, } => { + Hash::hash(substring, _state) + }, + VirtualTransform::segment{segment, } => { + Hash::hash(segment, _state) + }, + VirtualTransform::segments{segments, } => { + Hash::hash(segments, _state) + }, + } + } + } + + impl Default + for VirtualTransform { + fn default() -> VirtualTransform { + VirtualTransform::upper { + upper: Default::default() + } + } + } + + impl AsRef + for VirtualTransform { + fn as_ref(&self) -> &Self { + self + } + } + + pub type VirtualTransformList = Sequence>; + + #[derive(PartialEq, Clone)] + pub enum Error { + DynamoDbEncryptionException { + message: Sequence + }, + AwsCryptographyDbEncryptionSdkStructuredEncryption { + AwsCryptographyDbEncryptionSdkStructuredEncryption: Rc + }, + AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: Rc + }, + AwsCryptographyKeyStore { + AwsCryptographyKeyStore: Rc + }, + AwsCryptographyPrimitives { + AwsCryptographyPrimitives: Rc + }, + ComAmazonawsDynamodb { + ComAmazonawsDynamodb: Rc + }, + CollectionOfErrors { + list: Sequence>, + message: Sequence + }, + Opaque { + obj: Object + }, + OpaqueWithText { + obj: Object, + objMessage: Sequence + } + } + + impl Error { + pub fn message(&self) -> &Sequence { + match self { + Error::DynamoDbEncryptionException{message, } => message, + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => 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::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 AwsCryptographyDbEncryptionSdkStructuredEncryption(&self) -> &Rc { + match self { + Error::DynamoDbEncryptionException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => AwsCryptographyDbEncryptionSdkStructuredEncryption, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => 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::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 AwsCryptographyMaterialProviders(&self) -> &Rc { + match self { + Error::DynamoDbEncryptionException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => AwsCryptographyMaterialProviders, + 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::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 AwsCryptographyKeyStore(&self) -> &Rc { + match self { + Error::DynamoDbEncryptionException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => 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::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::DynamoDbEncryptionException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => 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::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::DynamoDbEncryptionException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => 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::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::DynamoDbEncryptionException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => 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::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::DynamoDbEncryptionException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => 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::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::DynamoDbEncryptionException{message, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => panic!("field does not exist on this variant"), + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => 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::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::DynamoDbEncryptionException{message, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Error.DynamoDbEncryptionException(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Error.AwsCryptographyDbEncryptionSdkStructuredEncryption(")?; + DafnyPrint::fmt_print(AwsCryptographyDbEncryptionSdkStructuredEncryption, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Error.AwsCryptographyMaterialProviders(")?; + DafnyPrint::fmt_print(AwsCryptographyMaterialProviders, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Error.AwsCryptographyKeyStore(")?; + DafnyPrint::fmt_print(AwsCryptographyKeyStore, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Error.AwsCryptographyPrimitives(")?; + DafnyPrint::fmt_print(AwsCryptographyPrimitives, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Error.ComAmazonawsDynamodb(")?; + DafnyPrint::fmt_print(ComAmazonawsDynamodb, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::CollectionOfErrors{list, message, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.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.dbencryptionsdk.dynamodb.internaldafny.types.Error.Opaque(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::OpaqueWithText{obj, objMessage, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.dynamodb.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::DynamoDbEncryptionException{message, } => { + Hash::hash(message, _state) + }, + Error::AwsCryptographyDbEncryptionSdkStructuredEncryption{AwsCryptographyDbEncryptionSdkStructuredEncryption, } => { + Hash::hash(AwsCryptographyDbEncryptionSdkStructuredEncryption, _state) + }, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => { + Hash::hash(AwsCryptographyMaterialProviders, _state) + }, + Error::AwsCryptographyKeyStore{AwsCryptographyKeyStore, } => { + Hash::hash(AwsCryptographyKeyStore, _state) + }, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => { + Hash::hash(AwsCryptographyPrimitives, _state) + }, + Error::ComAmazonawsDynamodb{ComAmazonawsDynamodb, } => { + Hash::hash(ComAmazonawsDynamodb, _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::DynamoDbEncryptionException { + 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 structuredencryption { + pub mod internaldafny { + pub use ::std::rc::Rc; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::StructuredEncryptionConfig; + 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::materialproviders::internaldafny::MaterialProvidersClient; + pub use crate::implementation_from_dafny::r#_AwsCryptographyDbEncryptionSdkStructuredEncryptionOperations_Compile::Config; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::IStructuredEncryptionClient; + 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::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptStructureOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptStructureOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::EncryptPathStructureOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::DecryptPathStructureOutput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsInput; + pub use crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::ResolveAuthActionsOutput; + + pub struct _default {} + + impl _default { + pub fn DefaultStructuredEncryptionConfig() -> Rc { + Rc::new(StructuredEncryptionConfig::StructuredEncryptionConfig {}) + } + pub fn StructuredEncryption(config: &Rc) -> Rc, Rc>> { + let mut res = MaybePlacebo::, Rc>>>::new(); + let mut maybePrimitives = 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())); + maybePrimitives = MaybePlacebo::from(_out0.read()); + let mut valueOrError0: Rc, Rc>> = maybePrimitives.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::AwsCryptographyPrimitives { + AwsCryptographyPrimitives: e.clone() + }) + }) + })); + if valueOrError0.IsFailure() { + res = MaybePlacebo::from(valueOrError0.PropagateFailure::>()); + return res.read(); + }; + let mut primitives: Object = valueOrError0.Extract(); + let mut maybeMatProv = 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())); + maybeMatProv = MaybePlacebo::from(_out1.read()); + let mut valueOrError1: Rc, Rc>> = maybeMatProv.read().MapFailure::>(&({ + Rc::new(move |e: &Rc| -> Rc{ + Rc::new(crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::Error::AwsCryptographyMaterialProviders { + AwsCryptographyMaterialProviders: e.clone() + }) + }) + })); + if valueOrError1.IsFailure() { + res = MaybePlacebo::from(valueOrError1.PropagateFailure::>()); + return res.read(); + }; + let mut matProv: Object = valueOrError1.Extract(); + let mut client = MaybePlacebo::>::new(); + let mut _nw0: Object = crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::StructuredEncryptionClient::_allocate_object(); + crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::StructuredEncryptionClient::_ctor(&_nw0, &Rc::new(Config::Config { + primitives: primitives.clone(), + materialProviders: matProv.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 StructuredEncryptionClient { + pub r#__i_config: Rc + } + + impl StructuredEncryptionClient { + 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::dbencryptionsdk::structuredencryption::internaldafny::StructuredEncryptionClient { + UpcastObjectFn!(dyn Any); + } + + impl IStructuredEncryptionClient + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::StructuredEncryptionClient { + fn EncryptStructure(&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#_AwsCryptographyDbEncryptionSdkStructuredEncryptionOperations_Compile::_default::EncryptStructure(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn DecryptStructure(&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#_AwsCryptographyDbEncryptionSdkStructuredEncryptionOperations_Compile::_default::DecryptStructure(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn EncryptPathStructure(&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#_AwsCryptographyDbEncryptionSdkStructuredEncryptionOperations_Compile::_default::EncryptPathStructure(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn DecryptPathStructure(&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#_AwsCryptographyDbEncryptionSdkStructuredEncryptionOperations_Compile::_default::DecryptPathStructure(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + fn ResolveAuthActions(&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#_AwsCryptographyDbEncryptionSdkStructuredEncryptionOperations_Compile::_default::ResolveAuthActions(&self.config().clone(), input)); + output = MaybePlacebo::from(_out0.read()); + return output.read(); + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::StructuredEncryptionClient { + UpcastObjectFn!(dyn IStructuredEncryptionClient); + } + + pub mod types { + pub use ::dafny_runtime::Sequence; + 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::DafnyCharUTF16; + pub use ::dafny_runtime::Object; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::ICryptographicMaterialsManager; + pub use crate::implementation_from_dafny::r#_Wrappers_Compile::Option; + 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::DBEAlgorithmSuiteId; + pub use crate::implementation_from_dafny::software::amazon::cryptography::materialproviders::internaldafny::types::EncryptedDataKey; + 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_TerminalTypeId(x: &Sequence) -> bool { + !(x.cardinality() < int!(2)) && !(int!(2) < 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.dbencryptionsdk.structuredencryption.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 AuthenticateAction { + SIGN {}, + DO_NOT_SIGN {} + } + + impl AuthenticateAction {} + + impl Debug + for AuthenticateAction { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AuthenticateAction { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AuthenticateAction::SIGN{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.AuthenticateAction.SIGN")?; + Ok(()) + }, + AuthenticateAction::DO_NOT_SIGN{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.AuthenticateAction.DO__NOT__SIGN")?; + Ok(()) + }, + } + } + } + + impl AuthenticateAction { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(AuthenticateAction::SIGN {}), Rc::new(AuthenticateAction::DO_NOT_SIGN {})].iter() + } + } + + impl Eq + for AuthenticateAction {} + + impl Hash + for AuthenticateAction { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AuthenticateAction::SIGN{} => { + + }, + AuthenticateAction::DO_NOT_SIGN{} => { + + }, + } + } + } + + impl Default + for AuthenticateAction { + fn default() -> AuthenticateAction { + AuthenticateAction::SIGN {} + } + } + + impl AsRef + for AuthenticateAction { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum AuthItem { + AuthItem { + key: Sequence>, + data: Rc, + action: Rc + } + } + + impl AuthItem { + pub fn key(&self) -> &Sequence> { + match self { + AuthItem::AuthItem{key, data, action, } => key, + } + } + pub fn data(&self) -> &Rc { + match self { + AuthItem::AuthItem{key, data, action, } => data, + } + } + pub fn action(&self) -> &Rc { + match self { + AuthItem::AuthItem{key, data, action, } => action, + } + } + } + + impl Debug + for AuthItem { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for AuthItem { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + AuthItem::AuthItem{key, data, action, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.AuthItem.AuthItem(")?; + DafnyPrint::fmt_print(key, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(data, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(action, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for AuthItem {} + + impl Hash + for AuthItem { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + AuthItem::AuthItem{key, data, action, } => { + Hash::hash(key, _state); + Hash::hash(data, _state); + Hash::hash(action, _state) + }, + } + } + } + + impl Default + for AuthItem { + fn default() -> AuthItem { + AuthItem::AuthItem { + key: Default::default(), + data: Default::default(), + action: Default::default() + } + } + } + + impl AsRef + for AuthItem { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CryptoAction { + ENCRYPT_AND_SIGN {}, + SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT {}, + SIGN_ONLY {}, + DO_NOTHING {} + } + + impl CryptoAction {} + + impl Debug + for CryptoAction { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CryptoAction { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CryptoAction::ENCRYPT_AND_SIGN{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.CryptoAction.ENCRYPT__AND__SIGN")?; + Ok(()) + }, + CryptoAction::SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.CryptoAction.SIGN__AND__INCLUDE__IN__ENCRYPTION__CONTEXT")?; + Ok(()) + }, + CryptoAction::SIGN_ONLY{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.CryptoAction.SIGN__ONLY")?; + Ok(()) + }, + CryptoAction::DO_NOTHING{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.CryptoAction.DO__NOTHING")?; + Ok(()) + }, + } + } + } + + impl CryptoAction { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(CryptoAction::ENCRYPT_AND_SIGN {}), Rc::new(CryptoAction::SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT {}), Rc::new(CryptoAction::SIGN_ONLY {}), Rc::new(CryptoAction::DO_NOTHING {})].iter() + } + } + + impl Eq + for CryptoAction {} + + impl Hash + for CryptoAction { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CryptoAction::ENCRYPT_AND_SIGN{} => { + + }, + CryptoAction::SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT{} => { + + }, + CryptoAction::SIGN_ONLY{} => { + + }, + CryptoAction::DO_NOTHING{} => { + + }, + } + } + } + + impl Default + for CryptoAction { + fn default() -> CryptoAction { + CryptoAction::ENCRYPT_AND_SIGN {} + } + } + + impl AsRef + for CryptoAction { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum CryptoItem { + CryptoItem { + key: Sequence>, + data: Rc, + action: Rc + } + } + + impl CryptoItem { + pub fn key(&self) -> &Sequence> { + match self { + CryptoItem::CryptoItem{key, data, action, } => key, + } + } + pub fn data(&self) -> &Rc { + match self { + CryptoItem::CryptoItem{key, data, action, } => data, + } + } + pub fn action(&self) -> &Rc { + match self { + CryptoItem::CryptoItem{key, data, action, } => action, + } + } + } + + impl Debug + for CryptoItem { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for CryptoItem { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + CryptoItem::CryptoItem{key, data, action, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.CryptoItem.CryptoItem(")?; + DafnyPrint::fmt_print(key, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(data, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(action, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for CryptoItem {} + + impl Hash + for CryptoItem { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + CryptoItem::CryptoItem{key, data, action, } => { + Hash::hash(key, _state); + Hash::hash(data, _state); + Hash::hash(action, _state) + }, + } + } + } + + impl Default + for CryptoItem { + fn default() -> CryptoItem { + CryptoItem::CryptoItem { + key: Default::default(), + data: Default::default(), + action: Default::default() + } + } + } + + impl AsRef + for CryptoItem { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DecryptPathStructureInput { + DecryptPathStructureInput { + tableName: Sequence, + encryptedStructure: Sequence>, + cmm: Object, + encryptionContext: Rc>> + } + } + + impl DecryptPathStructureInput { + pub fn tableName(&self) -> &Sequence { + match self { + DecryptPathStructureInput::DecryptPathStructureInput{tableName, encryptedStructure, cmm, encryptionContext, } => tableName, + } + } + pub fn encryptedStructure(&self) -> &Sequence> { + match self { + DecryptPathStructureInput::DecryptPathStructureInput{tableName, encryptedStructure, cmm, encryptionContext, } => encryptedStructure, + } + } + pub fn cmm(&self) -> &Object { + match self { + DecryptPathStructureInput::DecryptPathStructureInput{tableName, encryptedStructure, cmm, encryptionContext, } => cmm, + } + } + pub fn encryptionContext(&self) -> &Rc>> { + match self { + DecryptPathStructureInput::DecryptPathStructureInput{tableName, encryptedStructure, cmm, encryptionContext, } => encryptionContext, + } + } + } + + impl Debug + for DecryptPathStructureInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecryptPathStructureInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecryptPathStructureInput::DecryptPathStructureInput{tableName, encryptedStructure, cmm, encryptionContext, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.DecryptPathStructureInput.DecryptPathStructureInput(")?; + DafnyPrint::fmt_print(tableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptedStructure, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cmm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecryptPathStructureInput {} + + impl Hash + for DecryptPathStructureInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecryptPathStructureInput::DecryptPathStructureInput{tableName, encryptedStructure, cmm, encryptionContext, } => { + Hash::hash(tableName, _state); + Hash::hash(encryptedStructure, _state); + Hash::hash(cmm, _state); + Hash::hash(encryptionContext, _state) + }, + } + } + } + + impl Default + for DecryptPathStructureInput { + fn default() -> DecryptPathStructureInput { + DecryptPathStructureInput::DecryptPathStructureInput { + tableName: Default::default(), + encryptedStructure: Default::default(), + cmm: Default::default(), + encryptionContext: Default::default() + } + } + } + + impl AsRef + for DecryptPathStructureInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DecryptPathStructureOutput { + DecryptPathStructureOutput { + plaintextStructure: Sequence>, + parsedHeader: Rc + } + } + + impl DecryptPathStructureOutput { + pub fn plaintextStructure(&self) -> &Sequence> { + match self { + DecryptPathStructureOutput::DecryptPathStructureOutput{plaintextStructure, parsedHeader, } => plaintextStructure, + } + } + pub fn parsedHeader(&self) -> &Rc { + match self { + DecryptPathStructureOutput::DecryptPathStructureOutput{plaintextStructure, parsedHeader, } => parsedHeader, + } + } + } + + impl Debug + for DecryptPathStructureOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecryptPathStructureOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecryptPathStructureOutput::DecryptPathStructureOutput{plaintextStructure, parsedHeader, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.DecryptPathStructureOutput.DecryptPathStructureOutput(")?; + DafnyPrint::fmt_print(plaintextStructure, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(parsedHeader, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecryptPathStructureOutput {} + + impl Hash + for DecryptPathStructureOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecryptPathStructureOutput::DecryptPathStructureOutput{plaintextStructure, parsedHeader, } => { + Hash::hash(plaintextStructure, _state); + Hash::hash(parsedHeader, _state) + }, + } + } + } + + impl Default + for DecryptPathStructureOutput { + fn default() -> DecryptPathStructureOutput { + DecryptPathStructureOutput::DecryptPathStructureOutput { + plaintextStructure: Default::default(), + parsedHeader: Default::default() + } + } + } + + impl AsRef + for DecryptPathStructureOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DecryptStructureInput { + DecryptStructureInput { + tableName: Sequence, + encryptedStructure: Map, Rc>, + authenticateSchema: Map, Rc>, + cmm: Object, + encryptionContext: Rc>> + } + } + + impl DecryptStructureInput { + pub fn tableName(&self) -> &Sequence { + match self { + DecryptStructureInput::DecryptStructureInput{tableName, encryptedStructure, authenticateSchema, cmm, encryptionContext, } => tableName, + } + } + pub fn encryptedStructure(&self) -> &Map, Rc> { + match self { + DecryptStructureInput::DecryptStructureInput{tableName, encryptedStructure, authenticateSchema, cmm, encryptionContext, } => encryptedStructure, + } + } + pub fn authenticateSchema(&self) -> &Map, Rc> { + match self { + DecryptStructureInput::DecryptStructureInput{tableName, encryptedStructure, authenticateSchema, cmm, encryptionContext, } => authenticateSchema, + } + } + pub fn cmm(&self) -> &Object { + match self { + DecryptStructureInput::DecryptStructureInput{tableName, encryptedStructure, authenticateSchema, cmm, encryptionContext, } => cmm, + } + } + pub fn encryptionContext(&self) -> &Rc>> { + match self { + DecryptStructureInput::DecryptStructureInput{tableName, encryptedStructure, authenticateSchema, cmm, encryptionContext, } => encryptionContext, + } + } + } + + impl Debug + for DecryptStructureInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecryptStructureInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecryptStructureInput::DecryptStructureInput{tableName, encryptedStructure, authenticateSchema, cmm, encryptionContext, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.DecryptStructureInput.DecryptStructureInput(")?; + DafnyPrint::fmt_print(tableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptedStructure, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(authenticateSchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cmm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecryptStructureInput {} + + impl Hash + for DecryptStructureInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecryptStructureInput::DecryptStructureInput{tableName, encryptedStructure, authenticateSchema, cmm, encryptionContext, } => { + Hash::hash(tableName, _state); + Hash::hash(encryptedStructure, _state); + Hash::hash(authenticateSchema, _state); + Hash::hash(cmm, _state); + Hash::hash(encryptionContext, _state) + }, + } + } + } + + impl Default + for DecryptStructureInput { + fn default() -> DecryptStructureInput { + DecryptStructureInput::DecryptStructureInput { + tableName: Default::default(), + encryptedStructure: Default::default(), + authenticateSchema: Default::default(), + cmm: Default::default(), + encryptionContext: Default::default() + } + } + } + + impl AsRef + for DecryptStructureInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum DecryptStructureOutput { + DecryptStructureOutput { + plaintextStructure: Map, Rc>, + cryptoSchema: Map, Rc>, + parsedHeader: Rc + } + } + + impl DecryptStructureOutput { + pub fn plaintextStructure(&self) -> &Map, Rc> { + match self { + DecryptStructureOutput::DecryptStructureOutput{plaintextStructure, cryptoSchema, parsedHeader, } => plaintextStructure, + } + } + pub fn cryptoSchema(&self) -> &Map, Rc> { + match self { + DecryptStructureOutput::DecryptStructureOutput{plaintextStructure, cryptoSchema, parsedHeader, } => cryptoSchema, + } + } + pub fn parsedHeader(&self) -> &Rc { + match self { + DecryptStructureOutput::DecryptStructureOutput{plaintextStructure, cryptoSchema, parsedHeader, } => parsedHeader, + } + } + } + + impl Debug + for DecryptStructureOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for DecryptStructureOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + DecryptStructureOutput::DecryptStructureOutput{plaintextStructure, cryptoSchema, parsedHeader, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.DecryptStructureOutput.DecryptStructureOutput(")?; + DafnyPrint::fmt_print(plaintextStructure, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cryptoSchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(parsedHeader, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for DecryptStructureOutput {} + + impl Hash + for DecryptStructureOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + DecryptStructureOutput::DecryptStructureOutput{plaintextStructure, cryptoSchema, parsedHeader, } => { + Hash::hash(plaintextStructure, _state); + Hash::hash(cryptoSchema, _state); + Hash::hash(parsedHeader, _state) + }, + } + } + } + + impl Default + for DecryptStructureOutput { + fn default() -> DecryptStructureOutput { + DecryptStructureOutput::DecryptStructureOutput { + plaintextStructure: Default::default(), + cryptoSchema: Default::default(), + parsedHeader: Default::default() + } + } + } + + impl AsRef + for DecryptStructureOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptPathStructureInput { + EncryptPathStructureInput { + tableName: Sequence, + plaintextStructure: Sequence>, + cmm: Object, + algorithmSuiteId: Rc>>, + encryptionContext: Rc>> + } + } + + impl EncryptPathStructureInput { + pub fn tableName(&self) -> &Sequence { + match self { + EncryptPathStructureInput::EncryptPathStructureInput{tableName, plaintextStructure, cmm, algorithmSuiteId, encryptionContext, } => tableName, + } + } + pub fn plaintextStructure(&self) -> &Sequence> { + match self { + EncryptPathStructureInput::EncryptPathStructureInput{tableName, plaintextStructure, cmm, algorithmSuiteId, encryptionContext, } => plaintextStructure, + } + } + pub fn cmm(&self) -> &Object { + match self { + EncryptPathStructureInput::EncryptPathStructureInput{tableName, plaintextStructure, cmm, algorithmSuiteId, encryptionContext, } => cmm, + } + } + pub fn algorithmSuiteId(&self) -> &Rc>> { + match self { + EncryptPathStructureInput::EncryptPathStructureInput{tableName, plaintextStructure, cmm, algorithmSuiteId, encryptionContext, } => algorithmSuiteId, + } + } + pub fn encryptionContext(&self) -> &Rc>> { + match self { + EncryptPathStructureInput::EncryptPathStructureInput{tableName, plaintextStructure, cmm, algorithmSuiteId, encryptionContext, } => encryptionContext, + } + } + } + + impl Debug + for EncryptPathStructureInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptPathStructureInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptPathStructureInput::EncryptPathStructureInput{tableName, plaintextStructure, cmm, algorithmSuiteId, encryptionContext, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.EncryptPathStructureInput.EncryptPathStructureInput(")?; + DafnyPrint::fmt_print(tableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(plaintextStructure, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cmm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptPathStructureInput {} + + impl Hash + for EncryptPathStructureInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptPathStructureInput::EncryptPathStructureInput{tableName, plaintextStructure, cmm, algorithmSuiteId, encryptionContext, } => { + Hash::hash(tableName, _state); + Hash::hash(plaintextStructure, _state); + Hash::hash(cmm, _state); + Hash::hash(algorithmSuiteId, _state); + Hash::hash(encryptionContext, _state) + }, + } + } + } + + impl Default + for EncryptPathStructureInput { + fn default() -> EncryptPathStructureInput { + EncryptPathStructureInput::EncryptPathStructureInput { + tableName: Default::default(), + plaintextStructure: Default::default(), + cmm: Default::default(), + algorithmSuiteId: Default::default(), + encryptionContext: Default::default() + } + } + } + + impl AsRef + for EncryptPathStructureInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptPathStructureOutput { + EncryptPathStructureOutput { + encryptedStructure: Sequence>, + parsedHeader: Rc + } + } + + impl EncryptPathStructureOutput { + pub fn encryptedStructure(&self) -> &Sequence> { + match self { + EncryptPathStructureOutput::EncryptPathStructureOutput{encryptedStructure, parsedHeader, } => encryptedStructure, + } + } + pub fn parsedHeader(&self) -> &Rc { + match self { + EncryptPathStructureOutput::EncryptPathStructureOutput{encryptedStructure, parsedHeader, } => parsedHeader, + } + } + } + + impl Debug + for EncryptPathStructureOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptPathStructureOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptPathStructureOutput::EncryptPathStructureOutput{encryptedStructure, parsedHeader, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.EncryptPathStructureOutput.EncryptPathStructureOutput(")?; + DafnyPrint::fmt_print(encryptedStructure, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(parsedHeader, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptPathStructureOutput {} + + impl Hash + for EncryptPathStructureOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptPathStructureOutput::EncryptPathStructureOutput{encryptedStructure, parsedHeader, } => { + Hash::hash(encryptedStructure, _state); + Hash::hash(parsedHeader, _state) + }, + } + } + } + + impl Default + for EncryptPathStructureOutput { + fn default() -> EncryptPathStructureOutput { + EncryptPathStructureOutput::EncryptPathStructureOutput { + encryptedStructure: Default::default(), + parsedHeader: Default::default() + } + } + } + + impl AsRef + for EncryptPathStructureOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptStructureInput { + EncryptStructureInput { + tableName: Sequence, + plaintextStructure: Map, Rc>, + cryptoSchema: Map, Rc>, + cmm: Object, + algorithmSuiteId: Rc>>, + encryptionContext: Rc>> + } + } + + impl EncryptStructureInput { + pub fn tableName(&self) -> &Sequence { + match self { + EncryptStructureInput::EncryptStructureInput{tableName, plaintextStructure, cryptoSchema, cmm, algorithmSuiteId, encryptionContext, } => tableName, + } + } + pub fn plaintextStructure(&self) -> &Map, Rc> { + match self { + EncryptStructureInput::EncryptStructureInput{tableName, plaintextStructure, cryptoSchema, cmm, algorithmSuiteId, encryptionContext, } => plaintextStructure, + } + } + pub fn cryptoSchema(&self) -> &Map, Rc> { + match self { + EncryptStructureInput::EncryptStructureInput{tableName, plaintextStructure, cryptoSchema, cmm, algorithmSuiteId, encryptionContext, } => cryptoSchema, + } + } + pub fn cmm(&self) -> &Object { + match self { + EncryptStructureInput::EncryptStructureInput{tableName, plaintextStructure, cryptoSchema, cmm, algorithmSuiteId, encryptionContext, } => cmm, + } + } + pub fn algorithmSuiteId(&self) -> &Rc>> { + match self { + EncryptStructureInput::EncryptStructureInput{tableName, plaintextStructure, cryptoSchema, cmm, algorithmSuiteId, encryptionContext, } => algorithmSuiteId, + } + } + pub fn encryptionContext(&self) -> &Rc>> { + match self { + EncryptStructureInput::EncryptStructureInput{tableName, plaintextStructure, cryptoSchema, cmm, algorithmSuiteId, encryptionContext, } => encryptionContext, + } + } + } + + impl Debug + for EncryptStructureInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptStructureInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptStructureInput::EncryptStructureInput{tableName, plaintextStructure, cryptoSchema, cmm, algorithmSuiteId, encryptionContext, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.EncryptStructureInput.EncryptStructureInput(")?; + DafnyPrint::fmt_print(tableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(plaintextStructure, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cryptoSchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cmm, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptStructureInput {} + + impl Hash + for EncryptStructureInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptStructureInput::EncryptStructureInput{tableName, plaintextStructure, cryptoSchema, cmm, algorithmSuiteId, encryptionContext, } => { + Hash::hash(tableName, _state); + Hash::hash(plaintextStructure, _state); + Hash::hash(cryptoSchema, _state); + Hash::hash(cmm, _state); + Hash::hash(algorithmSuiteId, _state); + Hash::hash(encryptionContext, _state) + }, + } + } + } + + impl Default + for EncryptStructureInput { + fn default() -> EncryptStructureInput { + EncryptStructureInput::EncryptStructureInput { + tableName: Default::default(), + plaintextStructure: Default::default(), + cryptoSchema: Default::default(), + cmm: Default::default(), + algorithmSuiteId: Default::default(), + encryptionContext: Default::default() + } + } + } + + impl AsRef + for EncryptStructureInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum EncryptStructureOutput { + EncryptStructureOutput { + encryptedStructure: Map, Rc>, + cryptoSchema: Map, Rc>, + parsedHeader: Rc + } + } + + impl EncryptStructureOutput { + pub fn encryptedStructure(&self) -> &Map, Rc> { + match self { + EncryptStructureOutput::EncryptStructureOutput{encryptedStructure, cryptoSchema, parsedHeader, } => encryptedStructure, + } + } + pub fn cryptoSchema(&self) -> &Map, Rc> { + match self { + EncryptStructureOutput::EncryptStructureOutput{encryptedStructure, cryptoSchema, parsedHeader, } => cryptoSchema, + } + } + pub fn parsedHeader(&self) -> &Rc { + match self { + EncryptStructureOutput::EncryptStructureOutput{encryptedStructure, cryptoSchema, parsedHeader, } => parsedHeader, + } + } + } + + impl Debug + for EncryptStructureOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for EncryptStructureOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + EncryptStructureOutput::EncryptStructureOutput{encryptedStructure, cryptoSchema, parsedHeader, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.EncryptStructureOutput.EncryptStructureOutput(")?; + DafnyPrint::fmt_print(encryptedStructure, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(cryptoSchema, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(parsedHeader, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for EncryptStructureOutput {} + + impl Hash + for EncryptStructureOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + EncryptStructureOutput::EncryptStructureOutput{encryptedStructure, cryptoSchema, parsedHeader, } => { + Hash::hash(encryptedStructure, _state); + Hash::hash(cryptoSchema, _state); + Hash::hash(parsedHeader, _state) + }, + } + } + } + + impl Default + for EncryptStructureOutput { + fn default() -> EncryptStructureOutput { + EncryptStructureOutput::EncryptStructureOutput { + encryptedStructure: Default::default(), + cryptoSchema: Default::default(), + parsedHeader: Default::default() + } + } + } + + impl AsRef + for EncryptStructureOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ParsedHeader { + ParsedHeader { + algorithmSuiteId: Rc, + encryptedDataKeys: Sequence>, + storedEncryptionContext: Map, + encryptionContext: Map + } + } + + impl ParsedHeader { + pub fn algorithmSuiteId(&self) -> &Rc { + match self { + ParsedHeader::ParsedHeader{algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, } => algorithmSuiteId, + } + } + pub fn encryptedDataKeys(&self) -> &Sequence> { + match self { + ParsedHeader::ParsedHeader{algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, } => encryptedDataKeys, + } + } + pub fn storedEncryptionContext(&self) -> &Map { + match self { + ParsedHeader::ParsedHeader{algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, } => storedEncryptionContext, + } + } + pub fn encryptionContext(&self) -> &Map { + match self { + ParsedHeader::ParsedHeader{algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, } => encryptionContext, + } + } + } + + impl Debug + for ParsedHeader { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ParsedHeader { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ParsedHeader::ParsedHeader{algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.ParsedHeader.ParsedHeader(")?; + DafnyPrint::fmt_print(algorithmSuiteId, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptedDataKeys, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(storedEncryptionContext, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(encryptionContext, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ParsedHeader {} + + impl Hash + for ParsedHeader { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ParsedHeader::ParsedHeader{algorithmSuiteId, encryptedDataKeys, storedEncryptionContext, encryptionContext, } => { + Hash::hash(algorithmSuiteId, _state); + Hash::hash(encryptedDataKeys, _state); + Hash::hash(storedEncryptionContext, _state); + Hash::hash(encryptionContext, _state) + }, + } + } + } + + impl Default + for ParsedHeader { + fn default() -> ParsedHeader { + ParsedHeader::ParsedHeader { + algorithmSuiteId: Default::default(), + encryptedDataKeys: Default::default(), + storedEncryptionContext: Default::default(), + encryptionContext: Default::default() + } + } + } + + impl AsRef + for ParsedHeader { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum PathSegment { + member { + member: Rc + } + } + + impl PathSegment { + pub fn member(&self) -> &Rc { + match self { + PathSegment::member{member, } => member, + } + } + } + + impl Debug + for PathSegment { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for PathSegment { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + PathSegment::member{member, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.PathSegment.member(")?; + DafnyPrint::fmt_print(member, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for PathSegment {} + + impl Hash + for PathSegment { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + PathSegment::member{member, } => { + Hash::hash(member, _state) + }, + } + } + } + + impl Default + for PathSegment { + fn default() -> PathSegment { + PathSegment::member { + member: Default::default() + } + } + } + + impl AsRef + for PathSegment { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ResolveAuthActionsInput { + ResolveAuthActionsInput { + tableName: Sequence, + authActions: Sequence>, + headerBytes: Sequence + } + } + + impl ResolveAuthActionsInput { + pub fn tableName(&self) -> &Sequence { + match self { + ResolveAuthActionsInput::ResolveAuthActionsInput{tableName, authActions, headerBytes, } => tableName, + } + } + pub fn authActions(&self) -> &Sequence> { + match self { + ResolveAuthActionsInput::ResolveAuthActionsInput{tableName, authActions, headerBytes, } => authActions, + } + } + pub fn headerBytes(&self) -> &Sequence { + match self { + ResolveAuthActionsInput::ResolveAuthActionsInput{tableName, authActions, headerBytes, } => headerBytes, + } + } + } + + impl Debug + for ResolveAuthActionsInput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ResolveAuthActionsInput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ResolveAuthActionsInput::ResolveAuthActionsInput{tableName, authActions, headerBytes, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.ResolveAuthActionsInput.ResolveAuthActionsInput(")?; + DafnyPrint::fmt_print(tableName, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(authActions, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(headerBytes, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ResolveAuthActionsInput {} + + impl Hash + for ResolveAuthActionsInput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ResolveAuthActionsInput::ResolveAuthActionsInput{tableName, authActions, headerBytes, } => { + Hash::hash(tableName, _state); + Hash::hash(authActions, _state); + Hash::hash(headerBytes, _state) + }, + } + } + } + + impl Default + for ResolveAuthActionsInput { + fn default() -> ResolveAuthActionsInput { + ResolveAuthActionsInput::ResolveAuthActionsInput { + tableName: Default::default(), + authActions: Default::default(), + headerBytes: Default::default() + } + } + } + + impl AsRef + for ResolveAuthActionsInput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum ResolveAuthActionsOutput { + ResolveAuthActionsOutput { + cryptoActions: Sequence> + } + } + + impl ResolveAuthActionsOutput { + pub fn cryptoActions(&self) -> &Sequence> { + match self { + ResolveAuthActionsOutput::ResolveAuthActionsOutput{cryptoActions, } => cryptoActions, + } + } + } + + impl Debug + for ResolveAuthActionsOutput { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for ResolveAuthActionsOutput { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + ResolveAuthActionsOutput::ResolveAuthActionsOutput{cryptoActions, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.ResolveAuthActionsOutput.ResolveAuthActionsOutput(")?; + DafnyPrint::fmt_print(cryptoActions, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for ResolveAuthActionsOutput {} + + impl Hash + for ResolveAuthActionsOutput { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + ResolveAuthActionsOutput::ResolveAuthActionsOutput{cryptoActions, } => { + Hash::hash(cryptoActions, _state) + }, + } + } + } + + impl Default + for ResolveAuthActionsOutput { + fn default() -> ResolveAuthActionsOutput { + ResolveAuthActionsOutput::ResolveAuthActionsOutput { + cryptoActions: Default::default() + } + } + } + + impl AsRef + for ResolveAuthActionsOutput { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum StructuredDataTerminal { + StructuredDataTerminal { + value: Sequence, + typeId: crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::TerminalTypeId + } + } + + impl StructuredDataTerminal { + pub fn value(&self) -> &Sequence { + match self { + StructuredDataTerminal::StructuredDataTerminal{value, typeId, } => value, + } + } + pub fn typeId(&self) -> &crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::TerminalTypeId { + match self { + StructuredDataTerminal::StructuredDataTerminal{value, typeId, } => typeId, + } + } + } + + impl Debug + for StructuredDataTerminal { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for StructuredDataTerminal { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + StructuredDataTerminal::StructuredDataTerminal{value, typeId, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.StructuredDataTerminal.StructuredDataTerminal(")?; + DafnyPrint::fmt_print(value, _formatter, false)?; + write!(_formatter, ", ")?; + DafnyPrint::fmt_print(typeId, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for StructuredDataTerminal {} + + impl Hash + for StructuredDataTerminal { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + StructuredDataTerminal::StructuredDataTerminal{value, typeId, } => { + Hash::hash(value, _state); + Hash::hash(typeId, _state) + }, + } + } + } + + impl Default + for StructuredDataTerminal { + fn default() -> StructuredDataTerminal { + StructuredDataTerminal::StructuredDataTerminal { + value: Default::default(), + typeId: Default::default() + } + } + } + + impl AsRef + for StructuredDataTerminal { + fn as_ref(&self) -> &Self { + self + } + } + + pub struct IStructuredEncryptionClientCallHistory {} + + impl IStructuredEncryptionClientCallHistory { + pub fn _allocate_object() -> Object { + allocate_object::() + } + } + + impl UpcastObject + for crate::implementation_from_dafny::software::amazon::cryptography::dbencryptionsdk::structuredencryption::internaldafny::types::IStructuredEncryptionClientCallHistory { + UpcastObjectFn!(dyn Any); + } + + pub trait IStructuredEncryptionClient: Any + UpcastObject { + fn EncryptStructure(&self, input: &Rc) -> Rc, Rc>>; + fn DecryptStructure(&self, input: &Rc) -> Rc, Rc>>; + fn EncryptPathStructure(&self, input: &Rc) -> Rc, Rc>>; + fn DecryptPathStructure(&self, input: &Rc) -> Rc, Rc>>; + fn ResolveAuthActions(&self, input: &Rc) -> Rc, Rc>>; + } + + #[derive(PartialEq, Clone)] + pub enum StructuredEncryptionConfig { + StructuredEncryptionConfig {} + } + + impl StructuredEncryptionConfig {} + + impl Debug + for StructuredEncryptionConfig { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for StructuredEncryptionConfig { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + StructuredEncryptionConfig::StructuredEncryptionConfig{} => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.StructuredEncryptionConfig.StructuredEncryptionConfig")?; + Ok(()) + }, + } + } + } + + impl StructuredEncryptionConfig { + pub fn _AllSingletonConstructors() -> SequenceIter> { + seq![Rc::new(StructuredEncryptionConfig::StructuredEncryptionConfig {})].iter() + } + } + + impl Eq + for StructuredEncryptionConfig {} + + impl Hash + for StructuredEncryptionConfig { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + StructuredEncryptionConfig::StructuredEncryptionConfig{} => { + + }, + } + } + } + + impl Default + for StructuredEncryptionConfig { + fn default() -> StructuredEncryptionConfig { + StructuredEncryptionConfig::StructuredEncryptionConfig {} + } + } + + impl AsRef + for StructuredEncryptionConfig { + fn as_ref(&self) -> &Self { + self + } + } + + #[derive(PartialEq, Clone)] + pub enum StructureSegment { + StructureSegment { + key: Sequence + } + } + + impl StructureSegment { + pub fn key(&self) -> &Sequence { + match self { + StructureSegment::StructureSegment{key, } => key, + } + } + } + + impl Debug + for StructureSegment { + fn fmt(&self, f: &mut Formatter) -> ::std::fmt::Result { + DafnyPrint::fmt_print(self, f, true) + } + } + + impl DafnyPrint + for StructureSegment { + fn fmt_print(&self, _formatter: &mut Formatter, _in_seq: bool) -> std::fmt::Result { + match self { + StructureSegment::StructureSegment{key, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.StructureSegment.StructureSegment(")?; + DafnyPrint::fmt_print(key, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + } + } + } + + impl Eq + for StructureSegment {} + + impl Hash + for StructureSegment { + fn hash<_H: Hasher>(&self, _state: &mut _H) { + match self { + StructureSegment::StructureSegment{key, } => { + Hash::hash(key, _state) + }, + } + } + } + + impl Default + for StructureSegment { + fn default() -> StructureSegment { + StructureSegment::StructureSegment { + key: Default::default() + } + } + } + + impl AsRef + for StructureSegment { + fn as_ref(&self) -> &Self { + self + } + } + + pub type TerminalTypeId = Sequence; + + #[derive(PartialEq, Clone)] + pub enum Error { + StructuredEncryptionException { + 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::StructuredEncryptionException{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::StructuredEncryptionException{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::StructuredEncryptionException{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::StructuredEncryptionException{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::StructuredEncryptionException{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::StructuredEncryptionException{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::StructuredEncryptionException{message, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.Error.StructuredEncryptionException(")?; + DafnyPrint::fmt_print(message, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyMaterialProviders{AwsCryptographyMaterialProviders, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.Error.AwsCryptographyMaterialProviders(")?; + DafnyPrint::fmt_print(AwsCryptographyMaterialProviders, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::AwsCryptographyPrimitives{AwsCryptographyPrimitives, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.Error.AwsCryptographyPrimitives(")?; + DafnyPrint::fmt_print(AwsCryptographyPrimitives, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::CollectionOfErrors{list, message, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.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.dbencryptionsdk.structuredencryption.internaldafny.types.Error.Opaque(")?; + DafnyPrint::fmt_print(obj, _formatter, false)?; + write!(_formatter, ")")?; + Ok(()) + }, + Error::OpaqueWithText{obj, objMessage, } => { + write!(_formatter, "software.amazon.cryptography.dbencryptionsdk.structuredencryption.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::StructuredEncryptionException{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::StructuredEncryptionException { + 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::rd; + 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(rd!(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(rd!(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(rd!(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(rd!(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(rd!(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(rd!(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(rd!(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(rd!(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(rd!(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(rd!(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