aws-sdk-databasemigration 1.115.0

AWS SDK for AWS Database Migration Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The SSL certificate that can be used to encrypt connections between the endpoints and the replication instance.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Certificate {
    /// <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>
    pub certificate_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The date that the certificate was created.</p>
    pub certificate_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
    pub certificate_pem: ::std::option::Option<::std::string::String>,
    /// <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>
    pub certificate_wallet: ::std::option::Option<::aws_smithy_types::Blob>,
    /// <p>The Amazon Resource Name (ARN) for the certificate.</p>
    pub certificate_arn: ::std::option::Option<::std::string::String>,
    /// <p>The owner of the certificate.</p>
    pub certificate_owner: ::std::option::Option<::std::string::String>,
    /// <p>The beginning date that the certificate is valid.</p>
    pub valid_from_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The final date that the certificate is valid.</p>
    pub valid_to_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The signing algorithm for the certificate.</p>
    pub signing_algorithm: ::std::option::Option<::std::string::String>,
    /// <p>The key length of the cryptographic algorithm being used.</p>
    pub key_length: ::std::option::Option<i32>,
    /// <p>An KMS key identifier that is used to encrypt the certificate.</p>
    /// <p>If you don't specify a value for the <code>KmsKeyId</code> parameter, then DMS uses your default encryption key.</p>
    /// <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>
    pub kms_key_id: ::std::option::Option<::std::string::String>,
}
impl Certificate {
    /// <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>
    pub fn certificate_identifier(&self) -> ::std::option::Option<&str> {
        self.certificate_identifier.as_deref()
    }
    /// <p>The date that the certificate was created.</p>
    pub fn certificate_creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.certificate_creation_date.as_ref()
    }
    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
    pub fn certificate_pem(&self) -> ::std::option::Option<&str> {
        self.certificate_pem.as_deref()
    }
    /// <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>
    pub fn certificate_wallet(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        self.certificate_wallet.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) for the certificate.</p>
    pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
        self.certificate_arn.as_deref()
    }
    /// <p>The owner of the certificate.</p>
    pub fn certificate_owner(&self) -> ::std::option::Option<&str> {
        self.certificate_owner.as_deref()
    }
    /// <p>The beginning date that the certificate is valid.</p>
    pub fn valid_from_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.valid_from_date.as_ref()
    }
    /// <p>The final date that the certificate is valid.</p>
    pub fn valid_to_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.valid_to_date.as_ref()
    }
    /// <p>The signing algorithm for the certificate.</p>
    pub fn signing_algorithm(&self) -> ::std::option::Option<&str> {
        self.signing_algorithm.as_deref()
    }
    /// <p>The key length of the cryptographic algorithm being used.</p>
    pub fn key_length(&self) -> ::std::option::Option<i32> {
        self.key_length
    }
    /// <p>An KMS key identifier that is used to encrypt the certificate.</p>
    /// <p>If you don't specify a value for the <code>KmsKeyId</code> parameter, then DMS uses your default encryption key.</p>
    /// <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>
    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
}
impl Certificate {
    /// Creates a new builder-style object to manufacture [`Certificate`](crate::types::Certificate).
    pub fn builder() -> crate::types::builders::CertificateBuilder {
        crate::types::builders::CertificateBuilder::default()
    }
}

