com.amazonaws.services.certificatemanager.model.ListCertificatesResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-acm 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.certificatemanager.model;
import java.io.Serializable;
/**
*
*/
public class ListCertificatesResult implements Serializable, Cloneable {
/**
*
* When the list is truncated, this value is present and contains the value
* to use for the NextToken
parameter in a subsequent
* pagination request.
*
*/
private String nextToken;
/**
*
* A list of ACM Certificates.
*
*/
private java.util.List certificateSummaryList;
/**
*
* When the list is truncated, this value is present and contains the value
* to use for the NextToken
parameter in a subsequent
* pagination request.
*
*
* @param nextToken
* When the list is truncated, this value is present and contains the
* value to use for the NextToken
parameter in a
* subsequent pagination request.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* When the list is truncated, this value is present and contains the value
* to use for the NextToken
parameter in a subsequent
* pagination request.
*
*
* @return When the list is truncated, this value is present and contains
* the value to use for the NextToken
parameter in a
* subsequent pagination request.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* When the list is truncated, this value is present and contains the value
* to use for the NextToken
parameter in a subsequent
* pagination request.
*
*
* @param nextToken
* When the list is truncated, this value is present and contains the
* value to use for the NextToken
parameter in a
* subsequent pagination request.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ListCertificatesResult withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* A list of ACM Certificates.
*
*
* @return A list of ACM Certificates.
*/
public java.util.List getCertificateSummaryList() {
return certificateSummaryList;
}
/**
*
* A list of ACM Certificates.
*
*
* @param certificateSummaryList
* A list of ACM Certificates.
*/
public void setCertificateSummaryList(
java.util.Collection certificateSummaryList) {
if (certificateSummaryList == null) {
this.certificateSummaryList = null;
return;
}
this.certificateSummaryList = new java.util.ArrayList(
certificateSummaryList);
}
/**
*
* A list of ACM Certificates.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setCertificateSummaryList(java.util.Collection)} or
* {@link #withCertificateSummaryList(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param certificateSummaryList
* A list of ACM Certificates.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ListCertificatesResult withCertificateSummaryList(
CertificateSummary... certificateSummaryList) {
if (this.certificateSummaryList == null) {
setCertificateSummaryList(new java.util.ArrayList(
certificateSummaryList.length));
}
for (CertificateSummary ele : certificateSummaryList) {
this.certificateSummaryList.add(ele);
}
return this;
}
/**
*
* A list of ACM Certificates.
*
*
* @param certificateSummaryList
* A list of ACM Certificates.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ListCertificatesResult withCertificateSummaryList(
java.util.Collection certificateSummaryList) {
setCertificateSummaryList(certificateSummaryList);
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 (getNextToken() != null)
sb.append("NextToken: " + getNextToken() + ",");
if (getCertificateSummaryList() != null)
sb.append("CertificateSummaryList: " + getCertificateSummaryList());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListCertificatesResult == false)
return false;
ListCertificatesResult other = (ListCertificatesResult) obj;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null
&& other.getNextToken().equals(this.getNextToken()) == false)
return false;
if (other.getCertificateSummaryList() == null
^ this.getCertificateSummaryList() == null)
return false;
if (other.getCertificateSummaryList() != null
&& other.getCertificateSummaryList().equals(
this.getCertificateSummaryList()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime
* hashCode
+ ((getCertificateSummaryList() == null) ? 0
: getCertificateSummaryList().hashCode());
return hashCode;
}
@Override
public ListCertificatesResult clone() {
try {
return (ListCertificatesResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(
"Got a CloneNotSupportedException from Object.clone() "
+ "even though we're Cloneable!", e);
}
}
}