aws_sdk_databasemigration/types/
_certificate.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Certificate {
7 pub certificate_identifier: ::std::option::Option<::std::string::String>,
9 pub certificate_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
11 pub certificate_pem: ::std::option::Option<::std::string::String>,
13 pub certificate_wallet: ::std::option::Option<::aws_smithy_types::Blob>,
15 pub certificate_arn: ::std::option::Option<::std::string::String>,
17 pub certificate_owner: ::std::option::Option<::std::string::String>,
19 pub valid_from_date: ::std::option::Option<::aws_smithy_types::DateTime>,
21 pub valid_to_date: ::std::option::Option<::aws_smithy_types::DateTime>,
23 pub signing_algorithm: ::std::option::Option<::std::string::String>,
25 pub key_length: ::std::option::Option<i32>,
27 pub kms_key_id: ::std::option::Option<::std::string::String>,
31}
32impl Certificate {
33 pub fn certificate_identifier(&self) -> ::std::option::Option<&str> {
35 self.certificate_identifier.as_deref()
36 }
37 pub fn certificate_creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
39 self.certificate_creation_date.as_ref()
40 }
41 pub fn certificate_pem(&self) -> ::std::option::Option<&str> {
43 self.certificate_pem.as_deref()
44 }
45 pub fn certificate_wallet(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
47 self.certificate_wallet.as_ref()
48 }
49 pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
51 self.certificate_arn.as_deref()
52 }
53 pub fn certificate_owner(&self) -> ::std::option::Option<&str> {
55 self.certificate_owner.as_deref()
56 }
57 pub fn valid_from_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59 self.valid_from_date.as_ref()
60 }
61 pub fn valid_to_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
63 self.valid_to_date.as_ref()
64 }
65 pub fn signing_algorithm(&self) -> ::std::option::Option<&str> {
67 self.signing_algorithm.as_deref()
68 }
69 pub fn key_length(&self) -> ::std::option::Option<i32> {
71 self.key_length
72 }
73 pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
77 self.kms_key_id.as_deref()
78 }
79}
80impl Certificate {
81 pub fn builder() -> crate::types::builders::CertificateBuilder {
83 crate::types::builders::CertificateBuilder::default()
84 }
85}
86
87#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
89#[non_exhaustive]
90pub struct CertificateBuilder {
91 pub(crate) certificate_identifier: ::std::option::Option<::std::string::String>,
92 pub(crate) certificate_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
93 pub(crate) certificate_pem: ::std::option::Option<::std::string::String>,
94 pub(crate) certificate_wallet: ::std::option::Option<::aws_smithy_types::Blob>,
95 pub(crate) certificate_arn: ::std::option::Option<::std::string::String>,
96 pub(crate) certificate_owner: ::std::option::Option<::std::string::String>,
97 pub(crate) valid_from_date: ::std::option::Option<::aws_smithy_types::DateTime>,
98 pub(crate) valid_to_date: ::std::option::Option<::aws_smithy_types::DateTime>,
99 pub(crate) signing_algorithm: ::std::option::Option<::std::string::String>,
100 pub(crate) key_length: ::std::option::Option<i32>,
101 pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
102}
103impl CertificateBuilder {
104 pub fn certificate_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106 self.certificate_identifier = ::std::option::Option::Some(input.into());
107 self
108 }
109 pub fn set_certificate_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111 self.certificate_identifier = input;
112 self
113 }
114 pub fn get_certificate_identifier(&self) -> &::std::option::Option<::std::string::String> {
116 &self.certificate_identifier
117 }
118 pub fn certificate_creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
120 self.certificate_creation_date = ::std::option::Option::Some(input);
121 self
122 }
123 pub fn set_certificate_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
125 self.certificate_creation_date = input;
126 self
127 }
128 pub fn get_certificate_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
130 &self.certificate_creation_date
131 }
132 pub fn certificate_pem(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.certificate_pem = ::std::option::Option::Some(input.into());
135 self
136 }
137 pub fn set_certificate_pem(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.certificate_pem = input;
140 self
141 }
142 pub fn get_certificate_pem(&self) -> &::std::option::Option<::std::string::String> {
144 &self.certificate_pem
145 }
146 pub fn certificate_wallet(mut self, input: ::aws_smithy_types::Blob) -> Self {
148 self.certificate_wallet = ::std::option::Option::Some(input);
149 self
150 }
151 pub fn set_certificate_wallet(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
153 self.certificate_wallet = input;
154 self
155 }
156 pub fn get_certificate_wallet(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
158 &self.certificate_wallet
159 }
160 pub fn certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162 self.certificate_arn = ::std::option::Option::Some(input.into());
163 self
164 }
165 pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167 self.certificate_arn = input;
168 self
169 }
170 pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
172 &self.certificate_arn
173 }
174 pub fn certificate_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176 self.certificate_owner = ::std::option::Option::Some(input.into());
177 self
178 }
179 pub fn set_certificate_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181 self.certificate_owner = input;
182 self
183 }
184 pub fn get_certificate_owner(&self) -> &::std::option::Option<::std::string::String> {
186 &self.certificate_owner
187 }
188 pub fn valid_from_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
190 self.valid_from_date = ::std::option::Option::Some(input);
191 self
192 }
193 pub fn set_valid_from_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
195 self.valid_from_date = input;
196 self
197 }
198 pub fn get_valid_from_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
200 &self.valid_from_date
201 }
202 pub fn valid_to_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
204 self.valid_to_date = ::std::option::Option::Some(input);
205 self
206 }
207 pub fn set_valid_to_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
209 self.valid_to_date = input;
210 self
211 }
212 pub fn get_valid_to_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
214 &self.valid_to_date
215 }
216 pub fn signing_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
218 self.signing_algorithm = ::std::option::Option::Some(input.into());
219 self
220 }
221 pub fn set_signing_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223 self.signing_algorithm = input;
224 self
225 }
226 pub fn get_signing_algorithm(&self) -> &::std::option::Option<::std::string::String> {
228 &self.signing_algorithm
229 }
230 pub fn key_length(mut self, input: i32) -> Self {
232 self.key_length = ::std::option::Option::Some(input);
233 self
234 }
235 pub fn set_key_length(mut self, input: ::std::option::Option<i32>) -> Self {
237 self.key_length = input;
238 self
239 }
240 pub fn get_key_length(&self) -> &::std::option::Option<i32> {
242 &self.key_length
243 }
244 pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
248 self.kms_key_id = ::std::option::Option::Some(input.into());
249 self
250 }
251 pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
255 self.kms_key_id = input;
256 self
257 }
258 pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
262 &self.kms_key_id
263 }
264 pub fn build(self) -> crate::types::Certificate {
266 crate::types::Certificate {
267 certificate_identifier: self.certificate_identifier,
268 certificate_creation_date: self.certificate_creation_date,
269 certificate_pem: self.certificate_pem,
270 certificate_wallet: self.certificate_wallet,
271 certificate_arn: self.certificate_arn,
272 certificate_owner: self.certificate_owner,
273 valid_from_date: self.valid_from_date,
274 valid_to_date: self.valid_to_date,
275 signing_algorithm: self.signing_algorithm,
276 key_length: self.key_length,
277 kms_key_id: self.kms_key_id,
278 }
279 }
280}