aws_sdk_kms/operation/re_encrypt/
_re_encrypt_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ReEncryptOutput {
6 pub ciphertext_blob: ::std::option::Option<::aws_smithy_types::Blob>,
8 pub source_key_id: ::std::option::Option<::std::string::String>,
10 pub key_id: ::std::option::Option<::std::string::String>,
12 pub source_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
14 pub destination_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
16 pub source_key_material_id: ::std::option::Option<::std::string::String>,
18 pub destination_key_material_id: ::std::option::Option<::std::string::String>,
20 _request_id: Option<String>,
21}
22impl ReEncryptOutput {
23 pub fn ciphertext_blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
25 self.ciphertext_blob.as_ref()
26 }
27 pub fn source_key_id(&self) -> ::std::option::Option<&str> {
29 self.source_key_id.as_deref()
30 }
31 pub fn key_id(&self) -> ::std::option::Option<&str> {
33 self.key_id.as_deref()
34 }
35 pub fn source_encryption_algorithm(&self) -> ::std::option::Option<&crate::types::EncryptionAlgorithmSpec> {
37 self.source_encryption_algorithm.as_ref()
38 }
39 pub fn destination_encryption_algorithm(&self) -> ::std::option::Option<&crate::types::EncryptionAlgorithmSpec> {
41 self.destination_encryption_algorithm.as_ref()
42 }
43 pub fn source_key_material_id(&self) -> ::std::option::Option<&str> {
45 self.source_key_material_id.as_deref()
46 }
47 pub fn destination_key_material_id(&self) -> ::std::option::Option<&str> {
49 self.destination_key_material_id.as_deref()
50 }
51}
52impl ::aws_types::request_id::RequestId for ReEncryptOutput {
53 fn request_id(&self) -> Option<&str> {
54 self._request_id.as_deref()
55 }
56}
57impl ReEncryptOutput {
58 pub fn builder() -> crate::operation::re_encrypt::builders::ReEncryptOutputBuilder {
60 crate::operation::re_encrypt::builders::ReEncryptOutputBuilder::default()
61 }
62}
63
64#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct ReEncryptOutputBuilder {
68 pub(crate) ciphertext_blob: ::std::option::Option<::aws_smithy_types::Blob>,
69 pub(crate) source_key_id: ::std::option::Option<::std::string::String>,
70 pub(crate) key_id: ::std::option::Option<::std::string::String>,
71 pub(crate) source_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
72 pub(crate) destination_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
73 pub(crate) source_key_material_id: ::std::option::Option<::std::string::String>,
74 pub(crate) destination_key_material_id: ::std::option::Option<::std::string::String>,
75 _request_id: Option<String>,
76}
77impl ReEncryptOutputBuilder {
78 pub fn ciphertext_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
80 self.ciphertext_blob = ::std::option::Option::Some(input);
81 self
82 }
83 pub fn set_ciphertext_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
85 self.ciphertext_blob = input;
86 self
87 }
88 pub fn get_ciphertext_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
90 &self.ciphertext_blob
91 }
92 pub fn source_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.source_key_id = ::std::option::Option::Some(input.into());
95 self
96 }
97 pub fn set_source_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.source_key_id = input;
100 self
101 }
102 pub fn get_source_key_id(&self) -> &::std::option::Option<::std::string::String> {
104 &self.source_key_id
105 }
106 pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.key_id = ::std::option::Option::Some(input.into());
109 self
110 }
111 pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.key_id = input;
114 self
115 }
116 pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> {
118 &self.key_id
119 }
120 pub fn source_encryption_algorithm(mut self, input: crate::types::EncryptionAlgorithmSpec) -> Self {
122 self.source_encryption_algorithm = ::std::option::Option::Some(input);
123 self
124 }
125 pub fn set_source_encryption_algorithm(mut self, input: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>) -> Self {
127 self.source_encryption_algorithm = input;
128 self
129 }
130 pub fn get_source_encryption_algorithm(&self) -> &::std::option::Option<crate::types::EncryptionAlgorithmSpec> {
132 &self.source_encryption_algorithm
133 }
134 pub fn destination_encryption_algorithm(mut self, input: crate::types::EncryptionAlgorithmSpec) -> Self {
136 self.destination_encryption_algorithm = ::std::option::Option::Some(input);
137 self
138 }
139 pub fn set_destination_encryption_algorithm(mut self, input: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>) -> Self {
141 self.destination_encryption_algorithm = input;
142 self
143 }
144 pub fn get_destination_encryption_algorithm(&self) -> &::std::option::Option<crate::types::EncryptionAlgorithmSpec> {
146 &self.destination_encryption_algorithm
147 }
148 pub fn source_key_material_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.source_key_material_id = ::std::option::Option::Some(input.into());
151 self
152 }
153 pub fn set_source_key_material_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.source_key_material_id = input;
156 self
157 }
158 pub fn get_source_key_material_id(&self) -> &::std::option::Option<::std::string::String> {
160 &self.source_key_material_id
161 }
162 pub fn destination_key_material_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164 self.destination_key_material_id = ::std::option::Option::Some(input.into());
165 self
166 }
167 pub fn set_destination_key_material_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169 self.destination_key_material_id = input;
170 self
171 }
172 pub fn get_destination_key_material_id(&self) -> &::std::option::Option<::std::string::String> {
174 &self.destination_key_material_id
175 }
176 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
177 self._request_id = Some(request_id.into());
178 self
179 }
180
181 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
182 self._request_id = request_id;
183 self
184 }
185 pub fn build(self) -> crate::operation::re_encrypt::ReEncryptOutput {
187 crate::operation::re_encrypt::ReEncryptOutput {
188 ciphertext_blob: self.ciphertext_blob,
189 source_key_id: self.source_key_id,
190 key_id: self.key_id,
191 source_encryption_algorithm: self.source_encryption_algorithm,
192 destination_encryption_algorithm: self.destination_encryption_algorithm,
193 source_key_material_id: self.source_key_material_id,
194 destination_key_material_id: self.destination_key_material_id,
195 _request_id: self._request_id,
196 }
197 }
198}