
com.amazonaws.services.certificatemanager.model.DomainValidation 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.certificatemanager.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Contains information about the validation of each domain name in the certificate.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DomainValidation implements Serializable, Cloneable, StructuredPojo {
/**
*
* A fully qualified domain name (FQDN) in the certificate. For example, www.example.com
or
* example.com
.
*
*/
private String domainName;
/**
*
* A list of email addresses that ACM used to send domain validation emails.
*
*/
private java.util.List validationEmails;
/**
*
* The domain name that ACM used to send domain validation emails.
*
*/
private String validationDomain;
/**
*
* The validation status of the domain name. This can be one of the following values:
*
*
* -
*
* PENDING_VALIDATION
*
*
* -
*
*
SUCCESS
*
*
* -
*
*
FAILED
*
*
*
*/
private String validationStatus;
/**
*
* Contains the CNAME record that you add to your DNS database for domain validation. For more information, see Use DNS to Validate Domain
* Ownership.
*
*
* Note: The CNAME information that you need does not include the name of your domain. If you include
your
* domain name in the DNS database CNAME record, validation fails.
For example, if the name is
* "_a79865eb4cd1a6ab990a45779b4e0b96.yourdomain.com", only "_a79865eb4cd1a6ab990a45779b4e0b96" must be used.
*
*/
private ResourceRecord resourceRecord;
/**
*
* Specifies the domain validation method.
*
*/
private String validationMethod;
/**
*
* A fully qualified domain name (FQDN) in the certificate. For example, www.example.com
or
* example.com
.
*
*
* @param domainName
* A fully qualified domain name (FQDN) in the certificate. For example, www.example.com
or
* example.com
.
*/
public void setDomainName(String domainName) {
this.domainName = domainName;
}
/**
*
* A fully qualified domain name (FQDN) in the certificate. For example, www.example.com
or
* example.com
.
*
*
* @return A fully qualified domain name (FQDN) in the certificate. For example, www.example.com
or
* example.com
.
*/
public String getDomainName() {
return this.domainName;
}
/**
*
* A fully qualified domain name (FQDN) in the certificate. For example, www.example.com
or
* example.com
.
*
*
* @param domainName
* A fully qualified domain name (FQDN) in the certificate. For example, www.example.com
or
* example.com
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainValidation withDomainName(String domainName) {
setDomainName(domainName);
return this;
}
/**
*
* A list of email addresses that ACM used to send domain validation emails.
*
*
* @return A list of email addresses that ACM used to send domain validation emails.
*/
public java.util.List getValidationEmails() {
return validationEmails;
}
/**
*
* A list of email addresses that ACM used to send domain validation emails.
*
*
* @param validationEmails
* A list of email addresses that ACM used to send domain validation emails.
*/
public void setValidationEmails(java.util.Collection validationEmails) {
if (validationEmails == null) {
this.validationEmails = null;
return;
}
this.validationEmails = new java.util.ArrayList(validationEmails);
}
/**
*
* A list of email addresses that ACM used to send domain validation emails.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setValidationEmails(java.util.Collection)} or {@link #withValidationEmails(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param validationEmails
* A list of email addresses that ACM used to send domain validation emails.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainValidation withValidationEmails(String... validationEmails) {
if (this.validationEmails == null) {
setValidationEmails(new java.util.ArrayList(validationEmails.length));
}
for (String ele : validationEmails) {
this.validationEmails.add(ele);
}
return this;
}
/**
*
* A list of email addresses that ACM used to send domain validation emails.
*
*
* @param validationEmails
* A list of email addresses that ACM used to send domain validation emails.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainValidation withValidationEmails(java.util.Collection validationEmails) {
setValidationEmails(validationEmails);
return this;
}
/**
*
* The domain name that ACM used to send domain validation emails.
*
*
* @param validationDomain
* The domain name that ACM used to send domain validation emails.
*/
public void setValidationDomain(String validationDomain) {
this.validationDomain = validationDomain;
}
/**
*
* The domain name that ACM used to send domain validation emails.
*
*
* @return The domain name that ACM used to send domain validation emails.
*/
public String getValidationDomain() {
return this.validationDomain;
}
/**
*
* The domain name that ACM used to send domain validation emails.
*
*
* @param validationDomain
* The domain name that ACM used to send domain validation emails.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainValidation withValidationDomain(String validationDomain) {
setValidationDomain(validationDomain);
return this;
}
/**
*
* The validation status of the domain name. This can be one of the following values:
*
*
* -
*
* PENDING_VALIDATION
*
*
* -
*
*
SUCCESS
*
*
* -
*
*
FAILED
*
*
*
*
* @param validationStatus
* The validation status of the domain name. This can be one of the following values:
*
* -
*
* PENDING_VALIDATION
*
*
* -
*
*
SUCCESS
*
*
* -
*
*
FAILED
*
*
* @see DomainStatus
*/
public void setValidationStatus(String validationStatus) {
this.validationStatus = validationStatus;
}
/**
*
* The validation status of the domain name. This can be one of the following values:
*
*
* -
*
* PENDING_VALIDATION
*
*
* -
*
*
SUCCESS
*
*
* -
*
*
FAILED
*
*
*
*
* @return The validation status of the domain name. This can be one of the following values:
*
* -
*
* PENDING_VALIDATION
*
*
* -
*
*
SUCCESS
*
*
* -
*
*
FAILED
*
*
* @see DomainStatus
*/
public String getValidationStatus() {
return this.validationStatus;
}
/**
*
* The validation status of the domain name. This can be one of the following values:
*
*
* -
*
* PENDING_VALIDATION
*
*
* -
*
*
SUCCESS
*
*
* -
*
*
FAILED
*
*
*
*
* @param validationStatus
* The validation status of the domain name. This can be one of the following values:
*
* -
*
* PENDING_VALIDATION
*
*
* -
*
*
SUCCESS
*
*
* -
*
*
FAILED
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DomainStatus
*/
public DomainValidation withValidationStatus(String validationStatus) {
setValidationStatus(validationStatus);
return this;
}
/**
*
* The validation status of the domain name. This can be one of the following values:
*
*
* -
*
* PENDING_VALIDATION
*
*
* -
*
*
SUCCESS
*
*
* -
*
*
FAILED
*
*
*
*
* @param validationStatus
* The validation status of the domain name. This can be one of the following values:
*
* -
*
* PENDING_VALIDATION
*
*
* -
*
*
SUCCESS
*
*
* -
*
*
FAILED
*
*
* @see DomainStatus
*/
public void setValidationStatus(DomainStatus validationStatus) {
withValidationStatus(validationStatus);
}
/**
*
* The validation status of the domain name. This can be one of the following values:
*
*
* -
*
* PENDING_VALIDATION
*
*
* -
*
*
SUCCESS
*
*
* -
*
*
FAILED
*
*
*
*
* @param validationStatus
* The validation status of the domain name. This can be one of the following values:
*
* -
*
* PENDING_VALIDATION
*
*
* -
*
*
SUCCESS
*
*
* -
*
*
FAILED
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DomainStatus
*/
public DomainValidation withValidationStatus(DomainStatus validationStatus) {
this.validationStatus = validationStatus.toString();
return this;
}
/**
*
* Contains the CNAME record that you add to your DNS database for domain validation. For more information, see Use DNS to Validate Domain
* Ownership.
*
*
* Note: The CNAME information that you need does not include the name of your domain. If you include
your
* domain name in the DNS database CNAME record, validation fails.
For example, if the name is
* "_a79865eb4cd1a6ab990a45779b4e0b96.yourdomain.com", only "_a79865eb4cd1a6ab990a45779b4e0b96" must be used.
*
*
* @param resourceRecord
* Contains the CNAME record that you add to your DNS database for domain validation. For more information,
* see Use DNS to
* Validate Domain Ownership.
*
* Note: The CNAME information that you need does not include the name of your domain. If you include
* your domain name in the DNS database CNAME record, validation fails.
For example, if the name is
* "_a79865eb4cd1a6ab990a45779b4e0b96.yourdomain.com", only "_a79865eb4cd1a6ab990a45779b4e0b96" must be used.
*/
public void setResourceRecord(ResourceRecord resourceRecord) {
this.resourceRecord = resourceRecord;
}
/**
*
* Contains the CNAME record that you add to your DNS database for domain validation. For more information, see Use DNS to Validate Domain
* Ownership.
*
*
* Note: The CNAME information that you need does not include the name of your domain. If you include
your
* domain name in the DNS database CNAME record, validation fails.
For example, if the name is
* "_a79865eb4cd1a6ab990a45779b4e0b96.yourdomain.com", only "_a79865eb4cd1a6ab990a45779b4e0b96" must be used.
*
*
* @return Contains the CNAME record that you add to your DNS database for domain validation. For more information,
* see Use DNS to
* Validate Domain Ownership.
*
* Note: The CNAME information that you need does not include the name of your domain. If you
* include
your domain name in the DNS database CNAME record, validation fails.
For example,
* if the name is "_a79865eb4cd1a6ab990a45779b4e0b96.yourdomain.com", only
* "_a79865eb4cd1a6ab990a45779b4e0b96" must be used.
*/
public ResourceRecord getResourceRecord() {
return this.resourceRecord;
}
/**
*
* Contains the CNAME record that you add to your DNS database for domain validation. For more information, see Use DNS to Validate Domain
* Ownership.
*
*
* Note: The CNAME information that you need does not include the name of your domain. If you include
your
* domain name in the DNS database CNAME record, validation fails.
For example, if the name is
* "_a79865eb4cd1a6ab990a45779b4e0b96.yourdomain.com", only "_a79865eb4cd1a6ab990a45779b4e0b96" must be used.
*
*
* @param resourceRecord
* Contains the CNAME record that you add to your DNS database for domain validation. For more information,
* see Use DNS to
* Validate Domain Ownership.
*
* Note: The CNAME information that you need does not include the name of your domain. If you include
* your domain name in the DNS database CNAME record, validation fails.
For example, if the name is
* "_a79865eb4cd1a6ab990a45779b4e0b96.yourdomain.com", only "_a79865eb4cd1a6ab990a45779b4e0b96" must be used.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainValidation withResourceRecord(ResourceRecord resourceRecord) {
setResourceRecord(resourceRecord);
return this;
}
/**
*
* Specifies the domain validation method.
*
*
* @param validationMethod
* Specifies the domain validation method.
* @see ValidationMethod
*/
public void setValidationMethod(String validationMethod) {
this.validationMethod = validationMethod;
}
/**
*
* Specifies the domain validation method.
*
*
* @return Specifies the domain validation method.
* @see ValidationMethod
*/
public String getValidationMethod() {
return this.validationMethod;
}
/**
*
* Specifies the domain validation method.
*
*
* @param validationMethod
* Specifies the domain validation method.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ValidationMethod
*/
public DomainValidation withValidationMethod(String validationMethod) {
setValidationMethod(validationMethod);
return this;
}
/**
*
* Specifies the domain validation method.
*
*
* @param validationMethod
* Specifies the domain validation method.
* @see ValidationMethod
*/
public void setValidationMethod(ValidationMethod validationMethod) {
withValidationMethod(validationMethod);
}
/**
*
* Specifies the domain validation method.
*
*
* @param validationMethod
* Specifies the domain validation method.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ValidationMethod
*/
public DomainValidation withValidationMethod(ValidationMethod validationMethod) {
this.validationMethod = validationMethod.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 (getValidationEmails() != null)
sb.append("ValidationEmails: ").append(getValidationEmails()).append(",");
if (getValidationDomain() != null)
sb.append("ValidationDomain: ").append(getValidationDomain()).append(",");
if (getValidationStatus() != null)
sb.append("ValidationStatus: ").append(getValidationStatus()).append(",");
if (getResourceRecord() != null)
sb.append("ResourceRecord: ").append(getResourceRecord()).append(",");
if (getValidationMethod() != null)
sb.append("ValidationMethod: ").append(getValidationMethod());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DomainValidation == false)
return false;
DomainValidation other = (DomainValidation) obj;
if (other.getDomainName() == null ^ this.getDomainName() == null)
return false;
if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false)
return false;
if (other.getValidationEmails() == null ^ this.getValidationEmails() == null)
return false;
if (other.getValidationEmails() != null && other.getValidationEmails().equals(this.getValidationEmails()) == false)
return false;
if (other.getValidationDomain() == null ^ this.getValidationDomain() == null)
return false;
if (other.getValidationDomain() != null && other.getValidationDomain().equals(this.getValidationDomain()) == false)
return false;
if (other.getValidationStatus() == null ^ this.getValidationStatus() == null)
return false;
if (other.getValidationStatus() != null && other.getValidationStatus().equals(this.getValidationStatus()) == false)
return false;
if (other.getResourceRecord() == null ^ this.getResourceRecord() == null)
return false;
if (other.getResourceRecord() != null && other.getResourceRecord().equals(this.getResourceRecord()) == false)
return false;
if (other.getValidationMethod() == null ^ this.getValidationMethod() == null)
return false;
if (other.getValidationMethod() != null && other.getValidationMethod().equals(this.getValidationMethod()) == 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 + ((getValidationEmails() == null) ? 0 : getValidationEmails().hashCode());
hashCode = prime * hashCode + ((getValidationDomain() == null) ? 0 : getValidationDomain().hashCode());
hashCode = prime * hashCode + ((getValidationStatus() == null) ? 0 : getValidationStatus().hashCode());
hashCode = prime * hashCode + ((getResourceRecord() == null) ? 0 : getResourceRecord().hashCode());
hashCode = prime * hashCode + ((getValidationMethod() == null) ? 0 : getValidationMethod().hashCode());
return hashCode;
}
@Override
public DomainValidation clone() {
try {
return (DomainValidation) 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.certificatemanager.model.transform.DomainValidationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}