aws_sdk_paymentcryptographydata/operation/re_encrypt_data/
_re_encrypt_data_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct ReEncryptDataInput {
6 pub incoming_key_identifier: ::std::option::Option<::std::string::String>,
9 pub outgoing_key_identifier: ::std::option::Option<::std::string::String>,
11 pub cipher_text: ::std::option::Option<::std::string::String>,
13 pub incoming_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
15 pub outgoing_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
17 pub incoming_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
19 pub outgoing_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
21}
22impl ReEncryptDataInput {
23 pub fn incoming_key_identifier(&self) -> ::std::option::Option<&str> {
26 self.incoming_key_identifier.as_deref()
27 }
28 pub fn outgoing_key_identifier(&self) -> ::std::option::Option<&str> {
30 self.outgoing_key_identifier.as_deref()
31 }
32 pub fn cipher_text(&self) -> ::std::option::Option<&str> {
34 self.cipher_text.as_deref()
35 }
36 pub fn incoming_encryption_attributes(&self) -> ::std::option::Option<&crate::types::ReEncryptionAttributes> {
38 self.incoming_encryption_attributes.as_ref()
39 }
40 pub fn outgoing_encryption_attributes(&self) -> ::std::option::Option<&crate::types::ReEncryptionAttributes> {
42 self.outgoing_encryption_attributes.as_ref()
43 }
44 pub fn incoming_wrapped_key(&self) -> ::std::option::Option<&crate::types::WrappedKey> {
46 self.incoming_wrapped_key.as_ref()
47 }
48 pub fn outgoing_wrapped_key(&self) -> ::std::option::Option<&crate::types::WrappedKey> {
50 self.outgoing_wrapped_key.as_ref()
51 }
52}
53impl ::std::fmt::Debug for ReEncryptDataInput {
54 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
55 let mut formatter = f.debug_struct("ReEncryptDataInput");
56 formatter.field("incoming_key_identifier", &self.incoming_key_identifier);
57 formatter.field("outgoing_key_identifier", &self.outgoing_key_identifier);
58 formatter.field("cipher_text", &"*** Sensitive Data Redacted ***");
59 formatter.field("incoming_encryption_attributes", &self.incoming_encryption_attributes);
60 formatter.field("outgoing_encryption_attributes", &self.outgoing_encryption_attributes);
61 formatter.field("incoming_wrapped_key", &self.incoming_wrapped_key);
62 formatter.field("outgoing_wrapped_key", &self.outgoing_wrapped_key);
63 formatter.finish()
64 }
65}
66impl ReEncryptDataInput {
67 pub fn builder() -> crate::operation::re_encrypt_data::builders::ReEncryptDataInputBuilder {
69 crate::operation::re_encrypt_data::builders::ReEncryptDataInputBuilder::default()
70 }
71}
72
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
75#[non_exhaustive]
76pub struct ReEncryptDataInputBuilder {
77 pub(crate) incoming_key_identifier: ::std::option::Option<::std::string::String>,
78 pub(crate) outgoing_key_identifier: ::std::option::Option<::std::string::String>,
79 pub(crate) cipher_text: ::std::option::Option<::std::string::String>,
80 pub(crate) incoming_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
81 pub(crate) outgoing_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
82 pub(crate) incoming_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
83 pub(crate) outgoing_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
84}
85impl ReEncryptDataInputBuilder {
86 pub fn incoming_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90 self.incoming_key_identifier = ::std::option::Option::Some(input.into());
91 self
92 }
93 pub fn set_incoming_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.incoming_key_identifier = input;
97 self
98 }
99 pub fn get_incoming_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
102 &self.incoming_key_identifier
103 }
104 pub fn outgoing_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 self.outgoing_key_identifier = ::std::option::Option::Some(input.into());
108 self
109 }
110 pub fn set_outgoing_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112 self.outgoing_key_identifier = input;
113 self
114 }
115 pub fn get_outgoing_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
117 &self.outgoing_key_identifier
118 }
119 pub fn cipher_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.cipher_text = ::std::option::Option::Some(input.into());
123 self
124 }
125 pub fn set_cipher_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.cipher_text = input;
128 self
129 }
130 pub fn get_cipher_text(&self) -> &::std::option::Option<::std::string::String> {
132 &self.cipher_text
133 }
134 pub fn incoming_encryption_attributes(mut self, input: crate::types::ReEncryptionAttributes) -> Self {
137 self.incoming_encryption_attributes = ::std::option::Option::Some(input);
138 self
139 }
140 pub fn set_incoming_encryption_attributes(mut self, input: ::std::option::Option<crate::types::ReEncryptionAttributes>) -> Self {
142 self.incoming_encryption_attributes = input;
143 self
144 }
145 pub fn get_incoming_encryption_attributes(&self) -> &::std::option::Option<crate::types::ReEncryptionAttributes> {
147 &self.incoming_encryption_attributes
148 }
149 pub fn outgoing_encryption_attributes(mut self, input: crate::types::ReEncryptionAttributes) -> Self {
152 self.outgoing_encryption_attributes = ::std::option::Option::Some(input);
153 self
154 }
155 pub fn set_outgoing_encryption_attributes(mut self, input: ::std::option::Option<crate::types::ReEncryptionAttributes>) -> Self {
157 self.outgoing_encryption_attributes = input;
158 self
159 }
160 pub fn get_outgoing_encryption_attributes(&self) -> &::std::option::Option<crate::types::ReEncryptionAttributes> {
162 &self.outgoing_encryption_attributes
163 }
164 pub fn incoming_wrapped_key(mut self, input: crate::types::WrappedKey) -> Self {
166 self.incoming_wrapped_key = ::std::option::Option::Some(input);
167 self
168 }
169 pub fn set_incoming_wrapped_key(mut self, input: ::std::option::Option<crate::types::WrappedKey>) -> Self {
171 self.incoming_wrapped_key = input;
172 self
173 }
174 pub fn get_incoming_wrapped_key(&self) -> &::std::option::Option<crate::types::WrappedKey> {
176 &self.incoming_wrapped_key
177 }
178 pub fn outgoing_wrapped_key(mut self, input: crate::types::WrappedKey) -> Self {
180 self.outgoing_wrapped_key = ::std::option::Option::Some(input);
181 self
182 }
183 pub fn set_outgoing_wrapped_key(mut self, input: ::std::option::Option<crate::types::WrappedKey>) -> Self {
185 self.outgoing_wrapped_key = input;
186 self
187 }
188 pub fn get_outgoing_wrapped_key(&self) -> &::std::option::Option<crate::types::WrappedKey> {
190 &self.outgoing_wrapped_key
191 }
192 pub fn build(
194 self,
195 ) -> ::std::result::Result<crate::operation::re_encrypt_data::ReEncryptDataInput, ::aws_smithy_types::error::operation::BuildError> {
196 ::std::result::Result::Ok(crate::operation::re_encrypt_data::ReEncryptDataInput {
197 incoming_key_identifier: self.incoming_key_identifier,
198 outgoing_key_identifier: self.outgoing_key_identifier,
199 cipher_text: self.cipher_text,
200 incoming_encryption_attributes: self.incoming_encryption_attributes,
201 outgoing_encryption_attributes: self.outgoing_encryption_attributes,
202 incoming_wrapped_key: self.incoming_wrapped_key,
203 outgoing_wrapped_key: self.outgoing_wrapped_key,
204 })
205 }
206}
207impl ::std::fmt::Debug for ReEncryptDataInputBuilder {
208 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
209 let mut formatter = f.debug_struct("ReEncryptDataInputBuilder");
210 formatter.field("incoming_key_identifier", &self.incoming_key_identifier);
211 formatter.field("outgoing_key_identifier", &self.outgoing_key_identifier);
212 formatter.field("cipher_text", &"*** Sensitive Data Redacted ***");
213 formatter.field("incoming_encryption_attributes", &self.incoming_encryption_attributes);
214 formatter.field("outgoing_encryption_attributes", &self.outgoing_encryption_attributes);
215 formatter.field("incoming_wrapped_key", &self.incoming_wrapped_key);
216 formatter.field("outgoing_wrapped_key", &self.outgoing_wrapped_key);
217 formatter.finish()
218 }
219}