com.amazonaws.services.route53.model.AliasTarget Maven / Gradle / Ivy
Show all versions of aws-java-sdk Show documentation
/*
* Copyright 2010-2014 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.route53.model;
import java.io.Serializable;
/**
*
* Alias resource record sets only: Information about the domain
* to which you are redirecting traffic.
*
*
* For more information and an example, see
* Creating Alias Resource Record Sets
* in the Amazon Route 53 Developer Guide
*
*
* .
*
*/
public class AliasTarget implements Serializable {
/**
* Alias resource record sets only: The value of the hosted zone
* ID for the AWS resource. For more information and an example, see
* Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* Constraints:
* Length: 0 - 32
*/
private String hostedZoneId;
/**
* Alias resource record sets only: The external DNS name
* associated with the AWS Resource.
For more information and an
* example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* Constraints:
* Length: 0 - 1024
*/
private String dNSName;
/**
* Alias resource record sets only: A boolean value that indicates
* whether this Resource Record Set should respect the health status of
* any health checks associated with the ALIAS target record which it is
* linked to.
For more information and an example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*/
private Boolean evaluateTargetHealth;
/**
* Default constructor for a new AliasTarget object. Callers should use the
* setter or fluent setter (with...) methods to initialize this object after creating it.
*/
public AliasTarget() {}
/**
* Constructs a new AliasTarget object.
* Callers should use the setter or fluent setter (with...) methods to
* initialize any additional object members.
*
* @param hostedZoneId Alias resource record sets only: The value
* of the hosted zone ID for the AWS resource.
For more information
* and an example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
* @param dNSName Alias resource record sets only: The external
* DNS name associated with the AWS Resource.
For more information and
* an example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*/
public AliasTarget(String hostedZoneId, String dNSName) {
setHostedZoneId(hostedZoneId);
setDNSName(dNSName);
}
/**
* Alias resource record sets only: The value of the hosted zone
* ID for the AWS resource.
For more information and an example, see
* Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* Constraints:
* Length: 0 - 32
*
* @return Alias resource record sets only: The value of the hosted zone
* ID for the AWS resource.
For more information and an example, see
* Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*/
public String getHostedZoneId() {
return hostedZoneId;
}
/**
* Alias resource record sets only: The value of the hosted zone
* ID for the AWS resource.
For more information and an example, see
* Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* Constraints:
* Length: 0 - 32
*
* @param hostedZoneId Alias resource record sets only: The value of the hosted zone
* ID for the AWS resource.
For more information and an example, see
* Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*/
public void setHostedZoneId(String hostedZoneId) {
this.hostedZoneId = hostedZoneId;
}
/**
* Alias resource record sets only: The value of the hosted zone
* ID for the AWS resource.
For more information and an example, see
* Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Length: 0 - 32
*
* @param hostedZoneId Alias resource record sets only: The value of the hosted zone
* ID for the AWS resource.
For more information and an example, see
* Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public AliasTarget withHostedZoneId(String hostedZoneId) {
this.hostedZoneId = hostedZoneId;
return this;
}
/**
* Alias resource record sets only: The external DNS name
* associated with the AWS Resource.
For more information and an
* example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* Constraints:
* Length: 0 - 1024
*
* @return Alias resource record sets only: The external DNS name
* associated with the AWS Resource.
For more information and an
* example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*/
public String getDNSName() {
return dNSName;
}
/**
* Alias resource record sets only: The external DNS name
* associated with the AWS Resource.
For more information and an
* example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* Constraints:
* Length: 0 - 1024
*
* @param dNSName Alias resource record sets only: The external DNS name
* associated with the AWS Resource.
For more information and an
* example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*/
public void setDNSName(String dNSName) {
this.dNSName = dNSName;
}
/**
* Alias resource record sets only: The external DNS name
* associated with the AWS Resource.
For more information and an
* example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Length: 0 - 1024
*
* @param dNSName Alias resource record sets only: The external DNS name
* associated with the AWS Resource.
For more information and an
* example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public AliasTarget withDNSName(String dNSName) {
this.dNSName = dNSName;
return this;
}
/**
* Alias resource record sets only: A boolean value that indicates
* whether this Resource Record Set should respect the health status of
* any health checks associated with the ALIAS target record which it is
* linked to.
For more information and an example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* @return Alias resource record sets only: A boolean value that indicates
* whether this Resource Record Set should respect the health status of
* any health checks associated with the ALIAS target record which it is
* linked to.
For more information and an example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*/
public Boolean isEvaluateTargetHealth() {
return evaluateTargetHealth;
}
/**
* Alias resource record sets only: A boolean value that indicates
* whether this Resource Record Set should respect the health status of
* any health checks associated with the ALIAS target record which it is
* linked to.
For more information and an example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* @param evaluateTargetHealth Alias resource record sets only: A boolean value that indicates
* whether this Resource Record Set should respect the health status of
* any health checks associated with the ALIAS target record which it is
* linked to.
For more information and an example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*/
public void setEvaluateTargetHealth(Boolean evaluateTargetHealth) {
this.evaluateTargetHealth = evaluateTargetHealth;
}
/**
* Alias resource record sets only: A boolean value that indicates
* whether this Resource Record Set should respect the health status of
* any health checks associated with the ALIAS target record which it is
* linked to.
For more information and an example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param evaluateTargetHealth Alias resource record sets only: A boolean value that indicates
* whether this Resource Record Set should respect the health status of
* any health checks associated with the ALIAS target record which it is
* linked to.
For more information and an example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public AliasTarget withEvaluateTargetHealth(Boolean evaluateTargetHealth) {
this.evaluateTargetHealth = evaluateTargetHealth;
return this;
}
/**
* Alias resource record sets only: A boolean value that indicates
* whether this Resource Record Set should respect the health status of
* any health checks associated with the ALIAS target record which it is
* linked to.
For more information and an example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*
* @return Alias resource record sets only: A boolean value that indicates
* whether this Resource Record Set should respect the health status of
* any health checks associated with the ALIAS target record which it is
* linked to.
For more information and an example, see Creating
* Alias Resource Record Sets in the Amazon Route 53 Developer
* Guide.
*/
public Boolean getEvaluateTargetHealth() {
return evaluateTargetHealth;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getHostedZoneId() != null) sb.append("HostedZoneId: " + getHostedZoneId() + ",");
if (getDNSName() != null) sb.append("DNSName: " + getDNSName() + ",");
if (isEvaluateTargetHealth() != null) sb.append("EvaluateTargetHealth: " + isEvaluateTargetHealth() );
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getHostedZoneId() == null) ? 0 : getHostedZoneId().hashCode());
hashCode = prime * hashCode + ((getDNSName() == null) ? 0 : getDNSName().hashCode());
hashCode = prime * hashCode + ((isEvaluateTargetHealth() == null) ? 0 : isEvaluateTargetHealth().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (obj instanceof AliasTarget == false) return false;
AliasTarget other = (AliasTarget)obj;
if (other.getHostedZoneId() == null ^ this.getHostedZoneId() == null) return false;
if (other.getHostedZoneId() != null && other.getHostedZoneId().equals(this.getHostedZoneId()) == false) return false;
if (other.getDNSName() == null ^ this.getDNSName() == null) return false;
if (other.getDNSName() != null && other.getDNSName().equals(this.getDNSName()) == false) return false;
if (other.isEvaluateTargetHealth() == null ^ this.isEvaluateTargetHealth() == null) return false;
if (other.isEvaluateTargetHealth() != null && other.isEvaluateTargetHealth().equals(this.isEvaluateTargetHealth()) == false) return false;
return true;
}
}