aws-sdk-redshiftserverless 1.106.0

AWS SDK for Redshift Serverless
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An object that represents the custom domain name association.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Association {
    /// <p>The custom domain name’s certificate Amazon resource name (ARN).</p>
    pub custom_domain_certificate_arn: ::std::option::Option<::std::string::String>,
    /// <p>The expiration time for the certificate.</p>
    pub custom_domain_certificate_expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The custom domain name associated with the workgroup.</p>
    pub custom_domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the workgroup associated with the database.</p>
    pub workgroup_name: ::std::option::Option<::std::string::String>,
}
impl Association {
    /// <p>The custom domain name’s certificate Amazon resource name (ARN).</p>
    pub fn custom_domain_certificate_arn(&self) -> ::std::option::Option<&str> {
        self.custom_domain_certificate_arn.as_deref()
    }
    /// <p>The expiration time for the certificate.</p>
    pub fn custom_domain_certificate_expiry_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.custom_domain_certificate_expiry_time.as_ref()
    }
    /// <p>The custom domain name associated with the workgroup.</p>
    pub fn custom_domain_name(&self) -> ::std::option::Option<&str> {
        self.custom_domain_name.as_deref()
    }
    /// <p>The name of the workgroup associated with the database.</p>
    pub fn workgroup_name(&self) -> ::std::option::Option<&str> {
        self.workgroup_name.as_deref()
    }
}
impl Association {
    /// Creates a new builder-style object to manufacture [`Association`](crate::types::Association).
    pub fn builder() -> crate::types::builders::AssociationBuilder {
        crate::types::builders::AssociationBuilder::default()
    }
}

/// A builder for [`Association`](crate::types::Association).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociationBuilder {
    pub(crate) custom_domain_certificate_arn: ::std::option::Option<::std::string::String>,
    pub(crate) custom_domain_certificate_expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) custom_domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) workgroup_name: ::std::option::Option<::std::string::String>,
}
impl AssociationBuilder {
    /// <p>The custom domain name’s certificate Amazon resource name (ARN).</p>
    pub fn custom_domain_certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.custom_domain_certificate_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The custom domain name’s certificate Amazon resource name (ARN).</p>
    pub fn set_custom_domain_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.custom_domain_certificate_arn = input;
        self
    }
    /// <p>The custom domain name’s certificate Amazon resource name (ARN).</p>
    pub fn get_custom_domain_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.custom_domain_certificate_arn
    }
    /// <p>The expiration time for the certificate.</p>
    pub fn custom_domain_certificate_expiry_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.custom_domain_certificate_expiry_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The expiration time for the certificate.</p>
    pub fn set_custom_domain_certificate_expiry_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.custom_domain_certificate_expiry_time = input;
        self
    }
    /// <p>The expiration time for the certificate.</p>
    pub fn get_custom_domain_certificate_expiry_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.custom_domain_certificate_expiry_time
    }
    /// <p>The custom domain name associated with the workgroup.</p>
    pub fn custom_domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.custom_domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The custom domain name associated with the workgroup.</p>
    pub fn set_custom_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.custom_domain_name = input;
        self
    }
    /// <p>The custom domain name associated with the workgroup.</p>
    pub fn get_custom_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.custom_domain_name
    }
    /// <p>The name of the workgroup associated with the database.</p>
    pub fn workgroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.workgroup_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the workgroup associated with the database.</p>
    pub fn set_workgroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.workgroup_name = input;
        self
    }
    /// <p>The name of the workgroup associated with the database.</p>
    pub fn get_workgroup_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.workgroup_name
    }
    /// Consumes the builder and constructs a [`Association`](crate::types::Association).
    pub fn build(self) -> crate::types::Association {
        crate::types::Association {
            custom_domain_certificate_arn: self.custom_domain_certificate_arn,
            custom_domain_certificate_expiry_time: self.custom_domain_certificate_expiry_time,
            custom_domain_name: self.custom_domain_name,
            workgroup_name: self.workgroup_name,
        }
    }
}