Skip to main content

aws_sdk_databasemigration/types/
_certificate.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The SSL certificate that can be used to encrypt connections between the endpoints and the replication instance.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Certificate {
7    /// <p>A customer-assigned name for the certificate. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.</p>
8    pub certificate_identifier: ::std::option::Option<::std::string::String>,
9    /// <p>The date that the certificate was created.</p>
10    pub certificate_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
11    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
12    pub certificate_pem: ::std::option::Option<::std::string::String>,
13    /// <p>The location of an imported Oracle Wallet certificate for use with SSL. Example: <code>filebase64("${path.root}/rds-ca-2019-root.sso")</code></p>
14    pub certificate_wallet: ::std::option::Option<::aws_smithy_types::Blob>,
15    /// <p>The Amazon Resource Name (ARN) for the certificate.</p>
16    pub certificate_arn: ::std::option::Option<::std::string::String>,
17    /// <p>The owner of the certificate.</p>
18    pub certificate_owner: ::std::option::Option<::std::string::String>,
19    /// <p>The beginning date that the certificate is valid.</p>
20    pub valid_from_date: ::std::option::Option<::aws_smithy_types::DateTime>,
21    /// <p>The final date that the certificate is valid.</p>
22    pub valid_to_date: ::std::option::Option<::aws_smithy_types::DateTime>,
23    /// <p>The signing algorithm for the certificate.</p>
24    pub signing_algorithm: ::std::option::Option<::std::string::String>,
25    /// <p>The key length of the cryptographic algorithm being used.</p>
26    pub key_length: ::std::option::Option<i32>,
27    /// <p>An KMS key identifier that is used to encrypt the certificate.</p>
28    /// <p>If you don't specify a value for the <code>KmsKeyId</code> parameter, then DMS uses your default encryption key.</p>
29    /// <p>KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Region.</p>
30    pub kms_key_id: ::std::option::Option<::std::string::String>,
31}
32impl Certificate {
33    /// <p>A customer-assigned name for the certificate. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.</p>
34    pub fn certificate_identifier(&self) -> ::std::option::Option<&str> {
35        self.certificate_identifier.as_deref()
36    }
37    /// <p>The date that the certificate was created.</p>
38    pub fn certificate_creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
39        self.certificate_creation_date.as_ref()
40    }
41    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
42    pub fn certificate_pem(&self) -> ::std::option::Option<&str> {
43        self.certificate_pem.as_deref()
44    }
45    /// <p>The location of an imported Oracle Wallet certificate for use with SSL. Example: <code>filebase64("${path.root}/rds-ca-2019-root.sso")</code></p>
46    pub fn certificate_wallet(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
47        self.certificate_wallet.as_ref()
48    }
49    /// <p>The Amazon Resource Name (ARN) for the certificate.</p>
50    pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
51        self.certificate_arn.as_deref()
52    }
53    /// <p>The owner of the certificate.</p>
54    pub fn certificate_owner(&self) -> ::std::option::Option<&str> {
55        self.certificate_owner.as_deref()
56    }
57    /// <p>The beginning date that the certificate is valid.</p>
58    pub fn valid_from_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59        self.valid_from_date.as_ref()
60    }
61    /// <p>The final date that the certificate is valid.</p>
62    pub fn valid_to_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
63        self.valid_to_date.as_ref()
64    }
65    /// <p>The signing algorithm for the certificate.</p>
66    pub fn signing_algorithm(&self) -> ::std::option::Option<&str> {
67        self.signing_algorithm.as_deref()
68    }
69    /// <p>The key length of the cryptographic algorithm being used.</p>
70    pub fn key_length(&self) -> ::std::option::Option<i32> {
71        self.key_length
72    }
73    /// <p>An KMS key identifier that is used to encrypt the certificate.</p>
74    /// <p>If you don't specify a value for the <code>KmsKeyId</code> parameter, then DMS uses your default encryption key.</p>
75    /// <p>KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Region.</p>
76    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
77        self.kms_key_id.as_deref()
78    }
79}
80impl Certificate {
81    /// Creates a new builder-style object to manufacture [`Certificate`](crate::types::Certificate).
82    pub fn builder() -> crate::types::builders::CertificateBuilder {
83        crate::types::builders::CertificateBuilder::default()
84    }
85}
86
87/// A builder for [`Certificate`](crate::types::Certificate).
88#[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    /// <p>A customer-assigned name for the certificate. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.</p>
105    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    /// <p>A customer-assigned name for the certificate. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.</p>
110    pub fn set_certificate_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111        self.certificate_identifier = input;
112        self
113    }
114    /// <p>A customer-assigned name for the certificate. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.</p>
115    pub fn get_certificate_identifier(&self) -> &::std::option::Option<::std::string::String> {
116        &self.certificate_identifier
117    }
118    /// <p>The date that the certificate was created.</p>
119    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    /// <p>The date that the certificate was created.</p>
124    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    /// <p>The date that the certificate was created.</p>
129    pub fn get_certificate_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
130        &self.certificate_creation_date
131    }
132    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
133    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    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
138    pub fn set_certificate_pem(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.certificate_pem = input;
140        self
141    }
142    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
143    pub fn get_certificate_pem(&self) -> &::std::option::Option<::std::string::String> {
144        &self.certificate_pem
145    }
146    /// <p>The location of an imported Oracle Wallet certificate for use with SSL. Example: <code>filebase64("${path.root}/rds-ca-2019-root.sso")</code></p>
147    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    /// <p>The location of an imported Oracle Wallet certificate for use with SSL. Example: <code>filebase64("${path.root}/rds-ca-2019-root.sso")</code></p>
152    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    /// <p>The location of an imported Oracle Wallet certificate for use with SSL. Example: <code>filebase64("${path.root}/rds-ca-2019-root.sso")</code></p>
157    pub fn get_certificate_wallet(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
158        &self.certificate_wallet
159    }
160    /// <p>The Amazon Resource Name (ARN) for the certificate.</p>
161    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    /// <p>The Amazon Resource Name (ARN) for the certificate.</p>
166    pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.certificate_arn = input;
168        self
169    }
170    /// <p>The Amazon Resource Name (ARN) for the certificate.</p>
171    pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
172        &self.certificate_arn
173    }
174    /// <p>The owner of the certificate.</p>
175    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    /// <p>The owner of the certificate.</p>
180    pub fn set_certificate_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181        self.certificate_owner = input;
182        self
183    }
184    /// <p>The owner of the certificate.</p>
185    pub fn get_certificate_owner(&self) -> &::std::option::Option<::std::string::String> {
186        &self.certificate_owner
187    }
188    /// <p>The beginning date that the certificate is valid.</p>
189    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    /// <p>The beginning date that the certificate is valid.</p>
194    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    /// <p>The beginning date that the certificate is valid.</p>
199    pub fn get_valid_from_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
200        &self.valid_from_date
201    }
202    /// <p>The final date that the certificate is valid.</p>
203    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    /// <p>The final date that the certificate is valid.</p>
208    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    /// <p>The final date that the certificate is valid.</p>
213    pub fn get_valid_to_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
214        &self.valid_to_date
215    }
216    /// <p>The signing algorithm for the certificate.</p>
217    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    /// <p>The signing algorithm for the certificate.</p>
222    pub fn set_signing_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223        self.signing_algorithm = input;
224        self
225    }
226    /// <p>The signing algorithm for the certificate.</p>
227    pub fn get_signing_algorithm(&self) -> &::std::option::Option<::std::string::String> {
228        &self.signing_algorithm
229    }
230    /// <p>The key length of the cryptographic algorithm being used.</p>
231    pub fn key_length(mut self, input: i32) -> Self {
232        self.key_length = ::std::option::Option::Some(input);
233        self
234    }
235    /// <p>The key length of the cryptographic algorithm being used.</p>
236    pub fn set_key_length(mut self, input: ::std::option::Option<i32>) -> Self {
237        self.key_length = input;
238        self
239    }
240    /// <p>The key length of the cryptographic algorithm being used.</p>
241    pub fn get_key_length(&self) -> &::std::option::Option<i32> {
242        &self.key_length
243    }
244    /// <p>An KMS key identifier that is used to encrypt the certificate.</p>
245    /// <p>If you don't specify a value for the <code>KmsKeyId</code> parameter, then DMS uses your default encryption key.</p>
246    /// <p>KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Region.</p>
247    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    /// <p>An KMS key identifier that is used to encrypt the certificate.</p>
252    /// <p>If you don't specify a value for the <code>KmsKeyId</code> parameter, then DMS uses your default encryption key.</p>
253    /// <p>KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Region.</p>
254    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    /// <p>An KMS key identifier that is used to encrypt the certificate.</p>
259    /// <p>If you don't specify a value for the <code>KmsKeyId</code> parameter, then DMS uses your default encryption key.</p>
260    /// <p>KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Region.</p>
261    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
262        &self.kms_key_id
263    }
264    /// Consumes the builder and constructs a [`Certificate`](crate::types::Certificate).
265    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}