
com.amazonaws.services.lightsail.model.GetCertificatesRequest Maven / Gradle / Ivy
/*
* Copyright 2018-2023 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.lightsail.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 GetCertificatesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The status of the certificates for which to return information.
*
*
* For example, specify ISSUED
to return only certificates with an ISSUED
status.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request
* is made, regardless of their current status.
*
*/
private java.util.List certificateStatuses;
/**
*
* Indicates whether to include detailed information about the certificates in the response.
*
*
* When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain names, and
* tags.
*
*/
private Boolean includeCertificateDetails;
/**
*
* The name for the certificate for which to return information.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request
* is made.
*
*/
private String certificateName;
/**
*
* The token to advance to the next page of results from your request.
*
*
* To get a page token, perform an initial GetCertificates
request. If your results are paginated, the
* response will return a next page token that you can specify as the page token in a subsequent request.
*
*/
private String pageToken;
/**
*
* The status of the certificates for which to return information.
*
*
* For example, specify ISSUED
to return only certificates with an ISSUED
status.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request
* is made, regardless of their current status.
*
*
* @return The status of the certificates for which to return information.
*
* For example, specify ISSUED
to return only certificates with an ISSUED
status.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the
* request is made, regardless of their current status.
* @see CertificateStatus
*/
public java.util.List getCertificateStatuses() {
return certificateStatuses;
}
/**
*
* The status of the certificates for which to return information.
*
*
* For example, specify ISSUED
to return only certificates with an ISSUED
status.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request
* is made, regardless of their current status.
*
*
* @param certificateStatuses
* The status of the certificates for which to return information.
*
* For example, specify ISSUED
to return only certificates with an ISSUED
status.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the
* request is made, regardless of their current status.
* @see CertificateStatus
*/
public void setCertificateStatuses(java.util.Collection certificateStatuses) {
if (certificateStatuses == null) {
this.certificateStatuses = null;
return;
}
this.certificateStatuses = new java.util.ArrayList(certificateStatuses);
}
/**
*
* The status of the certificates for which to return information.
*
*
* For example, specify ISSUED
to return only certificates with an ISSUED
status.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request
* is made, regardless of their current status.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCertificateStatuses(java.util.Collection)} or {@link #withCertificateStatuses(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param certificateStatuses
* The status of the certificates for which to return information.
*
* For example, specify ISSUED
to return only certificates with an ISSUED
status.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the
* request is made, regardless of their current status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CertificateStatus
*/
public GetCertificatesRequest withCertificateStatuses(String... certificateStatuses) {
if (this.certificateStatuses == null) {
setCertificateStatuses(new java.util.ArrayList(certificateStatuses.length));
}
for (String ele : certificateStatuses) {
this.certificateStatuses.add(ele);
}
return this;
}
/**
*
* The status of the certificates for which to return information.
*
*
* For example, specify ISSUED
to return only certificates with an ISSUED
status.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request
* is made, regardless of their current status.
*
*
* @param certificateStatuses
* The status of the certificates for which to return information.
*
* For example, specify ISSUED
to return only certificates with an ISSUED
status.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the
* request is made, regardless of their current status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CertificateStatus
*/
public GetCertificatesRequest withCertificateStatuses(java.util.Collection certificateStatuses) {
setCertificateStatuses(certificateStatuses);
return this;
}
/**
*
* The status of the certificates for which to return information.
*
*
* For example, specify ISSUED
to return only certificates with an ISSUED
status.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request
* is made, regardless of their current status.
*
*
* @param certificateStatuses
* The status of the certificates for which to return information.
*
* For example, specify ISSUED
to return only certificates with an ISSUED
status.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the
* request is made, regardless of their current status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CertificateStatus
*/
public GetCertificatesRequest withCertificateStatuses(CertificateStatus... certificateStatuses) {
java.util.ArrayList certificateStatusesCopy = new java.util.ArrayList(certificateStatuses.length);
for (CertificateStatus value : certificateStatuses) {
certificateStatusesCopy.add(value.toString());
}
if (getCertificateStatuses() == null) {
setCertificateStatuses(certificateStatusesCopy);
} else {
getCertificateStatuses().addAll(certificateStatusesCopy);
}
return this;
}
/**
*
* Indicates whether to include detailed information about the certificates in the response.
*
*
* When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain names, and
* tags.
*
*
* @param includeCertificateDetails
* Indicates whether to include detailed information about the certificates in the response.
*
* When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain
* names, and tags.
*/
public void setIncludeCertificateDetails(Boolean includeCertificateDetails) {
this.includeCertificateDetails = includeCertificateDetails;
}
/**
*
* Indicates whether to include detailed information about the certificates in the response.
*
*
* When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain names, and
* tags.
*
*
* @return Indicates whether to include detailed information about the certificates in the response.
*
* When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain
* names, and tags.
*/
public Boolean getIncludeCertificateDetails() {
return this.includeCertificateDetails;
}
/**
*
* Indicates whether to include detailed information about the certificates in the response.
*
*
* When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain names, and
* tags.
*
*
* @param includeCertificateDetails
* Indicates whether to include detailed information about the certificates in the response.
*
* When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain
* names, and tags.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetCertificatesRequest withIncludeCertificateDetails(Boolean includeCertificateDetails) {
setIncludeCertificateDetails(includeCertificateDetails);
return this;
}
/**
*
* Indicates whether to include detailed information about the certificates in the response.
*
*
* When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain names, and
* tags.
*
*
* @return Indicates whether to include detailed information about the certificates in the response.
*
* When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain
* names, and tags.
*/
public Boolean isIncludeCertificateDetails() {
return this.includeCertificateDetails;
}
/**
*
* The name for the certificate for which to return information.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request
* is made.
*
*
* @param certificateName
* The name for the certificate for which to return information.
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the
* request is made.
*/
public void setCertificateName(String certificateName) {
this.certificateName = certificateName;
}
/**
*
* The name for the certificate for which to return information.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request
* is made.
*
*
* @return The name for the certificate for which to return information.
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the
* request is made.
*/
public String getCertificateName() {
return this.certificateName;
}
/**
*
* The name for the certificate for which to return information.
*
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request
* is made.
*
*
* @param certificateName
* The name for the certificate for which to return information.
*
* When omitted, the response includes all of your certificates in the Amazon Web Services Region where the
* request is made.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetCertificatesRequest withCertificateName(String certificateName) {
setCertificateName(certificateName);
return this;
}
/**
*
* The token to advance to the next page of results from your request.
*
*
* To get a page token, perform an initial GetCertificates
request. If your results are paginated, the
* response will return a next page token that you can specify as the page token in a subsequent request.
*
*
* @param pageToken
* The token to advance to the next page of results from your request.
*
* To get a page token, perform an initial GetCertificates
request. If your results are
* paginated, the response will return a next page token that you can specify as the page token in a
* subsequent request.
*/
public void setPageToken(String pageToken) {
this.pageToken = pageToken;
}
/**
*
* The token to advance to the next page of results from your request.
*
*
* To get a page token, perform an initial GetCertificates
request. If your results are paginated, the
* response will return a next page token that you can specify as the page token in a subsequent request.
*
*
* @return The token to advance to the next page of results from your request.
*
* To get a page token, perform an initial GetCertificates
request. If your results are
* paginated, the response will return a next page token that you can specify as the page token in a
* subsequent request.
*/
public String getPageToken() {
return this.pageToken;
}
/**
*
* The token to advance to the next page of results from your request.
*
*
* To get a page token, perform an initial GetCertificates
request. If your results are paginated, the
* response will return a next page token that you can specify as the page token in a subsequent request.
*
*
* @param pageToken
* The token to advance to the next page of results from your request.
*
* To get a page token, perform an initial GetCertificates
request. If your results are
* paginated, the response will return a next page token that you can specify as the page token in a
* subsequent request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetCertificatesRequest withPageToken(String pageToken) {
setPageToken(pageToken);
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 (getCertificateStatuses() != null)
sb.append("CertificateStatuses: ").append(getCertificateStatuses()).append(",");
if (getIncludeCertificateDetails() != null)
sb.append("IncludeCertificateDetails: ").append(getIncludeCertificateDetails()).append(",");
if (getCertificateName() != null)
sb.append("CertificateName: ").append(getCertificateName()).append(",");
if (getPageToken() != null)
sb.append("PageToken: ").append(getPageToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetCertificatesRequest == false)
return false;
GetCertificatesRequest other = (GetCertificatesRequest) obj;
if (other.getCertificateStatuses() == null ^ this.getCertificateStatuses() == null)
return false;
if (other.getCertificateStatuses() != null && other.getCertificateStatuses().equals(this.getCertificateStatuses()) == false)
return false;
if (other.getIncludeCertificateDetails() == null ^ this.getIncludeCertificateDetails() == null)
return false;
if (other.getIncludeCertificateDetails() != null && other.getIncludeCertificateDetails().equals(this.getIncludeCertificateDetails()) == false)
return false;
if (other.getCertificateName() == null ^ this.getCertificateName() == null)
return false;
if (other.getCertificateName() != null && other.getCertificateName().equals(this.getCertificateName()) == false)
return false;
if (other.getPageToken() == null ^ this.getPageToken() == null)
return false;
if (other.getPageToken() != null && other.getPageToken().equals(this.getPageToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCertificateStatuses() == null) ? 0 : getCertificateStatuses().hashCode());
hashCode = prime * hashCode + ((getIncludeCertificateDetails() == null) ? 0 : getIncludeCertificateDetails().hashCode());
hashCode = prime * hashCode + ((getCertificateName() == null) ? 0 : getCertificateName().hashCode());
hashCode = prime * hashCode + ((getPageToken() == null) ? 0 : getPageToken().hashCode());
return hashCode;
}
@Override
public GetCertificatesRequest clone() {
return (GetCertificatesRequest) super.clone();
}
}