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}
28impl Certificate {
29 pub fn certificate_identifier(&self) -> ::std::option::Option<&str> {
31 self.certificate_identifier.as_deref()
32 }
33 pub fn certificate_creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
35 self.certificate_creation_date.as_ref()
36 }
37 pub fn certificate_pem(&self) -> ::std::option::Option<&str> {
39 self.certificate_pem.as_deref()
40 }
41 pub fn certificate_wallet(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
43 self.certificate_wallet.as_ref()
44 }
45 pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
47 self.certificate_arn.as_deref()
48 }
49 pub fn certificate_owner(&self) -> ::std::option::Option<&str> {
51 self.certificate_owner.as_deref()
52 }
53 pub fn valid_from_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
55 self.valid_from_date.as_ref()
56 }
57 pub fn valid_to_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59 self.valid_to_date.as_ref()
60 }
61 pub fn signing_algorithm(&self) -> ::std::option::Option<&str> {
63 self.signing_algorithm.as_deref()
64 }
65 pub fn key_length(&self) -> ::std::option::Option<i32> {
67 self.key_length
68 }
69}
70impl Certificate {
71 pub fn builder() -> crate::types::builders::CertificateBuilder {
73 crate::types::builders::CertificateBuilder::default()
74 }
75}
76
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
79#[non_exhaustive]
80pub struct CertificateBuilder {
81 pub(crate) certificate_identifier: ::std::option::Option<::std::string::String>,
82 pub(crate) certificate_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
83 pub(crate) certificate_pem: ::std::option::Option<::std::string::String>,
84 pub(crate) certificate_wallet: ::std::option::Option<::aws_smithy_types::Blob>,
85 pub(crate) certificate_arn: ::std::option::Option<::std::string::String>,
86 pub(crate) certificate_owner: ::std::option::Option<::std::string::String>,
87 pub(crate) valid_from_date: ::std::option::Option<::aws_smithy_types::DateTime>,
88 pub(crate) valid_to_date: ::std::option::Option<::aws_smithy_types::DateTime>,
89 pub(crate) signing_algorithm: ::std::option::Option<::std::string::String>,
90 pub(crate) key_length: ::std::option::Option<i32>,
91}
92impl CertificateBuilder {
93 pub fn certificate_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.certificate_identifier = ::std::option::Option::Some(input.into());
96 self
97 }
98 pub fn set_certificate_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.certificate_identifier = input;
101 self
102 }
103 pub fn get_certificate_identifier(&self) -> &::std::option::Option<::std::string::String> {
105 &self.certificate_identifier
106 }
107 pub fn certificate_creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
109 self.certificate_creation_date = ::std::option::Option::Some(input);
110 self
111 }
112 pub fn set_certificate_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
114 self.certificate_creation_date = input;
115 self
116 }
117 pub fn get_certificate_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
119 &self.certificate_creation_date
120 }
121 pub fn certificate_pem(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.certificate_pem = ::std::option::Option::Some(input.into());
124 self
125 }
126 pub fn set_certificate_pem(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.certificate_pem = input;
129 self
130 }
131 pub fn get_certificate_pem(&self) -> &::std::option::Option<::std::string::String> {
133 &self.certificate_pem
134 }
135 pub fn certificate_wallet(mut self, input: ::aws_smithy_types::Blob) -> Self {
137 self.certificate_wallet = ::std::option::Option::Some(input);
138 self
139 }
140 pub fn set_certificate_wallet(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
142 self.certificate_wallet = input;
143 self
144 }
145 pub fn get_certificate_wallet(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
147 &self.certificate_wallet
148 }
149 pub fn certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151 self.certificate_arn = ::std::option::Option::Some(input.into());
152 self
153 }
154 pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.certificate_arn = input;
157 self
158 }
159 pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
161 &self.certificate_arn
162 }
163 pub fn certificate_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165 self.certificate_owner = ::std::option::Option::Some(input.into());
166 self
167 }
168 pub fn set_certificate_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170 self.certificate_owner = input;
171 self
172 }
173 pub fn get_certificate_owner(&self) -> &::std::option::Option<::std::string::String> {
175 &self.certificate_owner
176 }
177 pub fn valid_from_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
179 self.valid_from_date = ::std::option::Option::Some(input);
180 self
181 }
182 pub fn set_valid_from_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
184 self.valid_from_date = input;
185 self
186 }
187 pub fn get_valid_from_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
189 &self.valid_from_date
190 }
191 pub fn valid_to_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
193 self.valid_to_date = ::std::option::Option::Some(input);
194 self
195 }
196 pub fn set_valid_to_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
198 self.valid_to_date = input;
199 self
200 }
201 pub fn get_valid_to_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
203 &self.valid_to_date
204 }
205 pub fn signing_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207 self.signing_algorithm = ::std::option::Option::Some(input.into());
208 self
209 }
210 pub fn set_signing_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212 self.signing_algorithm = input;
213 self
214 }
215 pub fn get_signing_algorithm(&self) -> &::std::option::Option<::std::string::String> {
217 &self.signing_algorithm
218 }
219 pub fn key_length(mut self, input: i32) -> Self {
221 self.key_length = ::std::option::Option::Some(input);
222 self
223 }
224 pub fn set_key_length(mut self, input: ::std::option::Option<i32>) -> Self {
226 self.key_length = input;
227 self
228 }
229 pub fn get_key_length(&self) -> &::std::option::Option<i32> {
231 &self.key_length
232 }
233 pub fn build(self) -> crate::types::Certificate {
235 crate::types::Certificate {
236 certificate_identifier: self.certificate_identifier,
237 certificate_creation_date: self.certificate_creation_date,
238 certificate_pem: self.certificate_pem,
239 certificate_wallet: self.certificate_wallet,
240 certificate_arn: self.certificate_arn,
241 certificate_owner: self.certificate_owner,
242 valid_from_date: self.valid_from_date,
243 valid_to_date: self.valid_to_date,
244 signing_algorithm: self.signing_algorithm,
245 key_length: self.key_length,
246 }
247 }
248}