aws-sdk-apprunner 1.99.0

AWS SDK for AWS App Runner
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, ::std::fmt::Debug)]
pub struct AssociateCustomDomainInput {
    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with.</p>
    pub service_arn: ::std::option::Option<::std::string::String>,
    /// <p>A custom domain endpoint to associate. Specify a root domain (for example, <code>example.com</code>), a subdomain (for example, <code>login.example.com</code> or <code>admin.login.example.com</code>), or a wildcard (for example, <code>*.example.com</code>).</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>Set to <code>true</code> to associate the subdomain <code>www.<i>DomainName</i> </code> with the App Runner service in addition to the base domain.</p>
    /// <p>Default: <code>true</code></p>
    pub enable_www_subdomain: ::std::option::Option<bool>,
}
impl AssociateCustomDomainInput {
    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with.</p>
    pub fn service_arn(&self) -> ::std::option::Option<&str> {
        self.service_arn.as_deref()
    }
    /// <p>A custom domain endpoint to associate. Specify a root domain (for example, <code>example.com</code>), a subdomain (for example, <code>login.example.com</code> or <code>admin.login.example.com</code>), or a wildcard (for example, <code>*.example.com</code>).</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>Set to <code>true</code> to associate the subdomain <code>www.<i>DomainName</i> </code> with the App Runner service in addition to the base domain.</p>
    /// <p>Default: <code>true</code></p>
    pub fn enable_www_subdomain(&self) -> ::std::option::Option<bool> {
        self.enable_www_subdomain
    }
}
impl AssociateCustomDomainInput {
    /// Creates a new builder-style object to manufacture [`AssociateCustomDomainInput`](crate::operation::associate_custom_domain::AssociateCustomDomainInput).
    pub fn builder() -> crate::operation::associate_custom_domain::builders::AssociateCustomDomainInputBuilder {
        crate::operation::associate_custom_domain::builders::AssociateCustomDomainInputBuilder::default()
    }
}

/// A builder for [`AssociateCustomDomainInput`](crate::operation::associate_custom_domain::AssociateCustomDomainInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateCustomDomainInputBuilder {
    pub(crate) service_arn: ::std::option::Option<::std::string::String>,
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) enable_www_subdomain: ::std::option::Option<bool>,
}
impl AssociateCustomDomainInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with.</p>
    /// This field is required.
    pub fn service_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with.</p>
    pub fn set_service_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with.</p>
    pub fn get_service_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_arn
    }
    /// <p>A custom domain endpoint to associate. Specify a root domain (for example, <code>example.com</code>), a subdomain (for example, <code>login.example.com</code> or <code>admin.login.example.com</code>), or a wildcard (for example, <code>*.example.com</code>).</p>
    /// This field is required.
    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A custom domain endpoint to associate. Specify a root domain (for example, <code>example.com</code>), a subdomain (for example, <code>login.example.com</code> or <code>admin.login.example.com</code>), or a wildcard (for example, <code>*.example.com</code>).</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>A custom domain endpoint to associate. Specify a root domain (for example, <code>example.com</code>), a subdomain (for example, <code>login.example.com</code> or <code>admin.login.example.com</code>), or a wildcard (for example, <code>*.example.com</code>).</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>Set to <code>true</code> to associate the subdomain <code>www.<i>DomainName</i> </code> with the App Runner service in addition to the base domain.</p>
    /// <p>Default: <code>true</code></p>
    pub fn enable_www_subdomain(mut self, input: bool) -> Self {
        self.enable_www_subdomain = ::std::option::Option::Some(input);
        self
    }
    /// <p>Set to <code>true</code> to associate the subdomain <code>www.<i>DomainName</i> </code> with the App Runner service in addition to the base domain.</p>
    /// <p>Default: <code>true</code></p>
    pub fn set_enable_www_subdomain(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enable_www_subdomain = input;
        self
    }
    /// <p>Set to <code>true</code> to associate the subdomain <code>www.<i>DomainName</i> </code> with the App Runner service in addition to the base domain.</p>
    /// <p>Default: <code>true</code></p>
    pub fn get_enable_www_subdomain(&self) -> &::std::option::Option<bool> {
        &self.enable_www_subdomain
    }
    /// Consumes the builder and constructs a [`AssociateCustomDomainInput`](crate::operation::associate_custom_domain::AssociateCustomDomainInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::associate_custom_domain::AssociateCustomDomainInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::associate_custom_domain::AssociateCustomDomainInput {
            service_arn: self.service_arn,
            domain_name: self.domain_name,
            enable_www_subdomain: self.enable_www_subdomain,
        })
    }
}