com.amazonaws.services.inspector.model.GetExclusionsPreviewResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-inspector Show documentation
/*
* 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.inspector.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetExclusionsPreviewResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* Specifies the status of the request to generate an exclusions preview.
*
*/
private String previewStatus;
/**
*
* Information about the exclusions included in the preview.
*
*/
private java.util.List exclusionPreviews;
/**
*
* When a response is generated, if there is more data to be listed, this parameters is present in the response and
* contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more
* data to be listed, this parameter is set to null.
*
*/
private String nextToken;
/**
*
* Specifies the status of the request to generate an exclusions preview.
*
*
* @param previewStatus
* Specifies the status of the request to generate an exclusions preview.
* @see PreviewStatus
*/
public void setPreviewStatus(String previewStatus) {
this.previewStatus = previewStatus;
}
/**
*
* Specifies the status of the request to generate an exclusions preview.
*
*
* @return Specifies the status of the request to generate an exclusions preview.
* @see PreviewStatus
*/
public String getPreviewStatus() {
return this.previewStatus;
}
/**
*
* Specifies the status of the request to generate an exclusions preview.
*
*
* @param previewStatus
* Specifies the status of the request to generate an exclusions preview.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PreviewStatus
*/
public GetExclusionsPreviewResult withPreviewStatus(String previewStatus) {
setPreviewStatus(previewStatus);
return this;
}
/**
*
* Specifies the status of the request to generate an exclusions preview.
*
*
* @param previewStatus
* Specifies the status of the request to generate an exclusions preview.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PreviewStatus
*/
public GetExclusionsPreviewResult withPreviewStatus(PreviewStatus previewStatus) {
this.previewStatus = previewStatus.toString();
return this;
}
/**
*
* Information about the exclusions included in the preview.
*
*
* @return Information about the exclusions included in the preview.
*/
public java.util.List getExclusionPreviews() {
return exclusionPreviews;
}
/**
*
* Information about the exclusions included in the preview.
*
*
* @param exclusionPreviews
* Information about the exclusions included in the preview.
*/
public void setExclusionPreviews(java.util.Collection exclusionPreviews) {
if (exclusionPreviews == null) {
this.exclusionPreviews = null;
return;
}
this.exclusionPreviews = new java.util.ArrayList(exclusionPreviews);
}
/**
*
* Information about the exclusions included in the preview.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setExclusionPreviews(java.util.Collection)} or {@link #withExclusionPreviews(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param exclusionPreviews
* Information about the exclusions included in the preview.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetExclusionsPreviewResult withExclusionPreviews(ExclusionPreview... exclusionPreviews) {
if (this.exclusionPreviews == null) {
setExclusionPreviews(new java.util.ArrayList(exclusionPreviews.length));
}
for (ExclusionPreview ele : exclusionPreviews) {
this.exclusionPreviews.add(ele);
}
return this;
}
/**
*
* Information about the exclusions included in the preview.
*
*
* @param exclusionPreviews
* Information about the exclusions included in the preview.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetExclusionsPreviewResult withExclusionPreviews(java.util.Collection exclusionPreviews) {
setExclusionPreviews(exclusionPreviews);
return this;
}
/**
*
* When a response is generated, if there is more data to be listed, this parameters is present in the response and
* contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more
* data to be listed, this parameter is set to null.
*
*
* @param nextToken
* When a response is generated, if there is more data to be listed, this parameters is present in the
* response and contains the value to use for the nextToken parameter in a subsequent pagination request. If
* there is no more data to be listed, this parameter is set to null.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* When a response is generated, if there is more data to be listed, this parameters is present in the response and
* contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more
* data to be listed, this parameter is set to null.
*
*
* @return When a response is generated, if there is more data to be listed, this parameters is present in the
* response and contains the value to use for the nextToken parameter in a subsequent pagination request. If
* there is no more data to be listed, this parameter is set to null.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* When a response is generated, if there is more data to be listed, this parameters is present in the response and
* contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more
* data to be listed, this parameter is set to null.
*
*
* @param nextToken
* When a response is generated, if there is more data to be listed, this parameters is present in the
* response and contains the value to use for the nextToken parameter in a subsequent pagination request. If
* there is no more data to be listed, this parameter is set to null.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetExclusionsPreviewResult withNextToken(String nextToken) {
setNextToken(nextToken);
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 (getPreviewStatus() != null)
sb.append("PreviewStatus: ").append(getPreviewStatus()).append(",");
if (getExclusionPreviews() != null)
sb.append("ExclusionPreviews: ").append(getExclusionPreviews()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetExclusionsPreviewResult == false)
return false;
GetExclusionsPreviewResult other = (GetExclusionsPreviewResult) obj;
if (other.getPreviewStatus() == null ^ this.getPreviewStatus() == null)
return false;
if (other.getPreviewStatus() != null && other.getPreviewStatus().equals(this.getPreviewStatus()) == false)
return false;
if (other.getExclusionPreviews() == null ^ this.getExclusionPreviews() == null)
return false;
if (other.getExclusionPreviews() != null && other.getExclusionPreviews().equals(this.getExclusionPreviews()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getPreviewStatus() == null) ? 0 : getPreviewStatus().hashCode());
hashCode = prime * hashCode + ((getExclusionPreviews() == null) ? 0 : getExclusionPreviews().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
return hashCode;
}
@Override
public GetExclusionsPreviewResult clone() {
try {
return (GetExclusionsPreviewResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}