aws_sdk_paymentcryptographydata/operation/re_encrypt_data/
_re_encrypt_data_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct ReEncryptDataInput {
6    /// <p>The <code>keyARN</code> of the encryption key of incoming ciphertext data.</p>
7    /// <p>When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.</p>
8    pub incoming_key_identifier: ::std::option::Option<::std::string::String>,
9    /// <p>The <code>keyARN</code> of the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
10    pub outgoing_key_identifier: ::std::option::Option<::std::string::String>,
11    /// <p>Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.</p>
12    pub cipher_text: ::std::option::Option<::std::string::String>,
13    /// <p>The attributes and values for incoming ciphertext.</p>
14    pub incoming_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
15    /// <p>The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
16    pub outgoing_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
17    /// <p>The WrappedKeyBlock containing the encryption key of incoming ciphertext data.</p>
18    pub incoming_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
19    /// <p>The WrappedKeyBlock containing the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
20    pub outgoing_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
21}
22impl ReEncryptDataInput {
23    /// <p>The <code>keyARN</code> of the encryption key of incoming ciphertext data.</p>
24    /// <p>When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.</p>
25    pub fn incoming_key_identifier(&self) -> ::std::option::Option<&str> {
26        self.incoming_key_identifier.as_deref()
27    }
28    /// <p>The <code>keyARN</code> of the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
29    pub fn outgoing_key_identifier(&self) -> ::std::option::Option<&str> {
30        self.outgoing_key_identifier.as_deref()
31    }
32    /// <p>Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.</p>
33    pub fn cipher_text(&self) -> ::std::option::Option<&str> {
34        self.cipher_text.as_deref()
35    }
36    /// <p>The attributes and values for incoming ciphertext.</p>
37    pub fn incoming_encryption_attributes(&self) -> ::std::option::Option<&crate::types::ReEncryptionAttributes> {
38        self.incoming_encryption_attributes.as_ref()
39    }
40    /// <p>The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
41    pub fn outgoing_encryption_attributes(&self) -> ::std::option::Option<&crate::types::ReEncryptionAttributes> {
42        self.outgoing_encryption_attributes.as_ref()
43    }
44    /// <p>The WrappedKeyBlock containing the encryption key of incoming ciphertext data.</p>
45    pub fn incoming_wrapped_key(&self) -> ::std::option::Option<&crate::types::WrappedKey> {
46        self.incoming_wrapped_key.as_ref()
47    }
48    /// <p>The WrappedKeyBlock containing the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
49    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    /// Creates a new builder-style object to manufacture [`ReEncryptDataInput`](crate::operation::re_encrypt_data::ReEncryptDataInput).
68    pub fn builder() -> crate::operation::re_encrypt_data::builders::ReEncryptDataInputBuilder {
69        crate::operation::re_encrypt_data::builders::ReEncryptDataInputBuilder::default()
70    }
71}
72
73/// A builder for [`ReEncryptDataInput`](crate::operation::re_encrypt_data::ReEncryptDataInput).
74#[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    /// <p>The <code>keyARN</code> of the encryption key of incoming ciphertext data.</p>
87    /// <p>When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.</p>
88    /// This field is required.
89    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    /// <p>The <code>keyARN</code> of the encryption key of incoming ciphertext data.</p>
94    /// <p>When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.</p>
95    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    /// <p>The <code>keyARN</code> of the encryption key of incoming ciphertext data.</p>
100    /// <p>When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.</p>
101    pub fn get_incoming_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
102        &self.incoming_key_identifier
103    }
104    /// <p>The <code>keyARN</code> of the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
105    /// This field is required.
106    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    /// <p>The <code>keyARN</code> of the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
111    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    /// <p>The <code>keyARN</code> of the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
116    pub fn get_outgoing_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
117        &self.outgoing_key_identifier
118    }
119    /// <p>Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.</p>
120    /// This field is required.
121    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    /// <p>Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.</p>
126    pub fn set_cipher_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.cipher_text = input;
128        self
129    }
130    /// <p>Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.</p>
131    pub fn get_cipher_text(&self) -> &::std::option::Option<::std::string::String> {
132        &self.cipher_text
133    }
134    /// <p>The attributes and values for incoming ciphertext.</p>
135    /// This field is required.
136    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    /// <p>The attributes and values for incoming ciphertext.</p>
141    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    /// <p>The attributes and values for incoming ciphertext.</p>
146    pub fn get_incoming_encryption_attributes(&self) -> &::std::option::Option<crate::types::ReEncryptionAttributes> {
147        &self.incoming_encryption_attributes
148    }
149    /// <p>The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
150    /// This field is required.
151    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    /// <p>The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
156    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    /// <p>The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
161    pub fn get_outgoing_encryption_attributes(&self) -> &::std::option::Option<crate::types::ReEncryptionAttributes> {
162        &self.outgoing_encryption_attributes
163    }
164    /// <p>The WrappedKeyBlock containing the encryption key of incoming ciphertext data.</p>
165    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    /// <p>The WrappedKeyBlock containing the encryption key of incoming ciphertext data.</p>
170    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    /// <p>The WrappedKeyBlock containing the encryption key of incoming ciphertext data.</p>
175    pub fn get_incoming_wrapped_key(&self) -> &::std::option::Option<crate::types::WrappedKey> {
176        &self.incoming_wrapped_key
177    }
178    /// <p>The WrappedKeyBlock containing the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
179    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    /// <p>The WrappedKeyBlock containing the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
184    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    /// <p>The WrappedKeyBlock containing the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
189    pub fn get_outgoing_wrapped_key(&self) -> &::std::option::Option<crate::types::WrappedKey> {
190        &self.outgoing_wrapped_key
191    }
192    /// Consumes the builder and constructs a [`ReEncryptDataInput`](crate::operation::re_encrypt_data::ReEncryptDataInput).
193    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}