
com.amazonaws.services.route53.model.ListTrafficPolicyVersionsResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-route53 Show documentation
/*
* Copyright 2010-2016 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 the response information for the request.
*
*/
public class ListTrafficPolicyVersionsResult implements Serializable, Cloneable {
/**
*
* A list that contains one TrafficPolicy
element for each
* traffic policy version that is associated with the specified traffic
* policy.
*
*/
private com.amazonaws.internal.SdkInternalList trafficPolicies;
/**
*
* A flag that indicates whether there are more traffic policies to be
* listed. If the response was truncated, you can get the next group of
* maxitems
traffic policies by calling
* ListTrafficPolicyVersions
again and specifying the value of
* the NextMarker
element in the marker parameter.
*
*
* Valid Values: true
| false
*
*/
private Boolean isTruncated;
/**
*
* If IsTruncated
is true
, the value of
* TrafficPolicyVersionMarker
identifies the first traffic
* policy in the next group of MaxItems
traffic policies. Call
* ListTrafficPolicyVersions
again and specify the value of
* TrafficPolicyVersionMarker
in the
* TrafficPolicyVersionMarker
request parameter.
*
*
* This element is present only if IsTruncated
is
* true
.
*
*/
private String trafficPolicyVersionMarker;
/**
*
* The value that you specified for the maxitems
parameter in
* the call to ListTrafficPolicyVersions
that produced the
* current response.
*
*/
private String maxItems;
/**
*
* A list that contains one TrafficPolicy
element for each
* traffic policy version that is associated with the specified traffic
* policy.
*
*
* @return A list that contains one TrafficPolicy
element for
* each traffic policy version that is associated with the specified
* traffic policy.
*/
public java.util.List getTrafficPolicies() {
if (trafficPolicies == null) {
trafficPolicies = new com.amazonaws.internal.SdkInternalList();
}
return trafficPolicies;
}
/**
*
* A list that contains one TrafficPolicy
element for each
* traffic policy version that is associated with the specified traffic
* policy.
*
*
* @param trafficPolicies
* A list that contains one TrafficPolicy
element for
* each traffic policy version that is associated with the specified
* traffic policy.
*/
public void setTrafficPolicies(
java.util.Collection trafficPolicies) {
if (trafficPolicies == null) {
this.trafficPolicies = null;
return;
}
this.trafficPolicies = new com.amazonaws.internal.SdkInternalList(
trafficPolicies);
}
/**
*
* A list that contains one TrafficPolicy
element for each
* traffic policy version that is associated with the specified traffic
* policy.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setTrafficPolicies(java.util.Collection)} or
* {@link #withTrafficPolicies(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param trafficPolicies
* A list that contains one TrafficPolicy
element for
* each traffic policy version that is associated with the specified
* traffic policy.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ListTrafficPolicyVersionsResult withTrafficPolicies(
TrafficPolicy... trafficPolicies) {
if (this.trafficPolicies == null) {
setTrafficPolicies(new com.amazonaws.internal.SdkInternalList(
trafficPolicies.length));
}
for (TrafficPolicy ele : trafficPolicies) {
this.trafficPolicies.add(ele);
}
return this;
}
/**
*
* A list that contains one TrafficPolicy
element for each
* traffic policy version that is associated with the specified traffic
* policy.
*
*
* @param trafficPolicies
* A list that contains one TrafficPolicy
element for
* each traffic policy version that is associated with the specified
* traffic policy.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ListTrafficPolicyVersionsResult withTrafficPolicies(
java.util.Collection trafficPolicies) {
setTrafficPolicies(trafficPolicies);
return this;
}
/**
*
* A flag that indicates whether there are more traffic policies to be
* listed. If the response was truncated, you can get the next group of
* maxitems
traffic policies by calling
* ListTrafficPolicyVersions
again and specifying the value of
* the NextMarker
element in the marker parameter.
*
*
* Valid Values: true
| false
*
*
* @param isTruncated
* A flag that indicates whether there are more traffic policies to
* be listed. If the response was truncated, you can get the next
* group of maxitems
traffic policies by calling
* ListTrafficPolicyVersions
again and specifying the
* value of the NextMarker
element in the marker
* parameter.
*
* Valid Values: true
| false
*/
public void setIsTruncated(Boolean isTruncated) {
this.isTruncated = isTruncated;
}
/**
*
* A flag that indicates whether there are more traffic policies to be
* listed. If the response was truncated, you can get the next group of
* maxitems
traffic policies by calling
* ListTrafficPolicyVersions
again and specifying the value of
* the NextMarker
element in the marker parameter.
*
*
* Valid Values: true
| false
*
*
* @return A flag that indicates whether there are more traffic policies to
* be listed. If the response was truncated, you can get the next
* group of maxitems
traffic policies by calling
* ListTrafficPolicyVersions
again and specifying the
* value of the NextMarker
element in the marker
* parameter.
*
* Valid Values: true
| false
*/
public Boolean getIsTruncated() {
return this.isTruncated;
}
/**
*
* A flag that indicates whether there are more traffic policies to be
* listed. If the response was truncated, you can get the next group of
* maxitems
traffic policies by calling
* ListTrafficPolicyVersions
again and specifying the value of
* the NextMarker
element in the marker parameter.
*
*
* Valid Values: true
| false
*
*
* @param isTruncated
* A flag that indicates whether there are more traffic policies to
* be listed. If the response was truncated, you can get the next
* group of maxitems
traffic policies by calling
* ListTrafficPolicyVersions
again and specifying the
* value of the NextMarker
element in the marker
* parameter.
*
* Valid Values: true
| false
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ListTrafficPolicyVersionsResult withIsTruncated(Boolean isTruncated) {
setIsTruncated(isTruncated);
return this;
}
/**
*
* A flag that indicates whether there are more traffic policies to be
* listed. If the response was truncated, you can get the next group of
* maxitems
traffic policies by calling
* ListTrafficPolicyVersions
again and specifying the value of
* the NextMarker
element in the marker parameter.
*
*
* Valid Values: true
| false
*
*
* @return A flag that indicates whether there are more traffic policies to
* be listed. If the response was truncated, you can get the next
* group of maxitems
traffic policies by calling
* ListTrafficPolicyVersions
again and specifying the
* value of the NextMarker
element in the marker
* parameter.
*
* Valid Values: true
| false
*/
public Boolean isTruncated() {
return this.isTruncated;
}
/**
*
* If IsTruncated
is true
, the value of
* TrafficPolicyVersionMarker
identifies the first traffic
* policy in the next group of MaxItems
traffic policies. Call
* ListTrafficPolicyVersions
again and specify the value of
* TrafficPolicyVersionMarker
in the
* TrafficPolicyVersionMarker
request parameter.
*
*
* This element is present only if IsTruncated
is
* true
.
*
*
* @param trafficPolicyVersionMarker
* If IsTruncated
is true
, the value of
* TrafficPolicyVersionMarker
identifies the first
* traffic policy in the next group of MaxItems
traffic
* policies. Call ListTrafficPolicyVersions
again and
* specify the value of TrafficPolicyVersionMarker
in
* the TrafficPolicyVersionMarker
request parameter.
*
* This element is present only if IsTruncated
is
* true
.
*/
public void setTrafficPolicyVersionMarker(String trafficPolicyVersionMarker) {
this.trafficPolicyVersionMarker = trafficPolicyVersionMarker;
}
/**
*
* If IsTruncated
is true
, the value of
* TrafficPolicyVersionMarker
identifies the first traffic
* policy in the next group of MaxItems
traffic policies. Call
* ListTrafficPolicyVersions
again and specify the value of
* TrafficPolicyVersionMarker
in the
* TrafficPolicyVersionMarker
request parameter.
*
*
* This element is present only if IsTruncated
is
* true
.
*
*
* @return If IsTruncated
is true
, the value of
* TrafficPolicyVersionMarker
identifies the first
* traffic policy in the next group of MaxItems
traffic
* policies. Call ListTrafficPolicyVersions
again and
* specify the value of TrafficPolicyVersionMarker
in
* the TrafficPolicyVersionMarker
request
* parameter.
*
* This element is present only if IsTruncated
is
* true
.
*/
public String getTrafficPolicyVersionMarker() {
return this.trafficPolicyVersionMarker;
}
/**
*
* If IsTruncated
is true
, the value of
* TrafficPolicyVersionMarker
identifies the first traffic
* policy in the next group of MaxItems
traffic policies. Call
* ListTrafficPolicyVersions
again and specify the value of
* TrafficPolicyVersionMarker
in the
* TrafficPolicyVersionMarker
request parameter.
*
*
* This element is present only if IsTruncated
is
* true
.
*
*
* @param trafficPolicyVersionMarker
* If IsTruncated
is true
, the value of
* TrafficPolicyVersionMarker
identifies the first
* traffic policy in the next group of MaxItems
traffic
* policies. Call ListTrafficPolicyVersions
again and
* specify the value of TrafficPolicyVersionMarker
in
* the TrafficPolicyVersionMarker
request parameter.
*
* This element is present only if IsTruncated
is
* true
.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ListTrafficPolicyVersionsResult withTrafficPolicyVersionMarker(
String trafficPolicyVersionMarker) {
setTrafficPolicyVersionMarker(trafficPolicyVersionMarker);
return this;
}
/**
*
* The value that you specified for the maxitems
parameter in
* the call to ListTrafficPolicyVersions
that produced the
* current response.
*
*
* @param maxItems
* The value that you specified for the maxitems
* parameter in the call to ListTrafficPolicyVersions
* that produced the current response.
*/
public void setMaxItems(String maxItems) {
this.maxItems = maxItems;
}
/**
*
* The value that you specified for the maxitems
parameter in
* the call to ListTrafficPolicyVersions
that produced the
* current response.
*
*
* @return The value that you specified for the maxitems
* parameter in the call to ListTrafficPolicyVersions
* that produced the current response.
*/
public String getMaxItems() {
return this.maxItems;
}
/**
*
* The value that you specified for the maxitems
parameter in
* the call to ListTrafficPolicyVersions
that produced the
* current response.
*
*
* @param maxItems
* The value that you specified for the maxitems
* parameter in the call to ListTrafficPolicyVersions
* that produced the current response.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ListTrafficPolicyVersionsResult withMaxItems(String maxItems) {
setMaxItems(maxItems);
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 (getTrafficPolicies() != null)
sb.append("TrafficPolicies: " + getTrafficPolicies() + ",");
if (getIsTruncated() != null)
sb.append("IsTruncated: " + getIsTruncated() + ",");
if (getTrafficPolicyVersionMarker() != null)
sb.append("TrafficPolicyVersionMarker: "
+ getTrafficPolicyVersionMarker() + ",");
if (getMaxItems() != null)
sb.append("MaxItems: " + getMaxItems());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListTrafficPolicyVersionsResult == false)
return false;
ListTrafficPolicyVersionsResult other = (ListTrafficPolicyVersionsResult) obj;
if (other.getTrafficPolicies() == null
^ this.getTrafficPolicies() == null)
return false;
if (other.getTrafficPolicies() != null
&& other.getTrafficPolicies().equals(this.getTrafficPolicies()) == false)
return false;
if (other.getIsTruncated() == null ^ this.getIsTruncated() == null)
return false;
if (other.getIsTruncated() != null
&& other.getIsTruncated().equals(this.getIsTruncated()) == false)
return false;
if (other.getTrafficPolicyVersionMarker() == null
^ this.getTrafficPolicyVersionMarker() == null)
return false;
if (other.getTrafficPolicyVersionMarker() != null
&& other.getTrafficPolicyVersionMarker().equals(
this.getTrafficPolicyVersionMarker()) == false)
return false;
if (other.getMaxItems() == null ^ this.getMaxItems() == null)
return false;
if (other.getMaxItems() != null
&& other.getMaxItems().equals(this.getMaxItems()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime
* hashCode
+ ((getTrafficPolicies() == null) ? 0 : getTrafficPolicies()
.hashCode());
hashCode = prime
* hashCode
+ ((getIsTruncated() == null) ? 0 : getIsTruncated().hashCode());
hashCode = prime
* hashCode
+ ((getTrafficPolicyVersionMarker() == null) ? 0
: getTrafficPolicyVersionMarker().hashCode());
hashCode = prime * hashCode
+ ((getMaxItems() == null) ? 0 : getMaxItems().hashCode());
return hashCode;
}
@Override
public ListTrafficPolicyVersionsResult clone() {
try {
return (ListTrafficPolicyVersionsResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(
"Got a CloneNotSupportedException from Object.clone() "
+ "even though we're Cloneable!", e);
}
}
}