
com.amazonaws.services.eks.model.ListClustersRequest Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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.eks.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListClustersRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The maximum number of results, returned in paginated output. You receive maxResults
in a single
* page, along with a nextToken
response element. You can see the remaining results of the initial
* request by sending another request with the returned nextToken
value. This value can be between 1
* and 100. If you don't use this parameter, 100 results and a nextToken
value, if applicable, are
* returned.
*
*/
private Integer maxResults;
/**
*
* The nextToken
value returned from a previous paginated request, where maxResults
was
* used and the results exceeded the value of that parameter. Pagination continues from the end of the previous
* results that returned the nextToken
value. This value is null when there are no more results to
* return.
*
*
*
* This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and
* not for other programmatic purposes.
*
*
*/
private String nextToken;
/**
*
* Indicates whether external clusters are included in the returned list. Use 'all
' to return https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.htmlconnected clusters, or blank to return
* only Amazon EKS clusters. 'all
' must be in lowercase otherwise an error occurs.
*
*/
private java.util.List include;
/**
*
* The maximum number of results, returned in paginated output. You receive maxResults
in a single
* page, along with a nextToken
response element. You can see the remaining results of the initial
* request by sending another request with the returned nextToken
value. This value can be between 1
* and 100. If you don't use this parameter, 100 results and a nextToken
value, if applicable, are
* returned.
*
*
* @param maxResults
* The maximum number of results, returned in paginated output. You receive maxResults
in a
* single page, along with a nextToken
response element. You can see the remaining results of
* the initial request by sending another request with the returned nextToken
value. This value
* can be between 1 and 100. If you don't use this parameter, 100 results and a nextToken
value,
* if applicable, are returned.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* The maximum number of results, returned in paginated output. You receive maxResults
in a single
* page, along with a nextToken
response element. You can see the remaining results of the initial
* request by sending another request with the returned nextToken
value. This value can be between 1
* and 100. If you don't use this parameter, 100 results and a nextToken
value, if applicable, are
* returned.
*
*
* @return The maximum number of results, returned in paginated output. You receive maxResults
in a
* single page, along with a nextToken
response element. You can see the remaining results of
* the initial request by sending another request with the returned nextToken
value. This value
* can be between 1 and 100. If you don't use this parameter, 100 results and a nextToken
* value, if applicable, are returned.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* The maximum number of results, returned in paginated output. You receive maxResults
in a single
* page, along with a nextToken
response element. You can see the remaining results of the initial
* request by sending another request with the returned nextToken
value. This value can be between 1
* and 100. If you don't use this parameter, 100 results and a nextToken
value, if applicable, are
* returned.
*
*
* @param maxResults
* The maximum number of results, returned in paginated output. You receive maxResults
in a
* single page, along with a nextToken
response element. You can see the remaining results of
* the initial request by sending another request with the returned nextToken
value. This value
* can be between 1 and 100. If you don't use this parameter, 100 results and a nextToken
value,
* if applicable, are returned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListClustersRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
*
* The nextToken
value returned from a previous paginated request, where maxResults
was
* used and the results exceeded the value of that parameter. Pagination continues from the end of the previous
* results that returned the nextToken
value. This value is null when there are no more results to
* return.
*
*
*
* This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and
* not for other programmatic purposes.
*
*
*
* @param nextToken
* The nextToken
value returned from a previous paginated request, where maxResults
* was used and the results exceeded the value of that parameter. Pagination continues from the end of the
* previous results that returned the nextToken
value. This value is null when there are no more
* results to return.
*
* This token should be treated as an opaque identifier that is used only to retrieve the next items in a
* list and not for other programmatic purposes.
*
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* The nextToken
value returned from a previous paginated request, where maxResults
was
* used and the results exceeded the value of that parameter. Pagination continues from the end of the previous
* results that returned the nextToken
value. This value is null when there are no more results to
* return.
*
*
*
* This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and
* not for other programmatic purposes.
*
*
*
* @return The nextToken
value returned from a previous paginated request, where
* maxResults
was used and the results exceeded the value of that parameter. Pagination
* continues from the end of the previous results that returned the nextToken
value. This value
* is null when there are no more results to return.
*
* This token should be treated as an opaque identifier that is used only to retrieve the next items in a
* list and not for other programmatic purposes.
*
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* The nextToken
value returned from a previous paginated request, where maxResults
was
* used and the results exceeded the value of that parameter. Pagination continues from the end of the previous
* results that returned the nextToken
value. This value is null when there are no more results to
* return.
*
*
*
* This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and
* not for other programmatic purposes.
*
*
*
* @param nextToken
* The nextToken
value returned from a previous paginated request, where maxResults
* was used and the results exceeded the value of that parameter. Pagination continues from the end of the
* previous results that returned the nextToken
value. This value is null when there are no more
* results to return.
*
* This token should be treated as an opaque identifier that is used only to retrieve the next items in a
* list and not for other programmatic purposes.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListClustersRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* Indicates whether external clusters are included in the returned list. Use 'all
' to return https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.htmlconnected clusters, or blank to return
* only Amazon EKS clusters. 'all
' must be in lowercase otherwise an error occurs.
*
*
* @return Indicates whether external clusters are included in the returned list. Use 'all
' to return
* https://docs.aws.amazon.com/
* eks/latest/userguide/eks-connector.htmlconnected clusters, or blank to return only Amazon EKS
* clusters. 'all
' must be in lowercase otherwise an error occurs.
*/
public java.util.List getInclude() {
return include;
}
/**
*
* Indicates whether external clusters are included in the returned list. Use 'all
' to return https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.htmlconnected clusters, or blank to return
* only Amazon EKS clusters. 'all
' must be in lowercase otherwise an error occurs.
*
*
* @param include
* Indicates whether external clusters are included in the returned list. Use 'all
' to return https://docs.aws.amazon.com/eks/
* latest/userguide/eks-connector.htmlconnected clusters, or blank to return only Amazon EKS clusters. '
* all
' must be in lowercase otherwise an error occurs.
*/
public void setInclude(java.util.Collection include) {
if (include == null) {
this.include = null;
return;
}
this.include = new java.util.ArrayList(include);
}
/**
*
* Indicates whether external clusters are included in the returned list. Use 'all
' to return https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.htmlconnected clusters, or blank to return
* only Amazon EKS clusters. 'all
' must be in lowercase otherwise an error occurs.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInclude(java.util.Collection)} or {@link #withInclude(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param include
* Indicates whether external clusters are included in the returned list. Use 'all
' to return https://docs.aws.amazon.com/eks/
* latest/userguide/eks-connector.htmlconnected clusters, or blank to return only Amazon EKS clusters. '
* all
' must be in lowercase otherwise an error occurs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListClustersRequest withInclude(String... include) {
if (this.include == null) {
setInclude(new java.util.ArrayList(include.length));
}
for (String ele : include) {
this.include.add(ele);
}
return this;
}
/**
*
* Indicates whether external clusters are included in the returned list. Use 'all
' to return https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.htmlconnected clusters, or blank to return
* only Amazon EKS clusters. 'all
' must be in lowercase otherwise an error occurs.
*
*
* @param include
* Indicates whether external clusters are included in the returned list. Use 'all
' to return https://docs.aws.amazon.com/eks/
* latest/userguide/eks-connector.htmlconnected clusters, or blank to return only Amazon EKS clusters. '
* all
' must be in lowercase otherwise an error occurs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListClustersRequest withInclude(java.util.Collection include) {
setInclude(include);
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 (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getInclude() != null)
sb.append("Include: ").append(getInclude());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListClustersRequest == false)
return false;
ListClustersRequest other = (ListClustersRequest) obj;
if (other.getMaxResults() == null ^ this.getMaxResults() == null)
return false;
if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
if (other.getInclude() == null ^ this.getInclude() == null)
return false;
if (other.getInclude() != null && other.getInclude().equals(this.getInclude()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getInclude() == null) ? 0 : getInclude().hashCode());
return hashCode;
}
@Override
public ListClustersRequest clone() {
return (ListClustersRequest) super.clone();
}
}