/// A builder for [`Certificate`](crate::types::Certificate).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CertificateBuilder {
    pub(crate) certificate_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) certificate_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) certificate_pem: ::std::option::Option<::std::string::String>,
    pub(crate) certificate_wallet: ::std::option::Option<::aws_smithy_types::Blob>,
    pub(crate) certificate_arn: ::std::option::Option<::std::string::String>,
    pub(crate) certificate_owner: ::std::option::Option<::std::string::String>,
    pub(crate) valid_from_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) valid_to_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) signing_algorithm: ::std::option::Option<::std::string::String>,
    pub(crate) key_length: ::std::option::Option<i32>,
    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
}
impl CertificateBuilder {
    /// <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>
    pub fn certificate_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.certificate_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_certificate_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.certificate_identifier = input;
        self
    }
    /// <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>
    pub fn get_certificate_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.certificate_identifier
    }
    /// <p>The date that the certificate was created.</p>
    pub fn certificate_creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.certificate_creation_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date that the certificate was created.</p>
    pub fn set_certificate_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.certificate_creation_date = input;
        self
    }
    /// <p>The date that the certificate was created.</p>
    pub fn get_certificate_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.certificate_creation_date
    }
    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</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 contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
    pub fn set_certificate_pem(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.certificate_pem = input;
        self
    }
    /// <p>The contents of a <code>.pem</code> file, which contains an X.509 certificate.</p>
    pub fn get_certificate_pem(&self) -> &::std::option::Option<::std::string::String> {
        &self.certificate_pem
    }
    /// <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>
    pub fn certificate_wallet(mut self, input: ::aws_smithy_types::Blob) -> Self {
        self.certificate_wallet = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_certificate_wallet(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        self.certificate_wallet = input;
        self
    }
    /// <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>
    pub fn get_certificate_wallet(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
        &self.certificate_wallet
    }
    /// <p>The Amazon Resource Name (ARN) for 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 Amazon Resource Name (ARN) for 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 Amazon Resource Name (ARN) for the certificate.</p>
    pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.certificate_arn
    }
    /// <p>The owner of the certificate.</p>
    pub fn certificate_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.certificate_owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The owner of the certificate.</p>
    pub fn set_certificate_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.certificate_owner = input;
        self
    }
    /// <p>The owner of the certificate.</p>
    pub fn get_certificate_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.certificate_owner
    }
    /// <p>The beginning date that the certificate is valid.</p>
    pub fn valid_from_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.valid_from_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The beginning date that the certificate is valid.</p>
    pub fn set_valid_from_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.valid_from_date = input;
        self
    }
    /// <p>The beginning date that the certificate is valid.</p>
    pub fn get_valid_from_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.valid_from_date
    }
    /// <p>The final date that the certificate is valid.</p>
    pub fn valid_to_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.valid_to_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The final date that the certificate is valid.</p>
    pub fn set_valid_to_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.valid_to_date = input;
        self
    }
    /// <p>The final date that the certificate is valid.</p>
    pub fn get_valid_to_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.valid_to_date
    }
    /// <p>The signing algorithm for the certificate.</p>
    pub fn signing_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.signing_algorithm = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The signing algorithm for the certificate.</p>
    pub fn set_signing_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.signing_algorithm = input;
        self
    }
    /// <p>The signing algorithm for the certificate.</p>
    pub fn get_signing_algorithm(&self) -> &::std::option::Option<::std::string::String> {
        &self.signing_algorithm
    }
    /// <p>The key length of the cryptographic algorithm being used.</p>
    pub fn key_length(mut self, input: i32) -> Self {
        self.key_length = ::std::option::Option::Some(input);
        self
    }
    /// <p>The key length of the cryptographic algorithm being used.</p>
    pub fn set_key_length(mut self, input: ::std::option::Option<i32>) -> Self {
        self.key_length = input;
        self
    }
    /// <p>The key length of the cryptographic algorithm being used.</p>
    pub fn get_key_length(&self) -> &::std::option::Option<i32> {
        &self.key_length
    }
    /// <p>An KMS key identifier that is used to encrypt the certificate.</p>
    /// <p>If you don't specify a value for the <code>KmsKeyId</code> parameter, then DMS uses your default encryption key.</p>
    /// <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>
    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An KMS key identifier that is used to encrypt the certificate.</p>
    /// <p>If you don't specify a value for the <code>KmsKeyId</code> parameter, then DMS uses your default encryption key.</p>
    /// <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>
    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_id = input;
        self
    }
    /// <p>An KMS key identifier that is used to encrypt the certificate.</p>
    /// <p>If you don't specify a value for the <code>KmsKeyId</code> parameter, then DMS uses your default encryption key.</p>
    /// <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>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_id
    }
    /// Consumes the builder and constructs a [`Certificate`](crate::types::Certificate).
    pub fn build(self) -> crate::types::Certificate {
        crate::types::Certificate {
            certificate_identifier: self.certificate_identifier,
            certificate_creation_date: self.certificate_creation_date,
            certificate_pem: self.certificate_pem,
            certificate_wallet: self.certificate_wallet,
            certificate_arn: self.certificate_arn,
            certificate_owner: self.certificate_owner,
            valid_from_date: self.valid_from_date,
            valid_to_date: self.valid_to_date,
            signing_algorithm: self.signing_algorithm,
            key_length: self.key_length,
            kms_key_id: self.kms_key_id,
        }
    }
}