com.amazonaws.services.workspaces.model.DescribeWorkspacesRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-workspaces 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.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 DescribeWorkspacesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The identifiers of the WorkSpaces. You cannot combine this parameter with any other filter.
*
*
* Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not immediately
* available. If you immediately call DescribeWorkspaces with this identifier, no information is returned.
*
*/
private com.amazonaws.internal.SdkInternalList workspaceIds;
/**
*
* The identifier of the directory. In addition, you can optionally specify a specific directory user (see
* UserName
). You cannot combine this parameter with any other filter.
*
*/
private String directoryId;
/**
*
* The name of the directory user. You must specify this parameter with DirectoryId
.
*
*/
private String userName;
/**
*
* The identifier of the bundle. All WorkSpaces that are created from this bundle are retrieved. You cannot combine
* this parameter with any other filter.
*
*/
private String bundleId;
/**
*
* The maximum number of items to return.
*
*/
private Integer limit;
/**
*
* 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 name of the user-decoupled WorkSpace.
*
*/
private String workspaceName;
/**
*
* The identifiers of the WorkSpaces. You cannot combine this parameter with any other filter.
*
*
* Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not immediately
* available. If you immediately call DescribeWorkspaces with this identifier, no information is returned.
*
*
* @return The identifiers of the WorkSpaces. You cannot combine this parameter with any other filter.
*
* Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not
* immediately available. If you immediately call DescribeWorkspaces with this identifier, no
* information is returned.
*/
public java.util.List getWorkspaceIds() {
if (workspaceIds == null) {
workspaceIds = new com.amazonaws.internal.SdkInternalList();
}
return workspaceIds;
}
/**
*
* The identifiers of the WorkSpaces. You cannot combine this parameter with any other filter.
*
*
* Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not immediately
* available. If you immediately call DescribeWorkspaces with this identifier, no information is returned.
*
*
* @param workspaceIds
* The identifiers of the WorkSpaces. You cannot combine this parameter with any other filter.
*
* Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not
* immediately available. If you immediately call DescribeWorkspaces with this identifier, no
* information is returned.
*/
public void setWorkspaceIds(java.util.Collection workspaceIds) {
if (workspaceIds == null) {
this.workspaceIds = null;
return;
}
this.workspaceIds = new com.amazonaws.internal.SdkInternalList(workspaceIds);
}
/**
*
* The identifiers of the WorkSpaces. You cannot combine this parameter with any other filter.
*
*
* Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not immediately
* available. If you immediately call DescribeWorkspaces with this identifier, no information is returned.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setWorkspaceIds(java.util.Collection)} or {@link #withWorkspaceIds(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param workspaceIds
* The identifiers of the WorkSpaces. You cannot combine this parameter with any other filter.
*
* Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not
* immediately available. If you immediately call DescribeWorkspaces with this identifier, no
* information is returned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWorkspacesRequest withWorkspaceIds(String... workspaceIds) {
if (this.workspaceIds == null) {
setWorkspaceIds(new com.amazonaws.internal.SdkInternalList(workspaceIds.length));
}
for (String ele : workspaceIds) {
this.workspaceIds.add(ele);
}
return this;
}
/**
*
* The identifiers of the WorkSpaces. You cannot combine this parameter with any other filter.
*
*
* Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not immediately
* available. If you immediately call DescribeWorkspaces with this identifier, no information is returned.
*
*
* @param workspaceIds
* The identifiers of the WorkSpaces. You cannot combine this parameter with any other filter.
*
* Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not
* immediately available. If you immediately call DescribeWorkspaces with this identifier, no
* information is returned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWorkspacesRequest withWorkspaceIds(java.util.Collection workspaceIds) {
setWorkspaceIds(workspaceIds);
return this;
}
/**
*
* The identifier of the directory. In addition, you can optionally specify a specific directory user (see
* UserName
). You cannot combine this parameter with any other filter.
*
*
* @param directoryId
* The identifier of the directory. In addition, you can optionally specify a specific directory user (see
* UserName
). You cannot combine this parameter with any other filter.
*/
public void setDirectoryId(String directoryId) {
this.directoryId = directoryId;
}
/**
*
* The identifier of the directory. In addition, you can optionally specify a specific directory user (see
* UserName
). You cannot combine this parameter with any other filter.
*
*
* @return The identifier of the directory. In addition, you can optionally specify a specific directory user (see
* UserName
). You cannot combine this parameter with any other filter.
*/
public String getDirectoryId() {
return this.directoryId;
}
/**
*
* The identifier of the directory. In addition, you can optionally specify a specific directory user (see
* UserName
). You cannot combine this parameter with any other filter.
*
*
* @param directoryId
* The identifier of the directory. In addition, you can optionally specify a specific directory user (see
* UserName
). You cannot combine this parameter with any other filter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWorkspacesRequest withDirectoryId(String directoryId) {
setDirectoryId(directoryId);
return this;
}
/**
*
* The name of the directory user. You must specify this parameter with DirectoryId
.
*
*
* @param userName
* The name of the directory user. You must specify this parameter with DirectoryId
.
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
*
* The name of the directory user. You must specify this parameter with DirectoryId
.
*
*
* @return The name of the directory user. You must specify this parameter with DirectoryId
.
*/
public String getUserName() {
return this.userName;
}
/**
*
* The name of the directory user. You must specify this parameter with DirectoryId
.
*
*
* @param userName
* The name of the directory user. You must specify this parameter with DirectoryId
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWorkspacesRequest withUserName(String userName) {
setUserName(userName);
return this;
}
/**
*
* The identifier of the bundle. All WorkSpaces that are created from this bundle are retrieved. You cannot combine
* this parameter with any other filter.
*
*
* @param bundleId
* The identifier of the bundle. All WorkSpaces that are created from this bundle are retrieved. You cannot
* combine this parameter with any other filter.
*/
public void setBundleId(String bundleId) {
this.bundleId = bundleId;
}
/**
*
* The identifier of the bundle. All WorkSpaces that are created from this bundle are retrieved. You cannot combine
* this parameter with any other filter.
*
*
* @return The identifier of the bundle. All WorkSpaces that are created from this bundle are retrieved. You cannot
* combine this parameter with any other filter.
*/
public String getBundleId() {
return this.bundleId;
}
/**
*
* The identifier of the bundle. All WorkSpaces that are created from this bundle are retrieved. You cannot combine
* this parameter with any other filter.
*
*
* @param bundleId
* The identifier of the bundle. All WorkSpaces that are created from this bundle are retrieved. You cannot
* combine this parameter with any other filter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWorkspacesRequest withBundleId(String bundleId) {
setBundleId(bundleId);
return this;
}
/**
*
* The maximum number of items to return.
*
*
* @param limit
* The maximum number of items to return.
*/
public void setLimit(Integer limit) {
this.limit = limit;
}
/**
*
* The maximum number of items to return.
*
*
* @return The maximum number of items to return.
*/
public Integer getLimit() {
return this.limit;
}
/**
*
* The maximum number of items to return.
*
*
* @param limit
* The maximum number of items to return.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWorkspacesRequest withLimit(Integer limit) {
setLimit(limit);
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 DescribeWorkspacesRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* The name of the user-decoupled WorkSpace.
*
*
* @param workspaceName
* The name of the user-decoupled WorkSpace.
*/
public void setWorkspaceName(String workspaceName) {
this.workspaceName = workspaceName;
}
/**
*
* The name of the user-decoupled WorkSpace.
*
*
* @return The name of the user-decoupled WorkSpace.
*/
public String getWorkspaceName() {
return this.workspaceName;
}
/**
*
* The name of the user-decoupled WorkSpace.
*
*
* @param workspaceName
* The name of the user-decoupled WorkSpace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWorkspacesRequest withWorkspaceName(String workspaceName) {
setWorkspaceName(workspaceName);
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 (getWorkspaceIds() != null)
sb.append("WorkspaceIds: ").append(getWorkspaceIds()).append(",");
if (getDirectoryId() != null)
sb.append("DirectoryId: ").append(getDirectoryId()).append(",");
if (getUserName() != null)
sb.append("UserName: ").append(getUserName()).append(",");
if (getBundleId() != null)
sb.append("BundleId: ").append(getBundleId()).append(",");
if (getLimit() != null)
sb.append("Limit: ").append(getLimit()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getWorkspaceName() != null)
sb.append("WorkspaceName: ").append(getWorkspaceName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeWorkspacesRequest == false)
return false;
DescribeWorkspacesRequest other = (DescribeWorkspacesRequest) obj;
if (other.getWorkspaceIds() == null ^ this.getWorkspaceIds() == null)
return false;
if (other.getWorkspaceIds() != null && other.getWorkspaceIds().equals(this.getWorkspaceIds()) == false)
return false;
if (other.getDirectoryId() == null ^ this.getDirectoryId() == null)
return false;
if (other.getDirectoryId() != null && other.getDirectoryId().equals(this.getDirectoryId()) == false)
return false;
if (other.getUserName() == null ^ this.getUserName() == null)
return false;
if (other.getUserName() != null && other.getUserName().equals(this.getUserName()) == false)
return false;
if (other.getBundleId() == null ^ this.getBundleId() == null)
return false;
if (other.getBundleId() != null && other.getBundleId().equals(this.getBundleId()) == false)
return false;
if (other.getLimit() == null ^ this.getLimit() == null)
return false;
if (other.getLimit() != null && other.getLimit().equals(this.getLimit()) == 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.getWorkspaceName() == null ^ this.getWorkspaceName() == null)
return false;
if (other.getWorkspaceName() != null && other.getWorkspaceName().equals(this.getWorkspaceName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getWorkspaceIds() == null) ? 0 : getWorkspaceIds().hashCode());
hashCode = prime * hashCode + ((getDirectoryId() == null) ? 0 : getDirectoryId().hashCode());
hashCode = prime * hashCode + ((getUserName() == null) ? 0 : getUserName().hashCode());
hashCode = prime * hashCode + ((getBundleId() == null) ? 0 : getBundleId().hashCode());
hashCode = prime * hashCode + ((getLimit() == null) ? 0 : getLimit().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getWorkspaceName() == null) ? 0 : getWorkspaceName().hashCode());
return hashCode;
}
@Override
public DescribeWorkspacesRequest clone() {
return (DescribeWorkspacesRequest) super.clone();
}
}