aws_db_esdk/deps/aws_cryptography_materialProviders/operation/on_encrypt/
builders.rs1pub use crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::_on_encrypt_output::OnEncryptOutputBuilder;
5
6pub use crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::_on_encrypt_input::OnEncryptInputBuilder;
7
8impl OnEncryptInputBuilder {
9 pub async fn send_with(
11 self,
12 keyring: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef,
13 ) -> ::std::result::Result<
14 crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput,
15 crate::deps::aws_cryptography_materialProviders::types::error::Error,
16 > {
17 let mut fluent_builder = keyring.on_encrypt();
18 fluent_builder.inner = self;
19 fluent_builder.send().await
20 }
21}
22#[derive(::std::clone::Clone, ::std::fmt::Debug)]
25pub struct OnEncryptFluentBuilder {
26 keyring: crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef,
27 pub(crate) inner: crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::builders::OnEncryptInputBuilder,
28}
29impl OnEncryptFluentBuilder {
30 pub(crate) fn new(
32 keyring: crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef,
33 ) -> Self {
34 Self {
35 keyring,
36 inner: ::std::default::Default::default(),
37 }
38 }
39 pub fn as_input(&self) -> &crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::builders::OnEncryptInputBuilder{
41 &self.inner
42 }
43 pub async fn send(
45 self,
46 ) -> ::std::result::Result<
47 crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput,
48 crate::deps::aws_cryptography_materialProviders::types::error::Error,
49 > {
50 let input = self
51 .inner
52 .build()
53 .map_err(|mut e| {
58 let msg = format!("{:?}", e);
59 crate::deps::aws_cryptography_materialProviders::types::error::Error::OpaqueWithText {
60 obj: ::dafny_runtime::Object::from_ref(&mut e as &mut ::dafny_runtime::DynAny),
61 objMessage: msg
62 }})?;
63 crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncrypt::send(
64 &self.keyring,
65 input,
66 )
67 .await
68 }
69
70 #[allow(missing_docs)]
71 pub fn materials(
72 mut self,
73 input: impl ::std::convert::Into<
74 crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials,
75 >,
76 ) -> Self {
77 self.inner = self.inner.materials(input.into());
78 self
79 }
80 #[allow(missing_docs)]
81 pub fn set_materials(
82 mut self,
83 input: ::std::option::Option<
84 crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials,
85 >,
86 ) -> Self {
87 self.inner = self.inner.set_materials(input);
88 self
89 }
90 #[allow(missing_docs)]
91 pub fn get_materials(
92 &self,
93 ) -> &::std::option::Option<
94 crate::deps::aws_cryptography_materialProviders::types::EncryptionMaterials,
95 > {
96 self.inner.get_materials()
97 }
98}