aws_db_esdk/deps/com_amazonaws_kms/conversions/
recipient_info.rs

1// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2// SPDX-License-Identifier: Apache-2.0
3// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
4#[allow(dead_code)]
5pub fn to_dafny(
6    value: &aws_sdk_kms::types::RecipientInfo,
7) -> ::dafny_runtime::Rc<
8    crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RecipientInfo,
9> {
10    ::dafny_runtime::Rc::new(
11    crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RecipientInfo::RecipientInfo {
12        KeyEncryptionAlgorithm: ::dafny_runtime::Rc::new(match &value.key_encryption_algorithm {
13    Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_kms::conversions::key_encryption_mechanism::to_dafny(x.clone()) },
14    None => crate::_Wrappers_Compile::Option::None { }
15})
16,
17 AttestationDocument: crate::standard_library_conversions::oblob_to_dafny(&value.attestation_document),
18    }
19  )
20}
21#[allow(dead_code)]
22pub fn from_dafny(
23    dafny_value: ::dafny_runtime::Rc<
24        crate::r#software::amazon::cryptography::services::kms::internaldafny::types::RecipientInfo,
25    >,
26) -> aws_sdk_kms::types::RecipientInfo {
27    aws_sdk_kms::types::RecipientInfo::builder()
28        .set_key_encryption_algorithm(match &**dafny_value.KeyEncryptionAlgorithm() {
29            crate::r#_Wrappers_Compile::Option::Some { value } => Some(
30                crate::deps::com_amazonaws_kms::conversions::key_encryption_mechanism::from_dafny(
31                    value,
32                ),
33            ),
34            _ => None,
35        })
36        .set_attestation_document(crate::standard_library_conversions::oblob_from_dafny(
37            dafny_value.AttestationDocument().clone(),
38        ))
39        .build()
40}