com.amazonaws.services.amplify.model.DomainAssociation Maven / Gradle / Ivy
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.amplify.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
 * 
 * Describes the association between a custom domain and an Amplify app.
 * 
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DomainAssociation implements Serializable, Cloneable, StructuredPojo {
    /**
     * 
     * The Amazon Resource Name (ARN) for the domain association.
     * 
     */
    private String domainAssociationArn;
    /**
     * 
     * The name of the domain.
     * 
     */
    private String domainName;
    /**
     * 
     * Enables the automated creation of subdomains for branches.
     * 
     */
    private Boolean enableAutoSubDomain;
    /**
     * 
     * Sets branch patterns for automatic subdomain creation.
     * 
     */
    private java.util.List autoSubDomainCreationPatterns;
    /**
     * 
     * The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for
     * automatically creating subdomains.
     * 
     */
    private String autoSubDomainIAMRole;
    /**
     * 
     * The current status of the domain association.
     * 
     */
    private String domainStatus;
    /**
     * 
     * The status of the domain update operation that is currently in progress. The following list describes the valid
     * update states.
     * 
     * 
     * - REQUESTING_CERTIFICATE
 
     * - 
     * 
     * The certificate is in the process of being updated.
     * 
     *  
     * - PENDING_VERIFICATION
 
     * - 
     * 
     * Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the
     * creation of a custom domain or when a custom domain is updated to use a managed certificate.
     * 
     *  
     * - IMPORTING_CUSTOM_CERTIFICATE
 
     * - 
     * 
     * Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the creation
     * of a custom domain or when a custom domain is updated to use a custom certificate.
     * 
     *  
     * - PENDING_DEPLOYMENT
 
     * - 
     * 
     * Indicates that the subdomain or certificate changes are being propagated.
     * 
     *  
     * - AWAITING_APP_CNAME
 
     * - 
     * 
     * Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain is on
     * Route 53, Amplify handles this for you automatically. For more information about custom domains, see Setting up custom domains in
     * the Amplify Hosting User Guide.
     * 
     *  
     * - UPDATE_COMPLETE
 
     * - 
     * 
     * The certificate has been associated with a domain.
     * 
     *  
     * - UPDATE_FAILED
 
     * - 
     * 
     * The certificate has failed to be provisioned or associated, and there is no existing active certificate to roll
     * back to.
     * 
     *  
     * 
     */
    private String updateStatus;
    /**
     * 
     * Additional information that describes why the domain association is in the current state.
     * 
     */
    private String statusReason;
    /**
     * 
     * The DNS record for certificate verification.
     * 
     */
    private String certificateVerificationDNSRecord;
    /**
     * 
     * The subdomains for the domain association.
     * 
     */
    private java.util.List subDomains;
    /**
     * 
     * Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or the
     * default certificate that Amplify provisions for you.
     * 
     * 
     * If you are updating your domain to use a different certificate, certificate points to the new
     * certificate that is being created instead of the current active certificate. Otherwise, certificate
     * points to the current active certificate.
     * 
     */
    private Certificate certificate;
    /**
     * 
     * The Amazon Resource Name (ARN) for the domain association.
     * 
     * 
     * @param domainAssociationArn
     *        The Amazon Resource Name (ARN) for the domain association.
     */
    public void setDomainAssociationArn(String domainAssociationArn) {
        this.domainAssociationArn = domainAssociationArn;
    }
    /**
     * 
     * The Amazon Resource Name (ARN) for the domain association.
     * 
     * 
     * @return The Amazon Resource Name (ARN) for the domain association.
     */
    public String getDomainAssociationArn() {
        return this.domainAssociationArn;
    }
    /**
     * 
     * The Amazon Resource Name (ARN) for the domain association.
     * 
     * 
     * @param domainAssociationArn
     *        The Amazon Resource Name (ARN) for the domain association.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DomainAssociation withDomainAssociationArn(String domainAssociationArn) {
        setDomainAssociationArn(domainAssociationArn);
        return this;
    }
    /**
     * 
     * The name of the domain.
     * 
     * 
     * @param domainName
     *        The name of the domain.
     */
    public void setDomainName(String domainName) {
        this.domainName = domainName;
    }
    /**
     * 
     * The name of the domain.
     * 
     * 
     * @return The name of the domain.
     */
    public String getDomainName() {
        return this.domainName;
    }
    /**
     * 
     * The name of the domain.
     * 
     * 
     * @param domainName
     *        The name of the domain.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DomainAssociation withDomainName(String domainName) {
        setDomainName(domainName);
        return this;
    }
    /**
     * 
     * Enables the automated creation of subdomains for branches.
     * 
     * 
     * @param enableAutoSubDomain
     *        Enables the automated creation of subdomains for branches.
     */
    public void setEnableAutoSubDomain(Boolean enableAutoSubDomain) {
        this.enableAutoSubDomain = enableAutoSubDomain;
    }
    /**
     * 
     * Enables the automated creation of subdomains for branches.
     * 
     * 
     * @return Enables the automated creation of subdomains for branches.
     */
    public Boolean getEnableAutoSubDomain() {
        return this.enableAutoSubDomain;
    }
    /**
     * 
     * Enables the automated creation of subdomains for branches.
     * 
     * 
     * @param enableAutoSubDomain
     *        Enables the automated creation of subdomains for branches.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DomainAssociation withEnableAutoSubDomain(Boolean enableAutoSubDomain) {
        setEnableAutoSubDomain(enableAutoSubDomain);
        return this;
    }
    /**
     * 
     * Enables the automated creation of subdomains for branches.
     * 
     * 
     * @return Enables the automated creation of subdomains for branches.
     */
    public Boolean isEnableAutoSubDomain() {
        return this.enableAutoSubDomain;
    }
    /**
     * 
     * Sets branch patterns for automatic subdomain creation.
     * 
     * 
     * @return Sets branch patterns for automatic subdomain creation.
     */
    public java.util.List getAutoSubDomainCreationPatterns() {
        return autoSubDomainCreationPatterns;
    }
    /**
     * 
     * Sets branch patterns for automatic subdomain creation.
     * 
     * 
     * @param autoSubDomainCreationPatterns
     *        Sets branch patterns for automatic subdomain creation.
     */
    public void setAutoSubDomainCreationPatterns(java.util.Collection autoSubDomainCreationPatterns) {
        if (autoSubDomainCreationPatterns == null) {
            this.autoSubDomainCreationPatterns = null;
            return;
        }
        this.autoSubDomainCreationPatterns = new java.util.ArrayList(autoSubDomainCreationPatterns);
    }
    /**
     * 
     * Sets branch patterns for automatic subdomain creation.
     * 
     * 
     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setAutoSubDomainCreationPatterns(java.util.Collection)} or
     * {@link #withAutoSubDomainCreationPatterns(java.util.Collection)} if you want to override the existing values.
     * 
     * 
     * @param autoSubDomainCreationPatterns
     *        Sets branch patterns for automatic subdomain creation.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DomainAssociation withAutoSubDomainCreationPatterns(String... autoSubDomainCreationPatterns) {
        if (this.autoSubDomainCreationPatterns == null) {
            setAutoSubDomainCreationPatterns(new java.util.ArrayList(autoSubDomainCreationPatterns.length));
        }
        for (String ele : autoSubDomainCreationPatterns) {
            this.autoSubDomainCreationPatterns.add(ele);
        }
        return this;
    }
    /**
     * 
     * Sets branch patterns for automatic subdomain creation.
     * 
     * 
     * @param autoSubDomainCreationPatterns
     *        Sets branch patterns for automatic subdomain creation.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DomainAssociation withAutoSubDomainCreationPatterns(java.util.Collection autoSubDomainCreationPatterns) {
        setAutoSubDomainCreationPatterns(autoSubDomainCreationPatterns);
        return this;
    }
    /**
     * 
     * The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for
     * automatically creating subdomains.
     * 
     * 
     * @param autoSubDomainIAMRole
     *        The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for
     *        automatically creating subdomains.
     */
    public void setAutoSubDomainIAMRole(String autoSubDomainIAMRole) {
        this.autoSubDomainIAMRole = autoSubDomainIAMRole;
    }
    /**
     * 
     * The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for
     * automatically creating subdomains.
     * 
     * 
     * @return The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for
     *         automatically creating subdomains.
     */
    public String getAutoSubDomainIAMRole() {
        return this.autoSubDomainIAMRole;
    }
    /**
     * 
     * The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for
     * automatically creating subdomains.
     * 
     * 
     * @param autoSubDomainIAMRole
     *        The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for
     *        automatically creating subdomains.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DomainAssociation withAutoSubDomainIAMRole(String autoSubDomainIAMRole) {
        setAutoSubDomainIAMRole(autoSubDomainIAMRole);
        return this;
    }
    /**
     * 
     * The current status of the domain association.
     * 
     * 
     * @param domainStatus
     *        The current status of the domain association.
     * @see DomainStatus
     */
    public void setDomainStatus(String domainStatus) {
        this.domainStatus = domainStatus;
    }
    /**
     * 
     * The current status of the domain association.
     * 
     * 
     * @return The current status of the domain association.
     * @see DomainStatus
     */
    public String getDomainStatus() {
        return this.domainStatus;
    }
    /**
     * 
     * The current status of the domain association.
     * 
     * 
     * @param domainStatus
     *        The current status of the domain association.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see DomainStatus
     */
    public DomainAssociation withDomainStatus(String domainStatus) {
        setDomainStatus(domainStatus);
        return this;
    }
    /**
     * 
     * The current status of the domain association.
     * 
     * 
     * @param domainStatus
     *        The current status of the domain association.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see DomainStatus
     */
    public DomainAssociation withDomainStatus(DomainStatus domainStatus) {
        this.domainStatus = domainStatus.toString();
        return this;
    }
    /**
     * 
     * The status of the domain update operation that is currently in progress. The following list describes the valid
     * update states.
     * 
     * 
     * - REQUESTING_CERTIFICATE
 
     * - 
     * 
     * The certificate is in the process of being updated.
     * 
     *  
     * - PENDING_VERIFICATION
 
     * - 
     * 
     * Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the
     * creation of a custom domain or when a custom domain is updated to use a managed certificate.
     * 
     *  
     * - IMPORTING_CUSTOM_CERTIFICATE
 
     * - 
     * 
     * Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the creation
     * of a custom domain or when a custom domain is updated to use a custom certificate.
     * 
     *  
     * - PENDING_DEPLOYMENT
 
     * - 
     * 
     * Indicates that the subdomain or certificate changes are being propagated.
     * 
     *  
     * - AWAITING_APP_CNAME
 
     * - 
     * 
     * Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain is on
     * Route 53, Amplify handles this for you automatically. For more information about custom domains, see Setting up custom domains in
     * the Amplify Hosting User Guide.
     * 
     *  
     * - UPDATE_COMPLETE
 
     * - 
     * 
     * The certificate has been associated with a domain.
     * 
     *  
     * - UPDATE_FAILED
 
     * - 
     * 
     * The certificate has failed to be provisioned or associated, and there is no existing active certificate to roll
     * back to.
     * 
     *  
     * 
     * 
     * @param updateStatus
     *        The status of the domain update operation that is currently in progress. The following list describes the
     *        valid update states.
     *        
     *        - REQUESTING_CERTIFICATE
 
     *        - 
     *        
     *        The certificate is in the process of being updated.
     *        
     *         
     *        - PENDING_VERIFICATION
 
     *        - 
     *        
     *        Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the
     *        creation of a custom domain or when a custom domain is updated to use a managed certificate.
     *        
     *         
     *        - IMPORTING_CUSTOM_CERTIFICATE
 
     *        - 
     *        
     *        Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the
     *        creation of a custom domain or when a custom domain is updated to use a custom certificate.
     *        
     *         
     *        - PENDING_DEPLOYMENT
 
     *        - 
     *        
     *        Indicates that the subdomain or certificate changes are being propagated.
     *        
     *         
     *        - AWAITING_APP_CNAME
 
     *        - 
     *        
     *        Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain
     *        is on Route 53, Amplify handles this for you automatically. For more information about custom domains, see
     *        Setting up custom
     *        domains in the Amplify Hosting User Guide.
     *        
     *         
     *        - UPDATE_COMPLETE
 
     *        - 
     *        
     *        The certificate has been associated with a domain.
     *        
     *         
     *        - UPDATE_FAILED
 
     *        - 
     *        
     *        The certificate has failed to be provisioned or associated, and there is no existing active certificate to
     *        roll back to.
     *        
     *         
     * @see UpdateStatus
     */
    public void setUpdateStatus(String updateStatus) {
        this.updateStatus = updateStatus;
    }
    /**
     * 
     * The status of the domain update operation that is currently in progress. The following list describes the valid
     * update states.
     * 
     * 
     * - REQUESTING_CERTIFICATE
 
     * - 
     * 
     * The certificate is in the process of being updated.
     * 
     *  
     * - PENDING_VERIFICATION
 
     * - 
     * 
     * Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the
     * creation of a custom domain or when a custom domain is updated to use a managed certificate.
     * 
     *  
     * - IMPORTING_CUSTOM_CERTIFICATE
 
     * - 
     * 
     * Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the creation
     * of a custom domain or when a custom domain is updated to use a custom certificate.
     * 
     *  
     * - PENDING_DEPLOYMENT
 
     * - 
     * 
     * Indicates that the subdomain or certificate changes are being propagated.
     * 
     *  
     * - AWAITING_APP_CNAME
 
     * - 
     * 
     * Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain is on
     * Route 53, Amplify handles this for you automatically. For more information about custom domains, see Setting up custom domains in
     * the Amplify Hosting User Guide.
     * 
     *  
     * - UPDATE_COMPLETE
 
     * - 
     * 
     * The certificate has been associated with a domain.
     * 
     *  
     * - UPDATE_FAILED
 
     * - 
     * 
     * The certificate has failed to be provisioned or associated, and there is no existing active certificate to roll
     * back to.
     * 
     *  
     * 
     * 
     * @return The status of the domain update operation that is currently in progress. The following list describes the
     *         valid update states.
     *         
     *         - REQUESTING_CERTIFICATE
 
     *         - 
     *         
     *         The certificate is in the process of being updated.
     *         
     *          
     *         - PENDING_VERIFICATION
 
     *         - 
     *         
     *         Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the
     *         creation of a custom domain or when a custom domain is updated to use a managed certificate.
     *         
     *          
     *         - IMPORTING_CUSTOM_CERTIFICATE
 
     *         - 
     *         
     *         Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the
     *         creation of a custom domain or when a custom domain is updated to use a custom certificate.
     *         
     *          
     *         - PENDING_DEPLOYMENT
 
     *         - 
     *         
     *         Indicates that the subdomain or certificate changes are being propagated.
     *         
     *          
     *         - AWAITING_APP_CNAME
 
     *         - 
     *         
     *         Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain
     *         is on Route 53, Amplify handles this for you automatically. For more information about custom domains,
     *         see Setting up custom
     *         domains in the Amplify Hosting User Guide.
     *         
     *          
     *         - UPDATE_COMPLETE
 
     *         - 
     *         
     *         The certificate has been associated with a domain.
     *         
     *          
     *         - UPDATE_FAILED
 
     *         - 
     *         
     *         The certificate has failed to be provisioned or associated, and there is no existing active certificate
     *         to roll back to.
     *         
     *          
     * @see UpdateStatus
     */
    public String getUpdateStatus() {
        return this.updateStatus;
    }
    /**
     * 
     * The status of the domain update operation that is currently in progress. The following list describes the valid
     * update states.
     * 
     * 
     * - REQUESTING_CERTIFICATE
 
     * - 
     * 
     * The certificate is in the process of being updated.
     * 
     *  
     * - PENDING_VERIFICATION
 
     * - 
     * 
     * Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the
     * creation of a custom domain or when a custom domain is updated to use a managed certificate.
     * 
     *  
     * - IMPORTING_CUSTOM_CERTIFICATE
 
     * - 
     * 
     * Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the creation
     * of a custom domain or when a custom domain is updated to use a custom certificate.
     * 
     *  
     * - PENDING_DEPLOYMENT
 
     * - 
     * 
     * Indicates that the subdomain or certificate changes are being propagated.
     * 
     *  
     * - AWAITING_APP_CNAME
 
     * - 
     * 
     * Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain is on
     * Route 53, Amplify handles this for you automatically. For more information about custom domains, see Setting up custom domains in
     * the Amplify Hosting User Guide.
     * 
     *  
     * - UPDATE_COMPLETE
 
     * - 
     * 
     * The certificate has been associated with a domain.
     * 
     *  
     * - UPDATE_FAILED
 
     * - 
     * 
     * The certificate has failed to be provisioned or associated, and there is no existing active certificate to roll
     * back to.
     * 
     *  
     * 
     * 
     * @param updateStatus
     *        The status of the domain update operation that is currently in progress. The following list describes the
     *        valid update states.
     *        
     *        - REQUESTING_CERTIFICATE
 
     *        - 
     *        
     *        The certificate is in the process of being updated.
     *        
     *         
     *        - PENDING_VERIFICATION
 
     *        - 
     *        
     *        Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the
     *        creation of a custom domain or when a custom domain is updated to use a managed certificate.
     *        
     *         
     *        - IMPORTING_CUSTOM_CERTIFICATE
 
     *        - 
     *        
     *        Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the
     *        creation of a custom domain or when a custom domain is updated to use a custom certificate.
     *        
     *         
     *        - PENDING_DEPLOYMENT
 
     *        - 
     *        
     *        Indicates that the subdomain or certificate changes are being propagated.
     *        
     *         
     *        - AWAITING_APP_CNAME
 
     *        - 
     *        
     *        Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain
     *        is on Route 53, Amplify handles this for you automatically. For more information about custom domains, see
     *        Setting up custom
     *        domains in the Amplify Hosting User Guide.
     *        
     *         
     *        - UPDATE_COMPLETE
 
     *        - 
     *        
     *        The certificate has been associated with a domain.
     *        
     *         
     *        - UPDATE_FAILED
 
     *        - 
     *        
     *        The certificate has failed to be provisioned or associated, and there is no existing active certificate to
     *        roll back to.
     *        
     *         
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see UpdateStatus
     */
    public DomainAssociation withUpdateStatus(String updateStatus) {
        setUpdateStatus(updateStatus);
        return this;
    }
    /**
     * 
     * The status of the domain update operation that is currently in progress. The following list describes the valid
     * update states.
     * 
     * 
     * - REQUESTING_CERTIFICATE
 
     * - 
     * 
     * The certificate is in the process of being updated.
     * 
     *  
     * - PENDING_VERIFICATION
 
     * - 
     * 
     * Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the
     * creation of a custom domain or when a custom domain is updated to use a managed certificate.
     * 
     *  
     * - IMPORTING_CUSTOM_CERTIFICATE
 
     * - 
     * 
     * Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the creation
     * of a custom domain or when a custom domain is updated to use a custom certificate.
     * 
     *  
     * - PENDING_DEPLOYMENT
 
     * - 
     * 
     * Indicates that the subdomain or certificate changes are being propagated.
     * 
     *  
     * - AWAITING_APP_CNAME
 
     * - 
     * 
     * Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain is on
     * Route 53, Amplify handles this for you automatically. For more information about custom domains, see Setting up custom domains in
     * the Amplify Hosting User Guide.
     * 
     *  
     * - UPDATE_COMPLETE
 
     * - 
     * 
     * The certificate has been associated with a domain.
     * 
     *  
     * - UPDATE_FAILED
 
     * - 
     * 
     * The certificate has failed to be provisioned or associated, and there is no existing active certificate to roll
     * back to.
     * 
     *  
     * 
     * 
     * @param updateStatus
     *        The status of the domain update operation that is currently in progress. The following list describes the
     *        valid update states.
     *        
     *        - REQUESTING_CERTIFICATE
 
     *        - 
     *        
     *        The certificate is in the process of being updated.
     *        
     *         
     *        - PENDING_VERIFICATION
 
     *        - 
     *        
     *        Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the
     *        creation of a custom domain or when a custom domain is updated to use a managed certificate.
     *        
     *         
     *        - IMPORTING_CUSTOM_CERTIFICATE
 
     *        - 
     *        
     *        Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the
     *        creation of a custom domain or when a custom domain is updated to use a custom certificate.
     *        
     *         
     *        - PENDING_DEPLOYMENT
 
     *        - 
     *        
     *        Indicates that the subdomain or certificate changes are being propagated.
     *        
     *         
     *        - AWAITING_APP_CNAME
 
     *        - 
     *        
     *        Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain
     *        is on Route 53, Amplify handles this for you automatically. For more information about custom domains, see
     *        Setting up custom
     *        domains in the Amplify Hosting User Guide.
     *        
     *         
     *        - UPDATE_COMPLETE
 
     *        - 
     *        
     *        The certificate has been associated with a domain.
     *        
     *         
     *        - UPDATE_FAILED
 
     *        - 
     *        
     *        The certificate has failed to be provisioned or associated, and there is no existing active certificate to
     *        roll back to.
     *        
     *         
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see UpdateStatus
     */
    public DomainAssociation withUpdateStatus(UpdateStatus updateStatus) {
        this.updateStatus = updateStatus.toString();
        return this;
    }
    /**
     * 
     * Additional information that describes why the domain association is in the current state.
     * 
     * 
     * @param statusReason
     *        Additional information that describes why the domain association is in the current state.
     */
    public void setStatusReason(String statusReason) {
        this.statusReason = statusReason;
    }
    /**
     * 
     * Additional information that describes why the domain association is in the current state.
     * 
     * 
     * @return Additional information that describes why the domain association is in the current state.
     */
    public String getStatusReason() {
        return this.statusReason;
    }
    /**
     * 
     * Additional information that describes why the domain association is in the current state.
     * 
     * 
     * @param statusReason
     *        Additional information that describes why the domain association is in the current state.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DomainAssociation withStatusReason(String statusReason) {
        setStatusReason(statusReason);
        return this;
    }
    /**
     * 
     * The DNS record for certificate verification.
     * 
     * 
     * @param certificateVerificationDNSRecord
     *        The DNS record for certificate verification.
     */
    public void setCertificateVerificationDNSRecord(String certificateVerificationDNSRecord) {
        this.certificateVerificationDNSRecord = certificateVerificationDNSRecord;
    }
    /**
     * 
     * The DNS record for certificate verification.
     * 
     * 
     * @return The DNS record for certificate verification.
     */
    public String getCertificateVerificationDNSRecord() {
        return this.certificateVerificationDNSRecord;
    }
    /**
     * 
     * The DNS record for certificate verification.
     * 
     * 
     * @param certificateVerificationDNSRecord
     *        The DNS record for certificate verification.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DomainAssociation withCertificateVerificationDNSRecord(String certificateVerificationDNSRecord) {
        setCertificateVerificationDNSRecord(certificateVerificationDNSRecord);
        return this;
    }
    /**
     * 
     * The subdomains for the domain association.
     * 
     * 
     * @return The subdomains for the domain association.
     */
    public java.util.List getSubDomains() {
        return subDomains;
    }
    /**
     * 
     * The subdomains for the domain association.
     * 
     * 
     * @param subDomains
     *        The subdomains for the domain association.
     */
    public void setSubDomains(java.util.Collection subDomains) {
        if (subDomains == null) {
            this.subDomains = null;
            return;
        }
        this.subDomains = new java.util.ArrayList(subDomains);
    }
    /**
     * 
     * The subdomains for the domain association.
     * 
     * 
     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setSubDomains(java.util.Collection)} or {@link #withSubDomains(java.util.Collection)} if you want to
     * override the existing values.
     * 
     * 
     * @param subDomains
     *        The subdomains for the domain association.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DomainAssociation withSubDomains(SubDomain... subDomains) {
        if (this.subDomains == null) {
            setSubDomains(new java.util.ArrayList(subDomains.length));
        }
        for (SubDomain ele : subDomains) {
            this.subDomains.add(ele);
        }
        return this;
    }
    /**
     * 
     * The subdomains for the domain association.
     * 
     * 
     * @param subDomains
     *        The subdomains for the domain association.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DomainAssociation withSubDomains(java.util.Collection subDomains) {
        setSubDomains(subDomains);
        return this;
    }
    /**
     * 
     * Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or the
     * default certificate that Amplify provisions for you.
     * 
     * 
     * If you are updating your domain to use a different certificate, certificate points to the new
     * certificate that is being created instead of the current active certificate. Otherwise, certificate
     * points to the current active certificate.
     * 
     * 
     * @param certificate
     *        Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or
     *        the default certificate that Amplify provisions for you.
     *        
     *        If you are updating your domain to use a different certificate, certificate points to the new
     *        certificate that is being created instead of the current active certificate. Otherwise,
     *        certificate points to the current active certificate.
     */
    public void setCertificate(Certificate certificate) {
        this.certificate = certificate;
    }
    /**
     * 
     * Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or the
     * default certificate that Amplify provisions for you.
     * 
     * 
     * If you are updating your domain to use a different certificate, certificate points to the new
     * certificate that is being created instead of the current active certificate. Otherwise, certificate
     * points to the current active certificate.
     * 
     * 
     * @return Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or
     *         the default certificate that Amplify provisions for you.
     *         
     *         If you are updating your domain to use a different certificate, certificate points to the
     *         new certificate that is being created instead of the current active certificate. Otherwise,
     *         certificate points to the current active certificate.
     */
    public Certificate getCertificate() {
        return this.certificate;
    }
    /**
     * 
     * Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or the
     * default certificate that Amplify provisions for you.
     * 
     * 
     * If you are updating your domain to use a different certificate, certificate points to the new
     * certificate that is being created instead of the current active certificate. Otherwise, certificate
     * points to the current active certificate.
     * 
     * 
     * @param certificate
     *        Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or
     *        the default certificate that Amplify provisions for you.
     *        
     *        If you are updating your domain to use a different certificate, certificate points to the new
     *        certificate that is being created instead of the current active certificate. Otherwise,
     *        certificate points to the current active certificate.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DomainAssociation withCertificate(Certificate certificate) {
        setCertificate(certificate);
        return this;
    }
    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getDomainAssociationArn() != null)
            sb.append("DomainAssociationArn: ").append(getDomainAssociationArn()).append(",");
        if (getDomainName() != null)
            sb.append("DomainName: ").append(getDomainName()).append(",");
        if (getEnableAutoSubDomain() != null)
            sb.append("EnableAutoSubDomain: ").append(getEnableAutoSubDomain()).append(",");
        if (getAutoSubDomainCreationPatterns() != null)
            sb.append("AutoSubDomainCreationPatterns: ").append(getAutoSubDomainCreationPatterns()).append(",");
        if (getAutoSubDomainIAMRole() != null)
            sb.append("AutoSubDomainIAMRole: ").append(getAutoSubDomainIAMRole()).append(",");
        if (getDomainStatus() != null)
            sb.append("DomainStatus: ").append(getDomainStatus()).append(",");
        if (getUpdateStatus() != null)
            sb.append("UpdateStatus: ").append(getUpdateStatus()).append(",");
        if (getStatusReason() != null)
            sb.append("StatusReason: ").append(getStatusReason()).append(",");
        if (getCertificateVerificationDNSRecord() != null)
            sb.append("CertificateVerificationDNSRecord: ").append(getCertificateVerificationDNSRecord()).append(",");
        if (getSubDomains() != null)
            sb.append("SubDomains: ").append(getSubDomains()).append(",");
        if (getCertificate() != null)
            sb.append("Certificate: ").append(getCertificate());
        sb.append("}");
        return sb.toString();
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (obj instanceof DomainAssociation == false)
            return false;
        DomainAssociation other = (DomainAssociation) obj;
        if (other.getDomainAssociationArn() == null ^ this.getDomainAssociationArn() == null)
            return false;
        if (other.getDomainAssociationArn() != null && other.getDomainAssociationArn().equals(this.getDomainAssociationArn()) == false)
            return false;
        if (other.getDomainName() == null ^ this.getDomainName() == null)
            return false;
        if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false)
            return false;
        if (other.getEnableAutoSubDomain() == null ^ this.getEnableAutoSubDomain() == null)
            return false;
        if (other.getEnableAutoSubDomain() != null && other.getEnableAutoSubDomain().equals(this.getEnableAutoSubDomain()) == false)
            return false;
        if (other.getAutoSubDomainCreationPatterns() == null ^ this.getAutoSubDomainCreationPatterns() == null)
            return false;
        if (other.getAutoSubDomainCreationPatterns() != null
                && other.getAutoSubDomainCreationPatterns().equals(this.getAutoSubDomainCreationPatterns()) == false)
            return false;
        if (other.getAutoSubDomainIAMRole() == null ^ this.getAutoSubDomainIAMRole() == null)
            return false;
        if (other.getAutoSubDomainIAMRole() != null && other.getAutoSubDomainIAMRole().equals(this.getAutoSubDomainIAMRole()) == false)
            return false;
        if (other.getDomainStatus() == null ^ this.getDomainStatus() == null)
            return false;
        if (other.getDomainStatus() != null && other.getDomainStatus().equals(this.getDomainStatus()) == false)
            return false;
        if (other.getUpdateStatus() == null ^ this.getUpdateStatus() == null)
            return false;
        if (other.getUpdateStatus() != null && other.getUpdateStatus().equals(this.getUpdateStatus()) == false)
            return false;
        if (other.getStatusReason() == null ^ this.getStatusReason() == null)
            return false;
        if (other.getStatusReason() != null && other.getStatusReason().equals(this.getStatusReason()) == false)
            return false;
        if (other.getCertificateVerificationDNSRecord() == null ^ this.getCertificateVerificationDNSRecord() == null)
            return false;
        if (other.getCertificateVerificationDNSRecord() != null
                && other.getCertificateVerificationDNSRecord().equals(this.getCertificateVerificationDNSRecord()) == false)
            return false;
        if (other.getSubDomains() == null ^ this.getSubDomains() == null)
            return false;
        if (other.getSubDomains() != null && other.getSubDomains().equals(this.getSubDomains()) == false)
            return false;
        if (other.getCertificate() == null ^ this.getCertificate() == null)
            return false;
        if (other.getCertificate() != null && other.getCertificate().equals(this.getCertificate()) == false)
            return false;
        return true;
    }
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        hashCode = prime * hashCode + ((getDomainAssociationArn() == null) ? 0 : getDomainAssociationArn().hashCode());
        hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
        hashCode = prime * hashCode + ((getEnableAutoSubDomain() == null) ? 0 : getEnableAutoSubDomain().hashCode());
        hashCode = prime * hashCode + ((getAutoSubDomainCreationPatterns() == null) ? 0 : getAutoSubDomainCreationPatterns().hashCode());
        hashCode = prime * hashCode + ((getAutoSubDomainIAMRole() == null) ? 0 : getAutoSubDomainIAMRole().hashCode());
        hashCode = prime * hashCode + ((getDomainStatus() == null) ? 0 : getDomainStatus().hashCode());
        hashCode = prime * hashCode + ((getUpdateStatus() == null) ? 0 : getUpdateStatus().hashCode());
        hashCode = prime * hashCode + ((getStatusReason() == null) ? 0 : getStatusReason().hashCode());
        hashCode = prime * hashCode + ((getCertificateVerificationDNSRecord() == null) ? 0 : getCertificateVerificationDNSRecord().hashCode());
        hashCode = prime * hashCode + ((getSubDomains() == null) ? 0 : getSubDomains().hashCode());
        hashCode = prime * hashCode + ((getCertificate() == null) ? 0 : getCertificate().hashCode());
        return hashCode;
    }
    @Override
    public DomainAssociation clone() {
        try {
            return (DomainAssociation) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }
    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.amplify.model.transform.DomainAssociationMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}