aws-sdk-amplifygen3 1.0.0

AWS SDK for AWS Amplify Gen 3
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 CreateDomainAssociationInput {
    /// <p>The name of the app.</p>
    pub app_name: ::std::option::Option<::std::string::String>,
    /// <p>The fully qualified domain name.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The routing configuration for the domain.</p>
    pub routing: ::std::option::Option<crate::types::Routing>,
    /// <p>How DNS records for the domain are managed.</p>
    pub dns_management_type: ::std::option::Option<crate::types::DnsManagementType>,
    /// <p>The tags to apply to the resource.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateDomainAssociationInput {
    /// <p>The name of the app.</p>
    pub fn app_name(&self) -> ::std::option::Option<&str> {
        self.app_name.as_deref()
    }
    /// <p>The fully qualified domain name.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The routing configuration for the domain.</p>
    pub fn routing(&self) -> ::std::option::Option<&crate::types::Routing> {
        self.routing.as_ref()
    }
    /// <p>How DNS records for the domain are managed.</p>
    pub fn dns_management_type(&self) -> ::std::option::Option<&crate::types::DnsManagementType> {
        self.dns_management_type.as_ref()
    }
    /// <p>The tags to apply to the resource.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateDomainAssociationInput {
    /// Creates a new builder-style object to manufacture [`CreateDomainAssociationInput`](crate::operation::create_domain_association::CreateDomainAssociationInput).
    pub fn builder() -> crate::operation::create_domain_association::builders::CreateDomainAssociationInputBuilder {
        crate::operation::create_domain_association::builders::CreateDomainAssociationInputBuilder::default()
    }
}

/// A builder for [`CreateDomainAssociationInput`](crate::operation::create_domain_association::CreateDomainAssociationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateDomainAssociationInputBuilder {
    pub(crate) app_name: ::std::option::Option<::std::string::String>,
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) routing: ::std::option::Option<crate::types::Routing>,
    pub(crate) dns_management_type: ::std::option::Option<crate::types::DnsManagementType>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateDomainAssociationInputBuilder {
    /// <p>The name of the app.</p>
    /// This field is required.
    pub fn app_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.app_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the app.</p>
    pub fn set_app_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.app_name = input;
        self
    }
    /// <p>The name of the app.</p>
    pub fn get_app_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.app_name
    }
    /// <p>The fully qualified domain name.</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>The fully qualified domain name.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The fully qualified domain name.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The routing configuration for the domain.</p>
    /// This field is required.
    pub fn routing(mut self, input: crate::types::Routing) -> Self {
        self.routing = ::std::option::Option::Some(input);
        self
    }
    /// <p>The routing configuration for the domain.</p>
    pub fn set_routing(mut self, input: ::std::option::Option<crate::types::Routing>) -> Self {
        self.routing = input;
        self
    }
    /// <p>The routing configuration for the domain.</p>
    pub fn get_routing(&self) -> &::std::option::Option<crate::types::Routing> {
        &self.routing
    }
    /// <p>How DNS records for the domain are managed.</p>
    /// This field is required.
    pub fn dns_management_type(mut self, input: crate::types::DnsManagementType) -> Self {
        self.dns_management_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>How DNS records for the domain are managed.</p>
    pub fn set_dns_management_type(mut self, input: ::std::option::Option<crate::types::DnsManagementType>) -> Self {
        self.dns_management_type = input;
        self
    }
    /// <p>How DNS records for the domain are managed.</p>
    pub fn get_dns_management_type(&self) -> &::std::option::Option<crate::types::DnsManagementType> {
        &self.dns_management_type
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags to apply to the resource.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags to apply to the resource.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags to apply to the resource.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateDomainAssociationInput`](crate::operation::create_domain_association::CreateDomainAssociationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_domain_association::CreateDomainAssociationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_domain_association::CreateDomainAssociationInput {
            app_name: self.app_name,
            domain_name: self.domain_name,
            routing: self.routing,
            dns_management_type: self.dns_management_type,
            tags: self.tags,
        })
    }
}