aws_db_esdk/deps/aws_cryptography_keyStore/conversions/
kms_configuration.rs1#[allow(dead_code)]
5pub fn to_dafny(
6 value: &crate::deps::aws_cryptography_keyStore::types::KmsConfiguration,
7) -> ::dafny_runtime::Rc<
8 crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration,
9> {
10 ::dafny_runtime::Rc::new(match value {
11 crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsKeyArn(x) =>
12 crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::kmsKeyArn {
13 kmsKeyArn: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&x),
14 },
15crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsMrKeyArn(x) =>
16 crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::kmsMRKeyArn {
17 kmsMRKeyArn: dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&x),
18 },
19crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::Discovery(x) =>
20 crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::discovery {
21 discovery: crate::deps::aws_cryptography_keyStore::conversions::discovery::to_dafny(&x.clone())
22,
23 },
24crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::MrDiscovery(x) =>
25 crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::mrDiscovery {
26 mrDiscovery: crate::deps::aws_cryptography_keyStore::conversions::mr_discovery::to_dafny(&x.clone())
27,
28 },
29 _ => panic!("Unknown union variant: {:?}", value),
30 })
31}
32
33#[allow(dead_code)]
34pub fn from_dafny(
35 dafny_value: ::dafny_runtime::Rc<
36 crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration,
37 >,
38) -> crate::deps::aws_cryptography_keyStore::types::KmsConfiguration {
39 match &::dafny_runtime::Rc::unwrap_or_clone(dafny_value) {
40 crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::kmsKeyArn {
41 kmsKeyArn: x @ _,
42} => crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsKeyArn(dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(x)),
43crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::kmsMRKeyArn {
44 kmsMRKeyArn: x @ _,
45} => crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::KmsMrKeyArn(dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(x)),
46crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::discovery {
47 discovery: x @ _,
48} => crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::Discovery(crate::deps::aws_cryptography_keyStore::conversions::discovery::from_dafny(x.clone())
49),
50crate::r#software::amazon::cryptography::keystore::internaldafny::types::KMSConfiguration::mrDiscovery {
51 mrDiscovery: x @ _,
52} => crate::deps::aws_cryptography_keyStore::types::KmsConfiguration::MrDiscovery(crate::deps::aws_cryptography_keyStore::conversions::mr_discovery::from_dafny(x.clone())
53),
54 }
55}