1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ReEncryptOutput {
/// <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>
pub ciphertext_blob: ::std::option::Option<::aws_smithy_types::Blob>,
/// <p>Unique identifier of the KMS key used to originally encrypt the data.</p>
pub source_key_id: ::std::option::Option<::std::string::String>,
/// <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>
pub key_id: ::std::option::Option<::std::string::String>,
/// <p>The encryption algorithm that was used to decrypt the ciphertext before it was reencrypted.</p>
pub source_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
/// <p>The encryption algorithm that was used to reencrypt the data.</p>
pub destination_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
/// <p>The identifier of the key material used to originally encrypt the data. This field is present only when the original encryption used a symmetric encryption KMS key.</p>
pub source_key_material_id: ::std::option::Option<::std::string::String>,
/// <p>The identifier of the key material used to reencrypt the data. This field is present only when data is reencrypted using a symmetric encryption KMS key.</p>
pub destination_key_material_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl ReEncryptOutput {
/// <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>
pub fn ciphertext_blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
self.ciphertext_blob.as_ref()
}
/// <p>Unique identifier of the KMS key used to originally encrypt the data.</p>
pub fn source_key_id(&self) -> ::std::option::Option<&str> {
self.source_key_id.as_deref()
}
/// <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>
pub fn key_id(&self) -> ::std::option::Option<&str> {
self.key_id.as_deref()
}
/// <p>The encryption algorithm that was used to decrypt the ciphertext before it was reencrypted.</p>
pub fn source_encryption_algorithm(&self) -> ::std::option::Option<&crate::types::EncryptionAlgorithmSpec> {
self.source_encryption_algorithm.as_ref()
}
/// <p>The encryption algorithm that was used to reencrypt the data.</p>
pub fn destination_encryption_algorithm(&self) -> ::std::option::Option<&crate::types::EncryptionAlgorithmSpec> {
self.destination_encryption_algorithm.as_ref()
}
/// <p>The identifier of the key material used to originally encrypt the data. This field is present only when the original encryption used a symmetric encryption KMS key.</p>
pub fn source_key_material_id(&self) -> ::std::option::Option<&str> {
self.source_key_material_id.as_deref()
}
/// <p>The identifier of the key material used to reencrypt the data. This field is present only when data is reencrypted using a symmetric encryption KMS key.</p>
pub fn destination_key_material_id(&self) -> ::std::option::Option<&str> {
self.destination_key_material_id.as_deref()
}
}
impl ::aws_types::request_id::RequestId for ReEncryptOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl ReEncryptOutput {
/// Creates a new builder-style object to manufacture [`ReEncryptOutput`](crate::operation::re_encrypt::ReEncryptOutput).
pub fn builder() -> crate::operation::re_encrypt::builders::ReEncryptOutputBuilder {
crate::operation::re_encrypt::builders::ReEncryptOutputBuilder::default()
}
}
/// A builder for [`ReEncryptOutput`](crate::operation::re_encrypt::ReEncryptOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ReEncryptOutputBuilder {
pub(crate) ciphertext_blob: ::std::option::Option<::aws_smithy_types::Blob>,
pub(crate) source_key_id: ::std::option::Option<::std::string::String>,
pub(crate) key_id: ::std::option::Option<::std::string::String>,
pub(crate) source_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
pub(crate) destination_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
pub(crate) source_key_material_id: ::std::option::Option<::std::string::String>,
pub(crate) destination_key_material_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl ReEncryptOutputBuilder {
/// <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>
pub fn ciphertext_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.ciphertext_blob = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_ciphertext_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.ciphertext_blob = input;
self
}
/// <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>
pub fn get_ciphertext_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.ciphertext_blob
}
/// <p>Unique identifier of the KMS key used to originally encrypt the data.</p>
pub fn source_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_key_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Unique identifier of the KMS key used to originally encrypt the data.</p>
pub fn set_source_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_key_id = input;
self
}
/// <p>Unique identifier of the KMS key used to originally encrypt the data.</p>
pub fn get_source_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.source_key_id
}
/// <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>
pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.key_id = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.key_id = input;
self
}
/// <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>
pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.key_id
}
/// <p>The encryption algorithm that was used to decrypt the ciphertext before it was reencrypted.</p>
pub fn source_encryption_algorithm(mut self, input: crate::types::EncryptionAlgorithmSpec) -> Self {
self.source_encryption_algorithm = ::std::option::Option::Some(input);
self
}
/// <p>The encryption algorithm that was used to decrypt the ciphertext before it was reencrypted.</p>
pub fn set_source_encryption_algorithm(mut self, input: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>) -> Self {
self.source_encryption_algorithm = input;
self
}
/// <p>The encryption algorithm that was used to decrypt the ciphertext before it was reencrypted.</p>
pub fn get_source_encryption_algorithm(&self) -> &::std::option::Option<crate::types::EncryptionAlgorithmSpec> {
&self.source_encryption_algorithm
}
/// <p>The encryption algorithm that was used to reencrypt the data.</p>
pub fn destination_encryption_algorithm(mut self, input: crate::types::EncryptionAlgorithmSpec) -> Self {
self.destination_encryption_algorithm = ::std::option::Option::Some(input);
self
}
/// <p>The encryption algorithm that was used to reencrypt the data.</p>
pub fn set_destination_encryption_algorithm(mut self, input: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>) -> Self {
self.destination_encryption_algorithm = input;
self
}
/// <p>The encryption algorithm that was used to reencrypt the data.</p>
pub fn get_destination_encryption_algorithm(&self) -> &::std::option::Option<crate::types::EncryptionAlgorithmSpec> {
&self.destination_encryption_algorithm
}
/// <p>The identifier of the key material used to originally encrypt the data. This field is present only when the original encryption used a symmetric encryption KMS key.</p>
pub fn source_key_material_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_key_material_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the key material used to originally encrypt the data. This field is present only when the original encryption used a symmetric encryption KMS key.</p>
pub fn set_source_key_material_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_key_material_id = input;
self
}
/// <p>The identifier of the key material used to originally encrypt the data. This field is present only when the original encryption used a symmetric encryption KMS key.</p>
pub fn get_source_key_material_id(&self) -> &::std::option::Option<::std::string::String> {
&self.source_key_material_id
}
/// <p>The identifier of the key material used to reencrypt the data. This field is present only when data is reencrypted using a symmetric encryption KMS key.</p>
pub fn destination_key_material_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.destination_key_material_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the key material used to reencrypt the data. This field is present only when data is reencrypted using a symmetric encryption KMS key.</p>
pub fn set_destination_key_material_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.destination_key_material_id = input;
self
}
/// <p>The identifier of the key material used to reencrypt the data. This field is present only when data is reencrypted using a symmetric encryption KMS key.</p>
pub fn get_destination_key_material_id(&self) -> &::std::option::Option<::std::string::String> {
&self.destination_key_material_id
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`ReEncryptOutput`](crate::operation::re_encrypt::ReEncryptOutput).
pub fn build(self) -> crate::operation::re_encrypt::ReEncryptOutput {
crate::operation::re_encrypt::ReEncryptOutput {
ciphertext_blob: self.ciphertext_blob,
source_key_id: self.source_key_id,
key_id: self.key_id,
source_encryption_algorithm: self.source_encryption_algorithm,
destination_encryption_algorithm: self.destination_encryption_algorithm,
source_key_material_id: self.source_key_material_id,
destination_key_material_id: self.destination_key_material_id,
_request_id: self._request_id,
}
}
}