aws-sdk-lightsail 1.108.0

AWS SDK for Amazon Lightsail
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct SetupInstanceHttpsInput {
    /// <p>The name of the Lightsail instance.</p>
    pub instance_name: ::std::option::Option<::std::string::String>,
    /// <p>The contact method for SSL/TLS certificate renewal alerts. You can enter one email address.</p>
    pub email_address: ::std::option::Option<::std::string::String>,
    /// <p>The name of the domain and subdomains that were specified for the SSL/TLS certificate.</p>
    pub domain_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The certificate authority that issues the SSL/TLS certificate.</p>
    pub certificate_provider: ::std::option::Option<crate::types::CertificateProvider>,
}
impl SetupInstanceHttpsInput {
    /// <p>The name of the Lightsail instance.</p>
    pub fn instance_name(&self) -> ::std::option::Option<&str> {
        self.instance_name.as_deref()
    }
    /// <p>The contact method for SSL/TLS certificate renewal alerts. You can enter one email address.</p>
    pub fn email_address(&self) -> ::std::option::Option<&str> {
        self.email_address.as_deref()
    }
    /// <p>The name of the domain and subdomains that were specified for the SSL/TLS certificate.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.domain_names.is_none()`.
    pub fn domain_names(&self) -> &[::std::string::String] {
        self.domain_names.as_deref().unwrap_or_default()
    }
    /// <p>The certificate authority that issues the SSL/TLS certificate.</p>
    pub fn certificate_provider(&self) -> ::std::option::Option<&crate::types::CertificateProvider> {
        self.certificate_provider.as_ref()
    }
}
impl ::std::fmt::Debug for SetupInstanceHttpsInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("SetupInstanceHttpsInput");
        formatter.field("instance_name", &self.instance_name);
        formatter.field("email_address", &"*** Sensitive Data Redacted ***");
        formatter.field("domain_names", &self.domain_names);
        formatter.field("certificate_provider", &self.certificate_provider);
        formatter.finish()
    }
}
impl SetupInstanceHttpsInput {
    /// Creates a new builder-style object to manufacture [`SetupInstanceHttpsInput`](crate::operation::setup_instance_https::SetupInstanceHttpsInput).
    pub fn builder() -> crate::operation::setup_instance_https::builders::SetupInstanceHttpsInputBuilder {
        crate::operation::setup_instance_https::builders::SetupInstanceHttpsInputBuilder::default()
    }
}

/// A builder for [`SetupInstanceHttpsInput`](crate::operation::setup_instance_https::SetupInstanceHttpsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct SetupInstanceHttpsInputBuilder {
    pub(crate) instance_name: ::std::option::Option<::std::string::String>,
    pub(crate) email_address: ::std::option::Option<::std::string::String>,
    pub(crate) domain_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) certificate_provider: ::std::option::Option<crate::types::CertificateProvider>,
}
impl SetupInstanceHttpsInputBuilder {
    /// <p>The name of the Lightsail instance.</p>
    /// This field is required.
    pub fn instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Lightsail instance.</p>
    pub fn set_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_name = input;
        self
    }
    /// <p>The name of the Lightsail instance.</p>
    pub fn get_instance_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_name
    }
    /// <p>The contact method for SSL/TLS certificate renewal alerts. You can enter one email address.</p>
    /// This field is required.
    pub fn email_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.email_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The contact method for SSL/TLS certificate renewal alerts. You can enter one email address.</p>
    pub fn set_email_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.email_address = input;
        self
    }
    /// <p>The contact method for SSL/TLS certificate renewal alerts. You can enter one email address.</p>
    pub fn get_email_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.email_address
    }
    /// Appends an item to `domain_names`.
    ///
    /// To override the contents of this collection use [`set_domain_names`](Self::set_domain_names).
    ///
    /// <p>The name of the domain and subdomains that were specified for the SSL/TLS certificate.</p>
    pub fn domain_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.domain_names.unwrap_or_default();
        v.push(input.into());
        self.domain_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>The name of the domain and subdomains that were specified for the SSL/TLS certificate.</p>
    pub fn set_domain_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.domain_names = input;
        self
    }
    /// <p>The name of the domain and subdomains that were specified for the SSL/TLS certificate.</p>
    pub fn get_domain_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.domain_names
    }
    /// <p>The certificate authority that issues the SSL/TLS certificate.</p>
    /// This field is required.
    pub fn certificate_provider(mut self, input: crate::types::CertificateProvider) -> Self {
        self.certificate_provider = ::std::option::Option::Some(input);
        self
    }
    /// <p>The certificate authority that issues the SSL/TLS certificate.</p>
    pub fn set_certificate_provider(mut self, input: ::std::option::Option<crate::types::CertificateProvider>) -> Self {
        self.certificate_provider = input;
        self
    }
    /// <p>The certificate authority that issues the SSL/TLS certificate.</p>
    pub fn get_certificate_provider(&self) -> &::std::option::Option<crate::types::CertificateProvider> {
        &self.certificate_provider
    }
    /// Consumes the builder and constructs a [`SetupInstanceHttpsInput`](crate::operation::setup_instance_https::SetupInstanceHttpsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::setup_instance_https::SetupInstanceHttpsInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::setup_instance_https::SetupInstanceHttpsInput {
            instance_name: self.instance_name,
            email_address: self.email_address,
            domain_names: self.domain_names,
            certificate_provider: self.certificate_provider,
        })
    }
}
impl ::std::fmt::Debug for SetupInstanceHttpsInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("SetupInstanceHttpsInputBuilder");
        formatter.field("instance_name", &self.instance_name);
        formatter.field("email_address", &"*** Sensitive Data Redacted ***");
        formatter.field("domain_names", &self.domain_names);
        formatter.field("certificate_provider", &self.certificate_provider);
        formatter.finish()
    }
}