1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes a certificate.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CertificateDescription {
/// <p>The ARN of the certificate.</p>
pub certificate_arn: ::std::option::Option<::std::string::String>,
/// <p>The ID of the certificate.</p>
pub certificate_id: ::std::option::Option<::std::string::String>,
/// <p>The certificate ID of the CA certificate used to sign this certificate.</p>
pub ca_certificate_id: ::std::option::Option<::std::string::String>,
/// <p>The status of the certificate.</p>
pub status: ::std::option::Option<crate::types::CertificateStatus>,
/// <p>The certificate data, in PEM format.</p>
pub certificate_pem: ::std::option::Option<::std::string::String>,
/// <p>The ID of the Amazon Web Services account that owns the certificate.</p>
pub owned_by: ::std::option::Option<::std::string::String>,
/// <p>The ID of the Amazon Web Services account of the previous owner of the certificate.</p>
pub previous_owned_by: ::std::option::Option<::std::string::String>,
/// <p>The date and time the certificate was created.</p>
pub creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The date and time the certificate was last modified.</p>
pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The customer version of the certificate.</p>
pub customer_version: ::std::option::Option<i32>,
/// <p>The transfer data.</p>
pub transfer_data: ::std::option::Option<crate::types::TransferData>,
/// <p>The generation ID of the certificate.</p>
pub generation_id: ::std::option::Option<::std::string::String>,
/// <p>When the certificate is valid.</p>
pub validity: ::std::option::Option<crate::types::CertificateValidity>,
/// <p>The mode of the certificate.</p>
/// <p><code>DEFAULT</code>: A certificate in <code>DEFAULT</code> mode is either generated by Amazon Web Services IoT Core or registered with an issuer certificate authority (CA) in <code>DEFAULT</code> mode. Devices with certificates in <code>DEFAULT</code> mode aren't required to send the Server Name Indication (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC endpoints, we recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core.</p>
/// <p><code>SNI_ONLY</code>: A certificate in <code>SNI_ONLY</code> mode is registered without an issuer CA. Devices with certificates in <code>SNI_ONLY</code> mode must send the SNI extension when connecting to Amazon Web Services IoT Core.</p>
/// <p>For more information about the value for SNI extension, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html">Transport security in IoT</a>.</p>
pub certificate_mode: ::std::option::Option<crate::types::CertificateMode>,
}
impl CertificateDescription {
/// <p>The ARN of the certificate.</p>
pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
self.certificate_arn.as_deref()
}
/// <p>The ID of the certificate.</p>
pub fn certificate_id(&self) -> ::std::option::Option<&str> {
self.certificate_id.as_deref()
}
/// <p>The certificate ID of the CA certificate used to sign this certificate.</p>
pub fn ca_certificate_id(&self) -> ::std::option::Option<&str> {
self.ca_certificate_id.as_deref()
}
/// <p>The status of the certificate.</p>
pub fn status(&self) -> ::std::option::Option<&crate::types::CertificateStatus> {
self.status.as_ref()
}
/// <p>The certificate data, in PEM format.</p>
pub fn certificate_pem(&self) -> ::std::option::Option<&str> {
self.certificate_pem.as_deref()
}
/// <p>The ID of the Amazon Web Services account that owns the certificate.</p>
pub fn owned_by(&self) -> ::std::option::Option<&str> {
self.owned_by.as_deref()
}
/// <p>The ID of the Amazon Web Services account of the previous owner of the certificate.</p>
pub fn previous_owned_by(&self) -> ::std::option::Option<&str> {
self.previous_owned_by.as_deref()
}
/// <p>The date and time the certificate was created.</p>
pub fn creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.creation_date.as_ref()
}
/// <p>The date and time the certificate was last modified.</p>
pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_modified_date.as_ref()
}
/// <p>The customer version of the certificate.</p>
pub fn customer_version(&self) -> ::std::option::Option<i32> {
self.customer_version
}
/// <p>The transfer data.</p>
pub fn transfer_data(&self) -> ::std::option::Option<&crate::types::TransferData> {
self.transfer_data.as_ref()
}
/// <p>The generation ID of the certificate.</p>
pub fn generation_id(&self) -> ::std::option::Option<&str> {
self.generation_id.as_deref()
}
/// <p>When the certificate is valid.</p>
pub fn validity(&self) -> ::std::option::Option<&crate::types::CertificateValidity> {
self.validity.as_ref()
}
/// <p>The mode of the certificate.</p>
/// <p><code>DEFAULT</code>: A certificate in <code>DEFAULT</code> mode is either generated by Amazon Web Services IoT Core or registered with an issuer certificate authority (CA) in <code>DEFAULT</code> mode. Devices with certificates in <code>DEFAULT</code> mode aren't required to send the Server Name Indication (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC endpoints, we recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core.</p>
/// <p><code>SNI_ONLY</code>: A certificate in <code>SNI_ONLY</code> mode is registered without an issuer CA. Devices with certificates in <code>SNI_ONLY</code> mode must send the SNI extension when connecting to Amazon Web Services IoT Core.</p>
/// <p>For more information about the value for SNI extension, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html">Transport security in IoT</a>.</p>
pub fn certificate_mode(&self) -> ::std::option::Option<&crate::types::CertificateMode> {
self.certificate_mode.as_ref()
}
}
impl CertificateDescription {
/// Creates a new builder-style object to manufacture [`CertificateDescription`](crate::types::CertificateDescription).
pub fn builder() -> crate::types::builders::CertificateDescriptionBuilder {
crate::types::builders::CertificateDescriptionBuilder::default()
}
}
/// A builder for [`CertificateDescription`](crate::types::CertificateDescription).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CertificateDescriptionBuilder {
pub(crate) certificate_arn: ::std::option::Option<::std::string::String>,
pub(crate) certificate_id: ::std::option::Option<::std::string::String>,
pub(crate) ca_certificate_id: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::CertificateStatus>,
pub(crate) certificate_pem: ::std::option::Option<::std::string::String>,
pub(crate) owned_by: ::std::option::Option<::std::string::String>,
pub(crate) previous_owned_by: ::std::option::Option<::std::string::String>,
pub(crate) creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) customer_version: ::std::option::Option<i32>,
pub(crate) transfer_data: ::std::option::Option<crate::types::TransferData>,
pub(crate) generation_id: ::std::option::Option<::std::string::String>,
pub(crate) validity: ::std::option::Option<crate::types::CertificateValidity>,
pub(crate) certificate_mode: ::std::option::Option<crate::types::CertificateMode>,
}
impl CertificateDescriptionBuilder {
/// <p>The ARN of the certificate.</p>
pub fn certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.certificate_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the certificate.</p>
pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.certificate_arn = input;
self
}
/// <p>The ARN of the certificate.</p>
pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.certificate_arn
}
/// <p>The ID of the certificate.</p>
pub fn certificate_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.certificate_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the certificate.</p>
pub fn set_certificate_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.certificate_id = input;
self
}
/// <p>The ID of the certificate.</p>
pub fn get_certificate_id(&self) -> &::std::option::Option<::std::string::String> {
&self.certificate_id
}
/// <p>The certificate ID of the CA certificate used to sign this certificate.</p>
pub fn ca_certificate_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ca_certificate_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The certificate ID of the CA certificate used to sign this certificate.</p>
pub fn set_ca_certificate_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ca_certificate_id = input;
self
}
/// <p>The certificate ID of the CA certificate used to sign this certificate.</p>
pub fn get_ca_certificate_id(&self) -> &::std::option::Option<::std::string::String> {
&self.ca_certificate_id
}
/// <p>The status of the certificate.</p>
pub fn status(mut self, input: crate::types::CertificateStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The status of the certificate.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::CertificateStatus>) -> Self {
self.status = input;
self
}
/// <p>The status of the certificate.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::CertificateStatus> {
&self.status
}
/// <p>The certificate data, in PEM format.</p>
pub fn certificate_pem(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.certificate_pem = ::std::option::Option::Some(input.into());
self
}
/// <p>The certificate data, in PEM format.</p>
pub fn set_certificate_pem(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.certificate_pem = input;
self
}
/// <p>The certificate data, in PEM format.</p>
pub fn get_certificate_pem(&self) -> &::std::option::Option<::std::string::String> {
&self.certificate_pem
}
/// <p>The ID of the Amazon Web Services account that owns the certificate.</p>
pub fn owned_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owned_by = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the Amazon Web Services account that owns the certificate.</p>
pub fn set_owned_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owned_by = input;
self
}
/// <p>The ID of the Amazon Web Services account that owns the certificate.</p>
pub fn get_owned_by(&self) -> &::std::option::Option<::std::string::String> {
&self.owned_by
}
/// <p>The ID of the Amazon Web Services account of the previous owner of the certificate.</p>
pub fn previous_owned_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.previous_owned_by = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the Amazon Web Services account of the previous owner of the certificate.</p>
pub fn set_previous_owned_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.previous_owned_by = input;
self
}
/// <p>The ID of the Amazon Web Services account of the previous owner of the certificate.</p>
pub fn get_previous_owned_by(&self) -> &::std::option::Option<::std::string::String> {
&self.previous_owned_by
}
/// <p>The date and time the certificate was created.</p>
pub fn creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_date = ::std::option::Option::Some(input);
self
}
/// <p>The date and time the certificate was created.</p>
pub fn set_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_date = input;
self
}
/// <p>The date and time the certificate was created.</p>
pub fn get_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_date
}
/// <p>The date and time the certificate was last modified.</p>
pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_modified_date = ::std::option::Option::Some(input);
self
}
/// <p>The date and time the certificate was last modified.</p>
pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_modified_date = input;
self
}
/// <p>The date and time the certificate was last modified.</p>
pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_modified_date
}
/// <p>The customer version of the certificate.</p>
pub fn customer_version(mut self, input: i32) -> Self {
self.customer_version = ::std::option::Option::Some(input);
self
}
/// <p>The customer version of the certificate.</p>
pub fn set_customer_version(mut self, input: ::std::option::Option<i32>) -> Self {
self.customer_version = input;
self
}
/// <p>The customer version of the certificate.</p>
pub fn get_customer_version(&self) -> &::std::option::Option<i32> {
&self.customer_version
}
/// <p>The transfer data.</p>
pub fn transfer_data(mut self, input: crate::types::TransferData) -> Self {
self.transfer_data = ::std::option::Option::Some(input);
self
}
/// <p>The transfer data.</p>
pub fn set_transfer_data(mut self, input: ::std::option::Option<crate::types::TransferData>) -> Self {
self.transfer_data = input;
self
}
/// <p>The transfer data.</p>
pub fn get_transfer_data(&self) -> &::std::option::Option<crate::types::TransferData> {
&self.transfer_data
}
/// <p>The generation ID of the certificate.</p>
pub fn generation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.generation_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The generation ID of the certificate.</p>
pub fn set_generation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.generation_id = input;
self
}
/// <p>The generation ID of the certificate.</p>
pub fn get_generation_id(&self) -> &::std::option::Option<::std::string::String> {
&self.generation_id
}
/// <p>When the certificate is valid.</p>
pub fn validity(mut self, input: crate::types::CertificateValidity) -> Self {
self.validity = ::std::option::Option::Some(input);
self
}
/// <p>When the certificate is valid.</p>
pub fn set_validity(mut self, input: ::std::option::Option<crate::types::CertificateValidity>) -> Self {
self.validity = input;
self
}
/// <p>When the certificate is valid.</p>
pub fn get_validity(&self) -> &::std::option::Option<crate::types::CertificateValidity> {
&self.validity
}
/// <p>The mode of the certificate.</p>
/// <p><code>DEFAULT</code>: A certificate in <code>DEFAULT</code> mode is either generated by Amazon Web Services IoT Core or registered with an issuer certificate authority (CA) in <code>DEFAULT</code> mode. Devices with certificates in <code>DEFAULT</code> mode aren't required to send the Server Name Indication (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC endpoints, we recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core.</p>
/// <p><code>SNI_ONLY</code>: A certificate in <code>SNI_ONLY</code> mode is registered without an issuer CA. Devices with certificates in <code>SNI_ONLY</code> mode must send the SNI extension when connecting to Amazon Web Services IoT Core.</p>
/// <p>For more information about the value for SNI extension, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html">Transport security in IoT</a>.</p>
pub fn certificate_mode(mut self, input: crate::types::CertificateMode) -> Self {
self.certificate_mode = ::std::option::Option::Some(input);
self
}
/// <p>The mode of the certificate.</p>
/// <p><code>DEFAULT</code>: A certificate in <code>DEFAULT</code> mode is either generated by Amazon Web Services IoT Core or registered with an issuer certificate authority (CA) in <code>DEFAULT</code> mode. Devices with certificates in <code>DEFAULT</code> mode aren't required to send the Server Name Indication (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC endpoints, we recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core.</p>
/// <p><code>SNI_ONLY</code>: A certificate in <code>SNI_ONLY</code> mode is registered without an issuer CA. Devices with certificates in <code>SNI_ONLY</code> mode must send the SNI extension when connecting to Amazon Web Services IoT Core.</p>
/// <p>For more information about the value for SNI extension, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html">Transport security in IoT</a>.</p>
pub fn set_certificate_mode(mut self, input: ::std::option::Option<crate::types::CertificateMode>) -> Self {
self.certificate_mode = input;
self
}
/// <p>The mode of the certificate.</p>
/// <p><code>DEFAULT</code>: A certificate in <code>DEFAULT</code> mode is either generated by Amazon Web Services IoT Core or registered with an issuer certificate authority (CA) in <code>DEFAULT</code> mode. Devices with certificates in <code>DEFAULT</code> mode aren't required to send the Server Name Indication (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC endpoints, we recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core.</p>
/// <p><code>SNI_ONLY</code>: A certificate in <code>SNI_ONLY</code> mode is registered without an issuer CA. Devices with certificates in <code>SNI_ONLY</code> mode must send the SNI extension when connecting to Amazon Web Services IoT Core.</p>
/// <p>For more information about the value for SNI extension, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html">Transport security in IoT</a>.</p>
pub fn get_certificate_mode(&self) -> &::std::option::Option<crate::types::CertificateMode> {
&self.certificate_mode
}
/// Consumes the builder and constructs a [`CertificateDescription`](crate::types::CertificateDescription).
pub fn build(self) -> crate::types::CertificateDescription {
crate::types::CertificateDescription {
certificate_arn: self.certificate_arn,
certificate_id: self.certificate_id,
ca_certificate_id: self.ca_certificate_id,
status: self.status,
certificate_pem: self.certificate_pem,
owned_by: self.owned_by,
previous_owned_by: self.previous_owned_by,
creation_date: self.creation_date,
last_modified_date: self.last_modified_date,
customer_version: self.customer_version,
transfer_data: self.transfer_data,
generation_id: self.generation_id,
validity: self.validity,
certificate_mode: self.certificate_mode,
}
}
}