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}
28impl Certificate {
29    /// <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>
30    pub fn certificate_identifier(&self) -> ::std::option::Option<&str> {
31        self.certificate_identifier.as_deref()
32    }
33    /// <p>The date that the certificate was created.</p>
34    pub fn certificate_creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
35        self.certificate_creation_date.as_ref()
36    }
37    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
38    pub fn certificate_pem(&self) -> ::std::option::Option<&str> {
39        self.certificate_pem.as_deref()
40    }
41    /// <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>
42    pub fn certificate_wallet(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
43        self.certificate_wallet.as_ref()
44    }
45    /// <p>The Amazon Resource Name (ARN) for the certificate.</p>
46    pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
47        self.certificate_arn.as_deref()
48    }
49    /// <p>The owner of the certificate.</p>
50    pub fn certificate_owner(&self) -> ::std::option::Option<&str> {
51        self.certificate_owner.as_deref()
52    }
53    /// <p>The beginning date that the certificate is valid.</p>
54    pub fn valid_from_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
55        self.valid_from_date.as_ref()
56    }
57    /// <p>The final date that the certificate is valid.</p>
58    pub fn valid_to_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59        self.valid_to_date.as_ref()
60    }
61    /// <p>The signing algorithm for the certificate.</p>
62    pub fn signing_algorithm(&self) -> ::std::option::Option<&str> {
63        self.signing_algorithm.as_deref()
64    }
65    /// <p>The key length of the cryptographic algorithm being used.</p>
66    pub fn key_length(&self) -> ::std::option::Option<i32> {
67        self.key_length
68    }
69}
70impl Certificate {
71    /// Creates a new builder-style object to manufacture [`Certificate`](crate::types::Certificate).
72    pub fn builder() -> crate::types::builders::CertificateBuilder {
73        crate::types::builders::CertificateBuilder::default()
74    }
75}
76
77/// A builder for [`Certificate`](crate::types::Certificate).
78#[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    /// <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>
94    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    /// <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>
99    pub fn set_certificate_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.certificate_identifier = input;
101        self
102    }
103    /// <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>
104    pub fn get_certificate_identifier(&self) -> &::std::option::Option<::std::string::String> {
105        &self.certificate_identifier
106    }
107    /// <p>The date that the certificate was created.</p>
108    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    /// <p>The date that the certificate was created.</p>
113    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    /// <p>The date that the certificate was created.</p>
118    pub fn get_certificate_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
119        &self.certificate_creation_date
120    }
121    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
122    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    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
127    pub fn set_certificate_pem(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.certificate_pem = input;
129        self
130    }
131    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
132    pub fn get_certificate_pem(&self) -> &::std::option::Option<::std::string::String> {
133        &self.certificate_pem
134    }
135    /// <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>
136    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    /// <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>
141    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    /// <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>
146    pub fn get_certificate_wallet(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
147        &self.certificate_wallet
148    }
149    /// <p>The Amazon Resource Name (ARN) for the certificate.</p>
150    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    /// <p>The Amazon Resource Name (ARN) for the certificate.</p>
155    pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156        self.certificate_arn = input;
157        self
158    }
159    /// <p>The Amazon Resource Name (ARN) for the certificate.</p>
160    pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
161        &self.certificate_arn
162    }
163    /// <p>The owner of the certificate.</p>
164    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    /// <p>The owner of the certificate.</p>
169    pub fn set_certificate_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170        self.certificate_owner = input;
171        self
172    }
173    /// <p>The owner of the certificate.</p>
174    pub fn get_certificate_owner(&self) -> &::std::option::Option<::std::string::String> {
175        &self.certificate_owner
176    }
177    /// <p>The beginning date that the certificate is valid.</p>
178    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    /// <p>The beginning date that the certificate is valid.</p>
183    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    /// <p>The beginning date that the certificate is valid.</p>
188    pub fn get_valid_from_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
189        &self.valid_from_date
190    }
191    /// <p>The final date that the certificate is valid.</p>
192    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    /// <p>The final date that the certificate is valid.</p>
197    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    /// <p>The final date that the certificate is valid.</p>
202    pub fn get_valid_to_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
203        &self.valid_to_date
204    }
205    /// <p>The signing algorithm for the certificate.</p>
206    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    /// <p>The signing algorithm for the certificate.</p>
211    pub fn set_signing_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212        self.signing_algorithm = input;
213        self
214    }
215    /// <p>The signing algorithm for the certificate.</p>
216    pub fn get_signing_algorithm(&self) -> &::std::option::Option<::std::string::String> {
217        &self.signing_algorithm
218    }
219    /// <p>The key length of the cryptographic algorithm being used.</p>
220    pub fn key_length(mut self, input: i32) -> Self {
221        self.key_length = ::std::option::Option::Some(input);
222        self
223    }
224    /// <p>The key length of the cryptographic algorithm being used.</p>
225    pub fn set_key_length(mut self, input: ::std::option::Option<i32>) -> Self {
226        self.key_length = input;
227        self
228    }
229    /// <p>The key length of the cryptographic algorithm being used.</p>
230    pub fn get_key_length(&self) -> &::std::option::Option<i32> {
231        &self.key_length
232    }
233    /// Consumes the builder and constructs a [`Certificate`](crate::types::Certificate).
234    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}