com.amazonaws.services.workspaces.model.DescribeWorkspaceImagesRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-workspaces Show documentation
/*
* Copyright 2017-2022 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.workspaces.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 DescribeWorkspaceImagesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The identifier of the image.
*
*/
private com.amazonaws.internal.SdkInternalList imageIds;
/**
*
* The type (owned or shared) of the image.
*
*/
private String imageType;
/**
*
* If you received a NextToken
from a previous call that was paginated, provide this token to receive
* the next set of results.
*
*/
private String nextToken;
/**
*
* The maximum number of items to return.
*
*/
private Integer maxResults;
/**
*
* The identifier of the image.
*
*
* @return The identifier of the image.
*/
public java.util.List getImageIds() {
if (imageIds == null) {
imageIds = new com.amazonaws.internal.SdkInternalList();
}
return imageIds;
}
/**
*
* The identifier of the image.
*
*
* @param imageIds
* The identifier of the image.
*/
public void setImageIds(java.util.Collection imageIds) {
if (imageIds == null) {
this.imageIds = null;
return;
}
this.imageIds = new com.amazonaws.internal.SdkInternalList(imageIds);
}
/**
*
* The identifier of the image.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setImageIds(java.util.Collection)} or {@link #withImageIds(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param imageIds
* The identifier of the image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWorkspaceImagesRequest withImageIds(String... imageIds) {
if (this.imageIds == null) {
setImageIds(new com.amazonaws.internal.SdkInternalList(imageIds.length));
}
for (String ele : imageIds) {
this.imageIds.add(ele);
}
return this;
}
/**
*
* The identifier of the image.
*
*
* @param imageIds
* The identifier of the image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWorkspaceImagesRequest withImageIds(java.util.Collection imageIds) {
setImageIds(imageIds);
return this;
}
/**
*
* The type (owned or shared) of the image.
*
*
* @param imageType
* The type (owned or shared) of the image.
* @see ImageType
*/
public void setImageType(String imageType) {
this.imageType = imageType;
}
/**
*
* The type (owned or shared) of the image.
*
*
* @return The type (owned or shared) of the image.
* @see ImageType
*/
public String getImageType() {
return this.imageType;
}
/**
*
* The type (owned or shared) of the image.
*
*
* @param imageType
* The type (owned or shared) of the image.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ImageType
*/
public DescribeWorkspaceImagesRequest withImageType(String imageType) {
setImageType(imageType);
return this;
}
/**
*
* The type (owned or shared) of the image.
*
*
* @param imageType
* The type (owned or shared) of the image.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ImageType
*/
public DescribeWorkspaceImagesRequest withImageType(ImageType imageType) {
this.imageType = imageType.toString();
return this;
}
/**
*
* If you received a NextToken
from a previous call that was paginated, provide this token to receive
* the next set of results.
*
*
* @param nextToken
* If you received a NextToken
from a previous call that was paginated, provide this token to
* receive the next set of results.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* If you received a NextToken
from a previous call that was paginated, provide this token to receive
* the next set of results.
*
*
* @return If you received a NextToken
from a previous call that was paginated, provide this token to
* receive the next set of results.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* If you received a NextToken
from a previous call that was paginated, provide this token to receive
* the next set of results.
*
*
* @param nextToken
* If you received a NextToken
from a previous call that was paginated, provide this token to
* receive the next set of results.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWorkspaceImagesRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* The maximum number of items to return.
*
*
* @param maxResults
* The maximum number of items to return.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* The maximum number of items to return.
*
*
* @return The maximum number of items to return.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* The maximum number of items to return.
*
*
* @param maxResults
* The maximum number of items to return.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWorkspaceImagesRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
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 (getImageIds() != null)
sb.append("ImageIds: ").append(getImageIds()).append(",");
if (getImageType() != null)
sb.append("ImageType: ").append(getImageType()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeWorkspaceImagesRequest == false)
return false;
DescribeWorkspaceImagesRequest other = (DescribeWorkspaceImagesRequest) obj;
if (other.getImageIds() == null ^ this.getImageIds() == null)
return false;
if (other.getImageIds() != null && other.getImageIds().equals(this.getImageIds()) == false)
return false;
if (other.getImageType() == null ^ this.getImageType() == null)
return false;
if (other.getImageType() != null && other.getImageType().equals(this.getImageType()) == 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.getMaxResults() == null ^ this.getMaxResults() == null)
return false;
if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getImageIds() == null) ? 0 : getImageIds().hashCode());
hashCode = prime * hashCode + ((getImageType() == null) ? 0 : getImageType().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
return hashCode;
}
@Override
public DescribeWorkspaceImagesRequest clone() {
return (DescribeWorkspaceImagesRequest) super.clone();
}
}