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, ::std::fmt::Debug)]
5pub struct ReEncryptOutput {
6/// <p>The reencrypted data. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
7pub ciphertext_blob: ::std::option::Option<::aws_smithy_types::Blob>,
8/// <p>Unique identifier of the KMS key used to originally encrypt the data.</p>
9pub source_key_id: ::std::option::Option<::std::string::String>,
10/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that was used to reencrypt the data.</p>
11pub key_id: ::std::option::Option<::std::string::String>,
12/// <p>The encryption algorithm that was used to decrypt the ciphertext before it was reencrypted.</p>
13pub source_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
14/// <p>The encryption algorithm that was used to reencrypt the data.</p>
15pub destination_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
16 _request_id: Option<String>,
17}
18impl ReEncryptOutput {
19/// <p>The reencrypted data. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
20pub fn ciphertext_blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
21self.ciphertext_blob.as_ref()
22 }
23/// <p>Unique identifier of the KMS key used to originally encrypt the data.</p>
24pub fn source_key_id(&self) -> ::std::option::Option<&str> {
25self.source_key_id.as_deref()
26 }
27/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that was used to reencrypt the data.</p>
28pub fn key_id(&self) -> ::std::option::Option<&str> {
29self.key_id.as_deref()
30 }
31/// <p>The encryption algorithm that was used to decrypt the ciphertext before it was reencrypted.</p>
32pub fn source_encryption_algorithm(&self) -> ::std::option::Option<&crate::types::EncryptionAlgorithmSpec> {
33self.source_encryption_algorithm.as_ref()
34 }
35/// <p>The encryption algorithm that was used to reencrypt the data.</p>
36pub fn destination_encryption_algorithm(&self) -> ::std::option::Option<&crate::types::EncryptionAlgorithmSpec> {
37self.destination_encryption_algorithm.as_ref()
38 }
39}
40impl ::aws_types::request_id::RequestId for ReEncryptOutput {
41fn request_id(&self) -> Option<&str> {
42self._request_id.as_deref()
43 }
44}
45impl ReEncryptOutput {
46/// Creates a new builder-style object to manufacture [`ReEncryptOutput`](crate::operation::re_encrypt::ReEncryptOutput).
47pub fn builder() -> crate::operation::re_encrypt::builders::ReEncryptOutputBuilder {
48crate::operation::re_encrypt::builders::ReEncryptOutputBuilder::default()
49 }
50}
5152/// A builder for [`ReEncryptOutput`](crate::operation::re_encrypt::ReEncryptOutput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct ReEncryptOutputBuilder {
56pub(crate) ciphertext_blob: ::std::option::Option<::aws_smithy_types::Blob>,
57pub(crate) source_key_id: ::std::option::Option<::std::string::String>,
58pub(crate) key_id: ::std::option::Option<::std::string::String>,
59pub(crate) source_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
60pub(crate) destination_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
61 _request_id: Option<String>,
62}
63impl ReEncryptOutputBuilder {
64/// <p>The reencrypted data. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
65pub fn ciphertext_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
66self.ciphertext_blob = ::std::option::Option::Some(input);
67self
68}
69/// <p>The reencrypted data. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
70pub fn set_ciphertext_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
71self.ciphertext_blob = input;
72self
73}
74/// <p>The reencrypted data. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
75pub fn get_ciphertext_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
76&self.ciphertext_blob
77 }
78/// <p>Unique identifier of the KMS key used to originally encrypt the data.</p>
79pub fn source_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80self.source_key_id = ::std::option::Option::Some(input.into());
81self
82}
83/// <p>Unique identifier of the KMS key used to originally encrypt the data.</p>
84pub fn set_source_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85self.source_key_id = input;
86self
87}
88/// <p>Unique identifier of the KMS key used to originally encrypt the data.</p>
89pub fn get_source_key_id(&self) -> &::std::option::Option<::std::string::String> {
90&self.source_key_id
91 }
92/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that was used to reencrypt the data.</p>
93pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94self.key_id = ::std::option::Option::Some(input.into());
95self
96}
97/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that was used to reencrypt the data.</p>
98pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99self.key_id = input;
100self
101}
102/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that was used to reencrypt the data.</p>
103pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> {
104&self.key_id
105 }
106/// <p>The encryption algorithm that was used to decrypt the ciphertext before it was reencrypted.</p>
107pub fn source_encryption_algorithm(mut self, input: crate::types::EncryptionAlgorithmSpec) -> Self {
108self.source_encryption_algorithm = ::std::option::Option::Some(input);
109self
110}
111/// <p>The encryption algorithm that was used to decrypt the ciphertext before it was reencrypted.</p>
112pub fn set_source_encryption_algorithm(mut self, input: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>) -> Self {
113self.source_encryption_algorithm = input;
114self
115}
116/// <p>The encryption algorithm that was used to decrypt the ciphertext before it was reencrypted.</p>
117pub fn get_source_encryption_algorithm(&self) -> &::std::option::Option<crate::types::EncryptionAlgorithmSpec> {
118&self.source_encryption_algorithm
119 }
120/// <p>The encryption algorithm that was used to reencrypt the data.</p>
121pub fn destination_encryption_algorithm(mut self, input: crate::types::EncryptionAlgorithmSpec) -> Self {
122self.destination_encryption_algorithm = ::std::option::Option::Some(input);
123self
124}
125/// <p>The encryption algorithm that was used to reencrypt the data.</p>
126pub fn set_destination_encryption_algorithm(mut self, input: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>) -> Self {
127self.destination_encryption_algorithm = input;
128self
129}
130/// <p>The encryption algorithm that was used to reencrypt the data.</p>
131pub fn get_destination_encryption_algorithm(&self) -> &::std::option::Option<crate::types::EncryptionAlgorithmSpec> {
132&self.destination_encryption_algorithm
133 }
134pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
135self._request_id = Some(request_id.into());
136self
137}
138139pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
140self._request_id = request_id;
141self
142}
143/// Consumes the builder and constructs a [`ReEncryptOutput`](crate::operation::re_encrypt::ReEncryptOutput).
144pub fn build(self) -> crate::operation::re_encrypt::ReEncryptOutput {
145crate::operation::re_encrypt::ReEncryptOutput {
146 ciphertext_blob: self.ciphertext_blob,
147 source_key_id: self.source_key_id,
148 key_id: self.key_id,
149 source_encryption_algorithm: self.source_encryption_algorithm,
150 destination_encryption_algorithm: self.destination_encryption_algorithm,
151 _request_id: self._request_id,
152 }
153 }
154}