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 _request_id: Option<String>,
17}
18impl ReEncryptOutput {
19 pub fn ciphertext_blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
21 self.ciphertext_blob.as_ref()
22 }
23 pub fn source_key_id(&self) -> ::std::option::Option<&str> {
25 self.source_key_id.as_deref()
26 }
27 pub fn key_id(&self) -> ::std::option::Option<&str> {
29 self.key_id.as_deref()
30 }
31 pub fn source_encryption_algorithm(&self) -> ::std::option::Option<&crate::types::EncryptionAlgorithmSpec> {
33 self.source_encryption_algorithm.as_ref()
34 }
35 pub fn destination_encryption_algorithm(&self) -> ::std::option::Option<&crate::types::EncryptionAlgorithmSpec> {
37 self.destination_encryption_algorithm.as_ref()
38 }
39}
40impl ::aws_types::request_id::RequestId for ReEncryptOutput {
41 fn request_id(&self) -> Option<&str> {
42 self._request_id.as_deref()
43 }
44}
45impl ReEncryptOutput {
46 pub fn builder() -> crate::operation::re_encrypt::builders::ReEncryptOutputBuilder {
48 crate::operation::re_encrypt::builders::ReEncryptOutputBuilder::default()
49 }
50}
51
52#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct ReEncryptOutputBuilder {
56 pub(crate) ciphertext_blob: ::std::option::Option<::aws_smithy_types::Blob>,
57 pub(crate) source_key_id: ::std::option::Option<::std::string::String>,
58 pub(crate) key_id: ::std::option::Option<::std::string::String>,
59 pub(crate) source_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
60 pub(crate) destination_encryption_algorithm: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>,
61 _request_id: Option<String>,
62}
63impl ReEncryptOutputBuilder {
64 pub fn ciphertext_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
66 self.ciphertext_blob = ::std::option::Option::Some(input);
67 self
68 }
69 pub fn set_ciphertext_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
71 self.ciphertext_blob = input;
72 self
73 }
74 pub fn get_ciphertext_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
76 &self.ciphertext_blob
77 }
78 pub fn source_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80 self.source_key_id = ::std::option::Option::Some(input.into());
81 self
82 }
83 pub fn set_source_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85 self.source_key_id = input;
86 self
87 }
88 pub fn get_source_key_id(&self) -> &::std::option::Option<::std::string::String> {
90 &self.source_key_id
91 }
92 pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.key_id = ::std::option::Option::Some(input.into());
95 self
96 }
97 pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.key_id = input;
100 self
101 }
102 pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> {
104 &self.key_id
105 }
106 pub fn source_encryption_algorithm(mut self, input: crate::types::EncryptionAlgorithmSpec) -> Self {
108 self.source_encryption_algorithm = ::std::option::Option::Some(input);
109 self
110 }
111 pub fn set_source_encryption_algorithm(mut self, input: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>) -> Self {
113 self.source_encryption_algorithm = input;
114 self
115 }
116 pub fn get_source_encryption_algorithm(&self) -> &::std::option::Option<crate::types::EncryptionAlgorithmSpec> {
118 &self.source_encryption_algorithm
119 }
120 pub fn destination_encryption_algorithm(mut self, input: crate::types::EncryptionAlgorithmSpec) -> Self {
122 self.destination_encryption_algorithm = ::std::option::Option::Some(input);
123 self
124 }
125 pub fn set_destination_encryption_algorithm(mut self, input: ::std::option::Option<crate::types::EncryptionAlgorithmSpec>) -> Self {
127 self.destination_encryption_algorithm = input;
128 self
129 }
130 pub fn get_destination_encryption_algorithm(&self) -> &::std::option::Option<crate::types::EncryptionAlgorithmSpec> {
132 &self.destination_encryption_algorithm
133 }
134 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
135 self._request_id = Some(request_id.into());
136 self
137 }
138
139 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
140 self._request_id = request_id;
141 self
142 }
143 pub fn build(self) -> crate::operation::re_encrypt::ReEncryptOutput {
145 crate::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}