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 AssociateCustomDomainOutput {
    /// <p>The App Runner subdomain of the App Runner service. The custom domain name is mapped to this target name.</p>
    pub dns_target: ::std::string::String,
    /// <p>The Amazon Resource Name (ARN) of the App Runner service with which a custom domain name is associated.</p>
    pub service_arn: ::std::string::String,
    /// <p>A description of the domain name that's being associated.</p>
    pub custom_domain: ::std::option::Option<crate::types::CustomDomain>,
    /// <p>DNS Target records for the custom domains of this Amazon VPC.</p>
    pub vpc_dns_targets: ::std::vec::Vec<crate::types::VpcDnsTarget>,
    _request_id: Option<String>,
}
impl AssociateCustomDomainOutput {
    /// <p>The App Runner subdomain of the App Runner service. The custom domain name is mapped to this target name.</p>
    pub fn dns_target(&self) -> &str {
        use std::ops::Deref;
        self.dns_target.deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the App Runner service with which a custom domain name is associated.</p>
    pub fn service_arn(&self) -> &str {
        use std::ops::Deref;
        self.service_arn.deref()
    }
    /// <p>A description of the domain name that's being associated.</p>
    pub fn custom_domain(&self) -> ::std::option::Option<&crate::types::CustomDomain> {
        self.custom_domain.as_ref()
    }
    /// <p>DNS Target records for the custom domains of this Amazon VPC.</p>
    pub fn vpc_dns_targets(&self) -> &[crate::types::VpcDnsTarget] {
        use std::ops::Deref;
        self.vpc_dns_targets.deref()
    }
}
impl ::aws_types::request_id::RequestId for AssociateCustomDomainOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl AssociateCustomDomainOutput {
    /// Creates a new builder-style object to manufacture [`AssociateCustomDomainOutput`](crate::operation::associate_custom_domain::AssociateCustomDomainOutput).
    pub fn builder() -> crate::operation::associate_custom_domain::builders::AssociateCustomDomainOutputBuilder {
        crate::operation::associate_custom_domain::builders::AssociateCustomDomainOutputBuilder::default()
    }
}

/// A builder for [`AssociateCustomDomainOutput`](crate::operation::associate_custom_domain::AssociateCustomDomainOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateCustomDomainOutputBuilder {
    pub(crate) dns_target: ::std::option::Option<::std::string::String>,
    pub(crate) service_arn: ::std::option::Option<::std::string::String>,
    pub(crate) custom_domain: ::std::option::Option<crate::types::CustomDomain>,
    pub(crate) vpc_dns_targets: ::std::option::Option<::std::vec::Vec<crate::types::VpcDnsTarget>>,
    _request_id: Option<String>,
}
impl AssociateCustomDomainOutputBuilder {
    /// <p>The App Runner subdomain of the App Runner service. The custom domain name is mapped to this target name.</p>
    /// This field is required.
    pub fn dns_target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dns_target = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The App Runner subdomain of the App Runner service. The custom domain name is mapped to this target name.</p>
    pub fn set_dns_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dns_target = input;
        self
    }
    /// <p>The App Runner subdomain of the App Runner service. The custom domain name is mapped to this target name.</p>
    pub fn get_dns_target(&self) -> &::std::option::Option<::std::string::String> {
        &self.dns_target
    }
    /// <p>The Amazon Resource Name (ARN) of the App Runner service with which a custom domain name is associated.</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 with which a custom domain name is associated.</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 with which a custom domain name is associated.</p>
    pub fn get_service_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_arn
    }
    /// <p>A description of the domain name that's being associated.</p>
    /// This field is required.
    pub fn custom_domain(mut self, input: crate::types::CustomDomain) -> Self {
        self.custom_domain = ::std::option::Option::Some(input);
        self
    }
    /// <p>A description of the domain name that's being associated.</p>
    pub fn set_custom_domain(mut self, input: ::std::option::Option<crate::types::CustomDomain>) -> Self {
        self.custom_domain = input;
        self
    }
    /// <p>A description of the domain name that's being associated.</p>
    pub fn get_custom_domain(&self) -> &::std::option::Option<crate::types::CustomDomain> {
        &self.custom_domain
    }
    /// Appends an item to `vpc_dns_targets`.
    ///
    /// To override the contents of this collection use [`set_vpc_dns_targets`](Self::set_vpc_dns_targets).
    ///
    /// <p>DNS Target records for the custom domains of this Amazon VPC.</p>
    pub fn vpc_dns_targets(mut self, input: crate::types::VpcDnsTarget) -> Self {
        let mut v = self.vpc_dns_targets.unwrap_or_default();
        v.push(input);
        self.vpc_dns_targets = ::std::option::Option::Some(v);
        self
    }
    /// <p>DNS Target records for the custom domains of this Amazon VPC.</p>
    pub fn set_vpc_dns_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcDnsTarget>>) -> Self {
        self.vpc_dns_targets = input;
        self
    }
    /// <p>DNS Target records for the custom domains of this Amazon VPC.</p>
    pub fn get_vpc_dns_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcDnsTarget>> {
        &self.vpc_dns_targets
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`AssociateCustomDomainOutput`](crate::operation::associate_custom_domain::AssociateCustomDomainOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`dns_target`](crate::operation::associate_custom_domain::builders::AssociateCustomDomainOutputBuilder::dns_target)
    /// - [`service_arn`](crate::operation::associate_custom_domain::builders::AssociateCustomDomainOutputBuilder::service_arn)
    /// - [`vpc_dns_targets`](crate::operation::associate_custom_domain::builders::AssociateCustomDomainOutputBuilder::vpc_dns_targets)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::associate_custom_domain::AssociateCustomDomainOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::associate_custom_domain::AssociateCustomDomainOutput {
            dns_target: self.dns_target.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "dns_target",
                    "dns_target was not specified but it is required when building AssociateCustomDomainOutput",
                )
            })?,
            service_arn: self.service_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "service_arn",
                    "service_arn was not specified but it is required when building AssociateCustomDomainOutput",
                )
            })?,
            custom_domain: self.custom_domain,
            vpc_dns_targets: self.vpc_dns_targets.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "vpc_dns_targets",
                    "vpc_dns_targets was not specified but it is required when building AssociateCustomDomainOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}