
com.amazonaws.services.apprunner.model.CustomDomain Maven / Gradle / Ivy
/*
* Copyright 2018-2023 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.apprunner.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Describes a custom domain that's associated with an App Runner service.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CustomDomain implements Serializable, Cloneable, StructuredPojo {
/**
*
* An associated custom domain endpoint. It can be a root domain (for example, example.com
), a
* subdomain (for example, login.example.com
or admin.login.example.com
), or a wildcard
* (for example, *.example.com
).
*
*/
private String domainName;
/**
*
* When true
, the subdomain www.DomainName
is associated with the App Runner
* service in addition to the base domain.
*
*/
private Boolean enableWWWSubdomain;
/**
*
* A list of certificate CNAME records that's used for this domain name.
*
*/
private java.util.List certificateValidationRecords;
/**
*
* The current state of the domain name association.
*
*/
private String status;
/**
*
* An associated custom domain endpoint. It can be a root domain (for example, example.com
), a
* subdomain (for example, login.example.com
or admin.login.example.com
), or a wildcard
* (for example, *.example.com
).
*
*
* @param domainName
* An associated custom domain endpoint. It can be a root domain (for example, example.com
), a
* subdomain (for example, login.example.com
or admin.login.example.com
), or a
* wildcard (for example, *.example.com
).
*/
public void setDomainName(String domainName) {
this.domainName = domainName;
}
/**
*
* An associated custom domain endpoint. It can be a root domain (for example, example.com
), a
* subdomain (for example, login.example.com
or admin.login.example.com
), or a wildcard
* (for example, *.example.com
).
*
*
* @return An associated custom domain endpoint. It can be a root domain (for example, example.com
), a
* subdomain (for example, login.example.com
or admin.login.example.com
), or a
* wildcard (for example, *.example.com
).
*/
public String getDomainName() {
return this.domainName;
}
/**
*
* An associated custom domain endpoint. It can be a root domain (for example, example.com
), a
* subdomain (for example, login.example.com
or admin.login.example.com
), or a wildcard
* (for example, *.example.com
).
*
*
* @param domainName
* An associated custom domain endpoint. It can be a root domain (for example, example.com
), a
* subdomain (for example, login.example.com
or admin.login.example.com
), or a
* wildcard (for example, *.example.com
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CustomDomain withDomainName(String domainName) {
setDomainName(domainName);
return this;
}
/**
*
* When true
, the subdomain www.DomainName
is associated with the App Runner
* service in addition to the base domain.
*
*
* @param enableWWWSubdomain
* When true
, the subdomain www.DomainName
is associated with the App
* Runner service in addition to the base domain.
*/
public void setEnableWWWSubdomain(Boolean enableWWWSubdomain) {
this.enableWWWSubdomain = enableWWWSubdomain;
}
/**
*
* When true
, the subdomain www.DomainName
is associated with the App Runner
* service in addition to the base domain.
*
*
* @return When true
, the subdomain www.DomainName
is associated with the App
* Runner service in addition to the base domain.
*/
public Boolean getEnableWWWSubdomain() {
return this.enableWWWSubdomain;
}
/**
*
* When true
, the subdomain www.DomainName
is associated with the App Runner
* service in addition to the base domain.
*
*
* @param enableWWWSubdomain
* When true
, the subdomain www.DomainName
is associated with the App
* Runner service in addition to the base domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CustomDomain withEnableWWWSubdomain(Boolean enableWWWSubdomain) {
setEnableWWWSubdomain(enableWWWSubdomain);
return this;
}
/**
*
* When true
, the subdomain www.DomainName
is associated with the App Runner
* service in addition to the base domain.
*
*
* @return When true
, the subdomain www.DomainName
is associated with the App
* Runner service in addition to the base domain.
*/
public Boolean isEnableWWWSubdomain() {
return this.enableWWWSubdomain;
}
/**
*
* A list of certificate CNAME records that's used for this domain name.
*
*
* @return A list of certificate CNAME records that's used for this domain name.
*/
public java.util.List getCertificateValidationRecords() {
return certificateValidationRecords;
}
/**
*
* A list of certificate CNAME records that's used for this domain name.
*
*
* @param certificateValidationRecords
* A list of certificate CNAME records that's used for this domain name.
*/
public void setCertificateValidationRecords(java.util.Collection certificateValidationRecords) {
if (certificateValidationRecords == null) {
this.certificateValidationRecords = null;
return;
}
this.certificateValidationRecords = new java.util.ArrayList(certificateValidationRecords);
}
/**
*
* A list of certificate CNAME records that's used for this domain name.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCertificateValidationRecords(java.util.Collection)} or
* {@link #withCertificateValidationRecords(java.util.Collection)} if you want to override the existing values.
*
*
* @param certificateValidationRecords
* A list of certificate CNAME records that's used for this domain name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CustomDomain withCertificateValidationRecords(CertificateValidationRecord... certificateValidationRecords) {
if (this.certificateValidationRecords == null) {
setCertificateValidationRecords(new java.util.ArrayList(certificateValidationRecords.length));
}
for (CertificateValidationRecord ele : certificateValidationRecords) {
this.certificateValidationRecords.add(ele);
}
return this;
}
/**
*
* A list of certificate CNAME records that's used for this domain name.
*
*
* @param certificateValidationRecords
* A list of certificate CNAME records that's used for this domain name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CustomDomain withCertificateValidationRecords(java.util.Collection certificateValidationRecords) {
setCertificateValidationRecords(certificateValidationRecords);
return this;
}
/**
*
* The current state of the domain name association.
*
*
* @param status
* The current state of the domain name association.
* @see CustomDomainAssociationStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The current state of the domain name association.
*
*
* @return The current state of the domain name association.
* @see CustomDomainAssociationStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The current state of the domain name association.
*
*
* @param status
* The current state of the domain name association.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CustomDomainAssociationStatus
*/
public CustomDomain withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The current state of the domain name association.
*
*
* @param status
* The current state of the domain name association.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CustomDomainAssociationStatus
*/
public CustomDomain withStatus(CustomDomainAssociationStatus status) {
this.status = status.toString();
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 (getDomainName() != null)
sb.append("DomainName: ").append(getDomainName()).append(",");
if (getEnableWWWSubdomain() != null)
sb.append("EnableWWWSubdomain: ").append(getEnableWWWSubdomain()).append(",");
if (getCertificateValidationRecords() != null)
sb.append("CertificateValidationRecords: ").append(getCertificateValidationRecords()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CustomDomain == false)
return false;
CustomDomain other = (CustomDomain) obj;
if (other.getDomainName() == null ^ this.getDomainName() == null)
return false;
if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false)
return false;
if (other.getEnableWWWSubdomain() == null ^ this.getEnableWWWSubdomain() == null)
return false;
if (other.getEnableWWWSubdomain() != null && other.getEnableWWWSubdomain().equals(this.getEnableWWWSubdomain()) == false)
return false;
if (other.getCertificateValidationRecords() == null ^ this.getCertificateValidationRecords() == null)
return false;
if (other.getCertificateValidationRecords() != null && other.getCertificateValidationRecords().equals(this.getCertificateValidationRecords()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
hashCode = prime * hashCode + ((getEnableWWWSubdomain() == null) ? 0 : getEnableWWWSubdomain().hashCode());
hashCode = prime * hashCode + ((getCertificateValidationRecords() == null) ? 0 : getCertificateValidationRecords().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
return hashCode;
}
@Override
public CustomDomain clone() {
try {
return (CustomDomain) 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.apprunner.model.transform.CustomDomainMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}