All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.route53.model.ResourceRecordSet Maven / Gradle / Ivy

/*
 * 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;

/**
 * 

* A complex type that contains information about the current resource * record set. *

*/ public class ResourceRecordSet implements Serializable { /** * The domain name of the current resource record set. *

* Constraints:
* Length: 0 - 1024
*/ private String name; /** * The type of the current resource record set. *

* Constraints:
* Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA */ private String type; /** * Weighted, Latency, Geo, and Failover resource record sets only: * An identifier that differentiates among multiple resource record sets * that have the same combination of DNS name and type. *

* Constraints:
* Length: 1 - 128
*/ private String setIdentifier; /** * Weighted resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * determines what portion of traffic for the current resource record set * is routed to the associated location. *

* Constraints:
* Range: 0 - 255
*/ private Long weight; /** * Latency-based resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the AWS region for the current resource record set. *

* Constraints:
* Length: 1 - 64
* Allowed Values: us-east-1, us-west-1, us-west-2, eu-west-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, cn-north-1 */ private String region; /** * Geo location resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the geo location for the current resource record set. */ private GeoLocation geoLocation; /** * Failover resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * indicates whether the current resource record set is a primary or * secondary resource record set. A failover set may contain at most one * resource record set marked as primary and one resource record set * marked as secondary. A resource record set marked as primary will be * returned if any of the following are true: (1) an associated health * check is passing, (2) if the resource record set is an alias with the * evaluate target health and at least one target resource record set is * healthy, (3) both the primary and secondary resource record set are * failing health checks or (4) there is no secondary resource record * set. A secondary resource record set will be returned if: (1) the * primary is failing a health check and either the secondary is passing * a health check or has no associated health check, or (2) there is no * primary resource record set.

Valid values: PRIMARY | * SECONDARY *

* Constraints:
* Allowed Values: PRIMARY, SECONDARY */ private String failover; /** * The cache time to live for the current resource record set. *

* Constraints:
* Range: 0 - 2147483647
*/ private Long tTL; /** * A complex type that contains the resource records for the current * resource record set. *

* Constraints:
* Length: 1 -
*/ private com.amazonaws.internal.ListWithAutoConstructFlag resourceRecords; /** * Alias resource record sets only: Information about the AWS * resource to which you are redirecting traffic. */ private AliasTarget aliasTarget; /** * Health Check resource record sets only, not required for alias * resource record sets: An identifier that is used to identify * health check associated with the resource record set. *

* Constraints:
* Length: 0 - 64
*/ private String healthCheckId; /** * Default constructor for a new ResourceRecordSet object. Callers should use the * setter or fluent setter (with...) methods to initialize this object after creating it. */ public ResourceRecordSet() {} /** * Constructs a new ResourceRecordSet object. * Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name The domain name of the current resource record set. * @param type The type of the current resource record set. */ public ResourceRecordSet(String name, String type) { setName(name); setType(type); } /** * Constructs a new ResourceRecordSet object. * Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name The domain name of the current resource record set. * @param type The type of the current resource record set. */ public ResourceRecordSet(String name, RRType type) { this.name = name; this.type = type.toString(); } /** * The domain name of the current resource record set. *

* Constraints:
* Length: 0 - 1024
* * @return The domain name of the current resource record set. */ public String getName() { return name; } /** * The domain name of the current resource record set. *

* Constraints:
* Length: 0 - 1024
* * @param name The domain name of the current resource record set. */ public void setName(String name) { this.name = name; } /** * The domain name of the current resource record set. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Length: 0 - 1024
* * @param name The domain name of the current resource record set. * * @return A reference to this updated object so that method calls can be chained * together. */ public ResourceRecordSet withName(String name) { this.name = name; return this; } /** * The type of the current resource record set. *

* Constraints:
* Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA * * @return The type of the current resource record set. * * @see RRType */ public String getType() { return type; } /** * The type of the current resource record set. *

* Constraints:
* Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA * * @param type The type of the current resource record set. * * @see RRType */ public void setType(String type) { this.type = type; } /** * The type of the current resource record set. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA * * @param type The type of the current resource record set. * * @return A reference to this updated object so that method calls can be chained * together. * * @see RRType */ public ResourceRecordSet withType(String type) { this.type = type; return this; } /** * The type of the current resource record set. *

* Constraints:
* Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA * * @param type The type of the current resource record set. * * @see RRType */ public void setType(RRType type) { this.type = type.toString(); } /** * The type of the current resource record set. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA * * @param type The type of the current resource record set. * * @return A reference to this updated object so that method calls can be chained * together. * * @see RRType */ public ResourceRecordSet withType(RRType type) { this.type = type.toString(); return this; } /** * Weighted, Latency, Geo, and Failover resource record sets only: * An identifier that differentiates among multiple resource record sets * that have the same combination of DNS name and type. *

* Constraints:
* Length: 1 - 128
* * @return Weighted, Latency, Geo, and Failover resource record sets only: * An identifier that differentiates among multiple resource record sets * that have the same combination of DNS name and type. */ public String getSetIdentifier() { return setIdentifier; } /** * Weighted, Latency, Geo, and Failover resource record sets only: * An identifier that differentiates among multiple resource record sets * that have the same combination of DNS name and type. *

* Constraints:
* Length: 1 - 128
* * @param setIdentifier Weighted, Latency, Geo, and Failover resource record sets only: * An identifier that differentiates among multiple resource record sets * that have the same combination of DNS name and type. */ public void setSetIdentifier(String setIdentifier) { this.setIdentifier = setIdentifier; } /** * Weighted, Latency, Geo, and Failover resource record sets only: * An identifier that differentiates among multiple resource record sets * that have the same combination of DNS name and type. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Length: 1 - 128
* * @param setIdentifier Weighted, Latency, Geo, and Failover resource record sets only: * An identifier that differentiates among multiple resource record sets * that have the same combination of DNS name and type. * * @return A reference to this updated object so that method calls can be chained * together. */ public ResourceRecordSet withSetIdentifier(String setIdentifier) { this.setIdentifier = setIdentifier; return this; } /** * Weighted resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * determines what portion of traffic for the current resource record set * is routed to the associated location. *

* Constraints:
* Range: 0 - 255
* * @return Weighted resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * determines what portion of traffic for the current resource record set * is routed to the associated location. */ public Long getWeight() { return weight; } /** * Weighted resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * determines what portion of traffic for the current resource record set * is routed to the associated location. *

* Constraints:
* Range: 0 - 255
* * @param weight Weighted resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * determines what portion of traffic for the current resource record set * is routed to the associated location. */ public void setWeight(Long weight) { this.weight = weight; } /** * Weighted resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * determines what portion of traffic for the current resource record set * is routed to the associated location. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Range: 0 - 255
* * @param weight Weighted resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * determines what portion of traffic for the current resource record set * is routed to the associated location. * * @return A reference to this updated object so that method calls can be chained * together. */ public ResourceRecordSet withWeight(Long weight) { this.weight = weight; return this; } /** * Latency-based resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the AWS region for the current resource record set. *

* Constraints:
* Length: 1 - 64
* Allowed Values: us-east-1, us-west-1, us-west-2, eu-west-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, cn-north-1 * * @return Latency-based resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the AWS region for the current resource record set. * * @see ResourceRecordSetRegion */ public String getRegion() { return region; } /** * Latency-based resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the AWS region for the current resource record set. *

* Constraints:
* Length: 1 - 64
* Allowed Values: us-east-1, us-west-1, us-west-2, eu-west-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, cn-north-1 * * @param region Latency-based resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the AWS region for the current resource record set. * * @see ResourceRecordSetRegion */ public void setRegion(String region) { this.region = region; } /** * Latency-based resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the AWS region for the current resource record set. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Length: 1 - 64
* Allowed Values: us-east-1, us-west-1, us-west-2, eu-west-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, cn-north-1 * * @param region Latency-based resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the AWS region for the current resource record set. * * @return A reference to this updated object so that method calls can be chained * together. * * @see ResourceRecordSetRegion */ public ResourceRecordSet withRegion(String region) { this.region = region; return this; } /** * Latency-based resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the AWS region for the current resource record set. *

* Constraints:
* Length: 1 - 64
* Allowed Values: us-east-1, us-west-1, us-west-2, eu-west-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, cn-north-1 * * @param region Latency-based resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the AWS region for the current resource record set. * * @see ResourceRecordSetRegion */ public void setRegion(ResourceRecordSetRegion region) { this.region = region.toString(); } /** * Latency-based resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the AWS region for the current resource record set. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Length: 1 - 64
* Allowed Values: us-east-1, us-west-1, us-west-2, eu-west-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, cn-north-1 * * @param region Latency-based resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the AWS region for the current resource record set. * * @return A reference to this updated object so that method calls can be chained * together. * * @see ResourceRecordSetRegion */ public ResourceRecordSet withRegion(ResourceRecordSetRegion region) { this.region = region.toString(); return this; } /** * Geo location resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the geo location for the current resource record set. * * @return Geo location resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the geo location for the current resource record set. */ public GeoLocation getGeoLocation() { return geoLocation; } /** * Geo location resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the geo location for the current resource record set. * * @param geoLocation Geo location resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the geo location for the current resource record set. */ public void setGeoLocation(GeoLocation geoLocation) { this.geoLocation = geoLocation; } /** * Geo location resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the geo location for the current resource record set. *

* Returns a reference to this object so that method calls can be chained together. * * @param geoLocation Geo location resource record sets only: Among resource record * sets that have the same combination of DNS name and type, a value that * specifies the geo location for the current resource record set. * * @return A reference to this updated object so that method calls can be chained * together. */ public ResourceRecordSet withGeoLocation(GeoLocation geoLocation) { this.geoLocation = geoLocation; return this; } /** * Failover resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * indicates whether the current resource record set is a primary or * secondary resource record set. A failover set may contain at most one * resource record set marked as primary and one resource record set * marked as secondary. A resource record set marked as primary will be * returned if any of the following are true: (1) an associated health * check is passing, (2) if the resource record set is an alias with the * evaluate target health and at least one target resource record set is * healthy, (3) both the primary and secondary resource record set are * failing health checks or (4) there is no secondary resource record * set. A secondary resource record set will be returned if: (1) the * primary is failing a health check and either the secondary is passing * a health check or has no associated health check, or (2) there is no * primary resource record set.

Valid values: PRIMARY | * SECONDARY *

* Constraints:
* Allowed Values: PRIMARY, SECONDARY * * @return Failover resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * indicates whether the current resource record set is a primary or * secondary resource record set. A failover set may contain at most one * resource record set marked as primary and one resource record set * marked as secondary. A resource record set marked as primary will be * returned if any of the following are true: (1) an associated health * check is passing, (2) if the resource record set is an alias with the * evaluate target health and at least one target resource record set is * healthy, (3) both the primary and secondary resource record set are * failing health checks or (4) there is no secondary resource record * set. A secondary resource record set will be returned if: (1) the * primary is failing a health check and either the secondary is passing * a health check or has no associated health check, or (2) there is no * primary resource record set.

Valid values: PRIMARY | * SECONDARY * * @see ResourceRecordSetFailover */ public String getFailover() { return failover; } /** * Failover resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * indicates whether the current resource record set is a primary or * secondary resource record set. A failover set may contain at most one * resource record set marked as primary and one resource record set * marked as secondary. A resource record set marked as primary will be * returned if any of the following are true: (1) an associated health * check is passing, (2) if the resource record set is an alias with the * evaluate target health and at least one target resource record set is * healthy, (3) both the primary and secondary resource record set are * failing health checks or (4) there is no secondary resource record * set. A secondary resource record set will be returned if: (1) the * primary is failing a health check and either the secondary is passing * a health check or has no associated health check, or (2) there is no * primary resource record set.

Valid values: PRIMARY | * SECONDARY *

* Constraints:
* Allowed Values: PRIMARY, SECONDARY * * @param failover Failover resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * indicates whether the current resource record set is a primary or * secondary resource record set. A failover set may contain at most one * resource record set marked as primary and one resource record set * marked as secondary. A resource record set marked as primary will be * returned if any of the following are true: (1) an associated health * check is passing, (2) if the resource record set is an alias with the * evaluate target health and at least one target resource record set is * healthy, (3) both the primary and secondary resource record set are * failing health checks or (4) there is no secondary resource record * set. A secondary resource record set will be returned if: (1) the * primary is failing a health check and either the secondary is passing * a health check or has no associated health check, or (2) there is no * primary resource record set.

Valid values: PRIMARY | * SECONDARY * * @see ResourceRecordSetFailover */ public void setFailover(String failover) { this.failover = failover; } /** * Failover resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * indicates whether the current resource record set is a primary or * secondary resource record set. A failover set may contain at most one * resource record set marked as primary and one resource record set * marked as secondary. A resource record set marked as primary will be * returned if any of the following are true: (1) an associated health * check is passing, (2) if the resource record set is an alias with the * evaluate target health and at least one target resource record set is * healthy, (3) both the primary and secondary resource record set are * failing health checks or (4) there is no secondary resource record * set. A secondary resource record set will be returned if: (1) the * primary is failing a health check and either the secondary is passing * a health check or has no associated health check, or (2) there is no * primary resource record set.

Valid values: PRIMARY | * SECONDARY *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Allowed Values: PRIMARY, SECONDARY * * @param failover Failover resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * indicates whether the current resource record set is a primary or * secondary resource record set. A failover set may contain at most one * resource record set marked as primary and one resource record set * marked as secondary. A resource record set marked as primary will be * returned if any of the following are true: (1) an associated health * check is passing, (2) if the resource record set is an alias with the * evaluate target health and at least one target resource record set is * healthy, (3) both the primary and secondary resource record set are * failing health checks or (4) there is no secondary resource record * set. A secondary resource record set will be returned if: (1) the * primary is failing a health check and either the secondary is passing * a health check or has no associated health check, or (2) there is no * primary resource record set.

Valid values: PRIMARY | * SECONDARY * * @return A reference to this updated object so that method calls can be chained * together. * * @see ResourceRecordSetFailover */ public ResourceRecordSet withFailover(String failover) { this.failover = failover; return this; } /** * Failover resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * indicates whether the current resource record set is a primary or * secondary resource record set. A failover set may contain at most one * resource record set marked as primary and one resource record set * marked as secondary. A resource record set marked as primary will be * returned if any of the following are true: (1) an associated health * check is passing, (2) if the resource record set is an alias with the * evaluate target health and at least one target resource record set is * healthy, (3) both the primary and secondary resource record set are * failing health checks or (4) there is no secondary resource record * set. A secondary resource record set will be returned if: (1) the * primary is failing a health check and either the secondary is passing * a health check or has no associated health check, or (2) there is no * primary resource record set.

Valid values: PRIMARY | * SECONDARY *

* Constraints:
* Allowed Values: PRIMARY, SECONDARY * * @param failover Failover resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * indicates whether the current resource record set is a primary or * secondary resource record set. A failover set may contain at most one * resource record set marked as primary and one resource record set * marked as secondary. A resource record set marked as primary will be * returned if any of the following are true: (1) an associated health * check is passing, (2) if the resource record set is an alias with the * evaluate target health and at least one target resource record set is * healthy, (3) both the primary and secondary resource record set are * failing health checks or (4) there is no secondary resource record * set. A secondary resource record set will be returned if: (1) the * primary is failing a health check and either the secondary is passing * a health check or has no associated health check, or (2) there is no * primary resource record set.

Valid values: PRIMARY | * SECONDARY * * @see ResourceRecordSetFailover */ public void setFailover(ResourceRecordSetFailover failover) { this.failover = failover.toString(); } /** * Failover resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * indicates whether the current resource record set is a primary or * secondary resource record set. A failover set may contain at most one * resource record set marked as primary and one resource record set * marked as secondary. A resource record set marked as primary will be * returned if any of the following are true: (1) an associated health * check is passing, (2) if the resource record set is an alias with the * evaluate target health and at least one target resource record set is * healthy, (3) both the primary and secondary resource record set are * failing health checks or (4) there is no secondary resource record * set. A secondary resource record set will be returned if: (1) the * primary is failing a health check and either the secondary is passing * a health check or has no associated health check, or (2) there is no * primary resource record set.

Valid values: PRIMARY | * SECONDARY *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Allowed Values: PRIMARY, SECONDARY * * @param failover Failover resource record sets only: Among resource record sets * that have the same combination of DNS name and type, a value that * indicates whether the current resource record set is a primary or * secondary resource record set. A failover set may contain at most one * resource record set marked as primary and one resource record set * marked as secondary. A resource record set marked as primary will be * returned if any of the following are true: (1) an associated health * check is passing, (2) if the resource record set is an alias with the * evaluate target health and at least one target resource record set is * healthy, (3) both the primary and secondary resource record set are * failing health checks or (4) there is no secondary resource record * set. A secondary resource record set will be returned if: (1) the * primary is failing a health check and either the secondary is passing * a health check or has no associated health check, or (2) there is no * primary resource record set.

Valid values: PRIMARY | * SECONDARY * * @return A reference to this updated object so that method calls can be chained * together. * * @see ResourceRecordSetFailover */ public ResourceRecordSet withFailover(ResourceRecordSetFailover failover) { this.failover = failover.toString(); return this; } /** * The cache time to live for the current resource record set. *

* Constraints:
* Range: 0 - 2147483647
* * @return The cache time to live for the current resource record set. */ public Long getTTL() { return tTL; } /** * The cache time to live for the current resource record set. *

* Constraints:
* Range: 0 - 2147483647
* * @param tTL The cache time to live for the current resource record set. */ public void setTTL(Long tTL) { this.tTL = tTL; } /** * The cache time to live for the current resource record set. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Range: 0 - 2147483647
* * @param tTL The cache time to live for the current resource record set. * * @return A reference to this updated object so that method calls can be chained * together. */ public ResourceRecordSet withTTL(Long tTL) { this.tTL = tTL; return this; } /** * A complex type that contains the resource records for the current * resource record set. *

* Constraints:
* Length: 1 -
* * @return A complex type that contains the resource records for the current * resource record set. */ public java.util.List getResourceRecords() { if (resourceRecords == null) { resourceRecords = new com.amazonaws.internal.ListWithAutoConstructFlag(); resourceRecords.setAutoConstruct(true); } return resourceRecords; } /** * A complex type that contains the resource records for the current * resource record set. *

* Constraints:
* Length: 1 -
* * @param resourceRecords A complex type that contains the resource records for the current * resource record set. */ public void setResourceRecords(java.util.Collection resourceRecords) { if (resourceRecords == null) { this.resourceRecords = null; return; } com.amazonaws.internal.ListWithAutoConstructFlag resourceRecordsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(resourceRecords.size()); resourceRecordsCopy.addAll(resourceRecords); this.resourceRecords = resourceRecordsCopy; } /** * A complex type that contains the resource records for the current * resource record set. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Length: 1 -
* * @param resourceRecords A complex type that contains the resource records for the current * resource record set. * * @return A reference to this updated object so that method calls can be chained * together. */ public ResourceRecordSet withResourceRecords(ResourceRecord... resourceRecords) { if (getResourceRecords() == null) setResourceRecords(new java.util.ArrayList(resourceRecords.length)); for (ResourceRecord value : resourceRecords) { getResourceRecords().add(value); } return this; } /** * A complex type that contains the resource records for the current * resource record set. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Length: 1 -
* * @param resourceRecords A complex type that contains the resource records for the current * resource record set. * * @return A reference to this updated object so that method calls can be chained * together. */ public ResourceRecordSet withResourceRecords(java.util.Collection resourceRecords) { if (resourceRecords == null) { this.resourceRecords = null; } else { com.amazonaws.internal.ListWithAutoConstructFlag resourceRecordsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(resourceRecords.size()); resourceRecordsCopy.addAll(resourceRecords); this.resourceRecords = resourceRecordsCopy; } return this; } /** * Alias resource record sets only: Information about the AWS * resource to which you are redirecting traffic. * * @return Alias resource record sets only: Information about the AWS * resource to which you are redirecting traffic. */ public AliasTarget getAliasTarget() { return aliasTarget; } /** * Alias resource record sets only: Information about the AWS * resource to which you are redirecting traffic. * * @param aliasTarget Alias resource record sets only: Information about the AWS * resource to which you are redirecting traffic. */ public void setAliasTarget(AliasTarget aliasTarget) { this.aliasTarget = aliasTarget; } /** * Alias resource record sets only: Information about the AWS * resource to which you are redirecting traffic. *

* Returns a reference to this object so that method calls can be chained together. * * @param aliasTarget Alias resource record sets only: Information about the AWS * resource to which you are redirecting traffic. * * @return A reference to this updated object so that method calls can be chained * together. */ public ResourceRecordSet withAliasTarget(AliasTarget aliasTarget) { this.aliasTarget = aliasTarget; return this; } /** * Health Check resource record sets only, not required for alias * resource record sets: An identifier that is used to identify * health check associated with the resource record set. *

* Constraints:
* Length: 0 - 64
* * @return Health Check resource record sets only, not required for alias * resource record sets: An identifier that is used to identify * health check associated with the resource record set. */ public String getHealthCheckId() { return healthCheckId; } /** * Health Check resource record sets only, not required for alias * resource record sets: An identifier that is used to identify * health check associated with the resource record set. *

* Constraints:
* Length: 0 - 64
* * @param healthCheckId Health Check resource record sets only, not required for alias * resource record sets: An identifier that is used to identify * health check associated with the resource record set. */ public void setHealthCheckId(String healthCheckId) { this.healthCheckId = healthCheckId; } /** * Health Check resource record sets only, not required for alias * resource record sets: An identifier that is used to identify * health check associated with the resource record set. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Length: 0 - 64
* * @param healthCheckId Health Check resource record sets only, not required for alias * resource record sets: An identifier that is used to identify * health check associated with the resource record set. * * @return A reference to this updated object so that method calls can be chained * together. */ public ResourceRecordSet withHealthCheckId(String healthCheckId) { this.healthCheckId = healthCheckId; return this; } /** * 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 (getName() != null) sb.append("Name: " + getName() + ","); if (getType() != null) sb.append("Type: " + getType() + ","); if (getSetIdentifier() != null) sb.append("SetIdentifier: " + getSetIdentifier() + ","); if (getWeight() != null) sb.append("Weight: " + getWeight() + ","); if (getRegion() != null) sb.append("Region: " + getRegion() + ","); if (getGeoLocation() != null) sb.append("GeoLocation: " + getGeoLocation() + ","); if (getFailover() != null) sb.append("Failover: " + getFailover() + ","); if (getTTL() != null) sb.append("TTL: " + getTTL() + ","); if (getResourceRecords() != null) sb.append("ResourceRecords: " + getResourceRecords() + ","); if (getAliasTarget() != null) sb.append("AliasTarget: " + getAliasTarget() + ","); if (getHealthCheckId() != null) sb.append("HealthCheckId: " + getHealthCheckId() ); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getSetIdentifier() == null) ? 0 : getSetIdentifier().hashCode()); hashCode = prime * hashCode + ((getWeight() == null) ? 0 : getWeight().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getGeoLocation() == null) ? 0 : getGeoLocation().hashCode()); hashCode = prime * hashCode + ((getFailover() == null) ? 0 : getFailover().hashCode()); hashCode = prime * hashCode + ((getTTL() == null) ? 0 : getTTL().hashCode()); hashCode = prime * hashCode + ((getResourceRecords() == null) ? 0 : getResourceRecords().hashCode()); hashCode = prime * hashCode + ((getAliasTarget() == null) ? 0 : getAliasTarget().hashCode()); hashCode = prime * hashCode + ((getHealthCheckId() == null) ? 0 : getHealthCheckId().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ResourceRecordSet == false) return false; ResourceRecordSet other = (ResourceRecordSet)obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getSetIdentifier() == null ^ this.getSetIdentifier() == null) return false; if (other.getSetIdentifier() != null && other.getSetIdentifier().equals(this.getSetIdentifier()) == false) return false; if (other.getWeight() == null ^ this.getWeight() == null) return false; if (other.getWeight() != null && other.getWeight().equals(this.getWeight()) == false) return false; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; if (other.getGeoLocation() == null ^ this.getGeoLocation() == null) return false; if (other.getGeoLocation() != null && other.getGeoLocation().equals(this.getGeoLocation()) == false) return false; if (other.getFailover() == null ^ this.getFailover() == null) return false; if (other.getFailover() != null && other.getFailover().equals(this.getFailover()) == false) return false; if (other.getTTL() == null ^ this.getTTL() == null) return false; if (other.getTTL() != null && other.getTTL().equals(this.getTTL()) == false) return false; if (other.getResourceRecords() == null ^ this.getResourceRecords() == null) return false; if (other.getResourceRecords() != null && other.getResourceRecords().equals(this.getResourceRecords()) == false) return false; if (other.getAliasTarget() == null ^ this.getAliasTarget() == null) return false; if (other.getAliasTarget() != null && other.getAliasTarget().equals(this.getAliasTarget()) == false) return false; if (other.getHealthCheckId() == null ^ this.getHealthCheckId() == null) return false; if (other.getHealthCheckId() != null && other.getHealthCheckId().equals(this.getHealthCheckId()) == false) return false; return true; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy