com.amazonaws.services.workspaces.model.WorkspaceRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-workspaces 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.workspaces.model;
import java.io.Serializable;
/**
*
* Contains information about a WorkSpace creation request.
*
*/
public class WorkspaceRequest implements Serializable, Cloneable {
/**
*
* The identifier of the AWS Directory Service directory to create the
* WorkSpace in. You can use the DescribeWorkspaceDirectories
* operation to obtain a list of the directories that are available.
*
*/
private String directoryId;
/**
*
* The username that the WorkSpace is assigned to. This username must exist
* in the AWS Directory Service directory specified by the
* DirectoryId
member.
*
*/
private String userName;
/**
*
* The identifier of the bundle to create the WorkSpace from. You can use
* the DescribeWorkspaceBundles operation to obtain a list of the
* bundles that are available.
*
*/
private String bundleId;
/**
*
* The KMS key used to encrypt data stored on your WorkSpace.
*
*/
private String volumeEncryptionKey;
/**
*
* Specifies whether the data stored on the user volume, or D: drive, is
* encrypted.
*
*/
private Boolean userVolumeEncryptionEnabled;
/**
*
* Specifies whether the data stored on the root volume, or C: drive, is
* encrypted.
*
*/
private Boolean rootVolumeEncryptionEnabled;
/**
*
* The identifier of the AWS Directory Service directory to create the
* WorkSpace in. You can use the DescribeWorkspaceDirectories
* operation to obtain a list of the directories that are available.
*
*
* @param directoryId
* The identifier of the AWS Directory Service directory to create
* the WorkSpace in. You can use the
* DescribeWorkspaceDirectories operation to obtain a list of
* the directories that are available.
*/
public void setDirectoryId(String directoryId) {
this.directoryId = directoryId;
}
/**
*
* The identifier of the AWS Directory Service directory to create the
* WorkSpace in. You can use the DescribeWorkspaceDirectories
* operation to obtain a list of the directories that are available.
*
*
* @return The identifier of the AWS Directory Service directory to create
* the WorkSpace in. You can use the
* DescribeWorkspaceDirectories operation to obtain a list of
* the directories that are available.
*/
public String getDirectoryId() {
return this.directoryId;
}
/**
*
* The identifier of the AWS Directory Service directory to create the
* WorkSpace in. You can use the DescribeWorkspaceDirectories
* operation to obtain a list of the directories that are available.
*
*
* @param directoryId
* The identifier of the AWS Directory Service directory to create
* the WorkSpace in. You can use the
* DescribeWorkspaceDirectories operation to obtain a list of
* the directories that are available.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public WorkspaceRequest withDirectoryId(String directoryId) {
setDirectoryId(directoryId);
return this;
}
/**
*
* The username that the WorkSpace is assigned to. This username must exist
* in the AWS Directory Service directory specified by the
* DirectoryId
member.
*
*
* @param userName
* The username that the WorkSpace is assigned to. This username must
* exist in the AWS Directory Service directory specified by the
* DirectoryId
member.
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
*
* The username that the WorkSpace is assigned to. This username must exist
* in the AWS Directory Service directory specified by the
* DirectoryId
member.
*
*
* @return The username that the WorkSpace is assigned to. This username
* must exist in the AWS Directory Service directory specified by
* the DirectoryId
member.
*/
public String getUserName() {
return this.userName;
}
/**
*
* The username that the WorkSpace is assigned to. This username must exist
* in the AWS Directory Service directory specified by the
* DirectoryId
member.
*
*
* @param userName
* The username that the WorkSpace is assigned to. This username must
* exist in the AWS Directory Service directory specified by the
* DirectoryId
member.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public WorkspaceRequest withUserName(String userName) {
setUserName(userName);
return this;
}
/**
*
* The identifier of the bundle to create the WorkSpace from. You can use
* the DescribeWorkspaceBundles operation to obtain a list of the
* bundles that are available.
*
*
* @param bundleId
* The identifier of the bundle to create the WorkSpace from. You can
* use the DescribeWorkspaceBundles operation to obtain a list
* of the bundles that are available.
*/
public void setBundleId(String bundleId) {
this.bundleId = bundleId;
}
/**
*
* The identifier of the bundle to create the WorkSpace from. You can use
* the DescribeWorkspaceBundles operation to obtain a list of the
* bundles that are available.
*
*
* @return The identifier of the bundle to create the WorkSpace from. You
* can use the DescribeWorkspaceBundles operation to obtain a
* list of the bundles that are available.
*/
public String getBundleId() {
return this.bundleId;
}
/**
*
* The identifier of the bundle to create the WorkSpace from. You can use
* the DescribeWorkspaceBundles operation to obtain a list of the
* bundles that are available.
*
*
* @param bundleId
* The identifier of the bundle to create the WorkSpace from. You can
* use the DescribeWorkspaceBundles operation to obtain a list
* of the bundles that are available.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public WorkspaceRequest withBundleId(String bundleId) {
setBundleId(bundleId);
return this;
}
/**
*
* The KMS key used to encrypt data stored on your WorkSpace.
*
*
* @param volumeEncryptionKey
* The KMS key used to encrypt data stored on your WorkSpace.
*/
public void setVolumeEncryptionKey(String volumeEncryptionKey) {
this.volumeEncryptionKey = volumeEncryptionKey;
}
/**
*
* The KMS key used to encrypt data stored on your WorkSpace.
*
*
* @return The KMS key used to encrypt data stored on your WorkSpace.
*/
public String getVolumeEncryptionKey() {
return this.volumeEncryptionKey;
}
/**
*
* The KMS key used to encrypt data stored on your WorkSpace.
*
*
* @param volumeEncryptionKey
* The KMS key used to encrypt data stored on your WorkSpace.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public WorkspaceRequest withVolumeEncryptionKey(String volumeEncryptionKey) {
setVolumeEncryptionKey(volumeEncryptionKey);
return this;
}
/**
*
* Specifies whether the data stored on the user volume, or D: drive, is
* encrypted.
*
*
* @param userVolumeEncryptionEnabled
* Specifies whether the data stored on the user volume, or D: drive,
* is encrypted.
*/
public void setUserVolumeEncryptionEnabled(
Boolean userVolumeEncryptionEnabled) {
this.userVolumeEncryptionEnabled = userVolumeEncryptionEnabled;
}
/**
*
* Specifies whether the data stored on the user volume, or D: drive, is
* encrypted.
*
*
* @return Specifies whether the data stored on the user volume, or D:
* drive, is encrypted.
*/
public Boolean getUserVolumeEncryptionEnabled() {
return this.userVolumeEncryptionEnabled;
}
/**
*
* Specifies whether the data stored on the user volume, or D: drive, is
* encrypted.
*
*
* @param userVolumeEncryptionEnabled
* Specifies whether the data stored on the user volume, or D: drive,
* is encrypted.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public WorkspaceRequest withUserVolumeEncryptionEnabled(
Boolean userVolumeEncryptionEnabled) {
setUserVolumeEncryptionEnabled(userVolumeEncryptionEnabled);
return this;
}
/**
*
* Specifies whether the data stored on the user volume, or D: drive, is
* encrypted.
*
*
* @return Specifies whether the data stored on the user volume, or D:
* drive, is encrypted.
*/
public Boolean isUserVolumeEncryptionEnabled() {
return this.userVolumeEncryptionEnabled;
}
/**
*
* Specifies whether the data stored on the root volume, or C: drive, is
* encrypted.
*
*
* @param rootVolumeEncryptionEnabled
* Specifies whether the data stored on the root volume, or C: drive,
* is encrypted.
*/
public void setRootVolumeEncryptionEnabled(
Boolean rootVolumeEncryptionEnabled) {
this.rootVolumeEncryptionEnabled = rootVolumeEncryptionEnabled;
}
/**
*
* Specifies whether the data stored on the root volume, or C: drive, is
* encrypted.
*
*
* @return Specifies whether the data stored on the root volume, or C:
* drive, is encrypted.
*/
public Boolean getRootVolumeEncryptionEnabled() {
return this.rootVolumeEncryptionEnabled;
}
/**
*
* Specifies whether the data stored on the root volume, or C: drive, is
* encrypted.
*
*
* @param rootVolumeEncryptionEnabled
* Specifies whether the data stored on the root volume, or C: drive,
* is encrypted.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public WorkspaceRequest withRootVolumeEncryptionEnabled(
Boolean rootVolumeEncryptionEnabled) {
setRootVolumeEncryptionEnabled(rootVolumeEncryptionEnabled);
return this;
}
/**
*
* Specifies whether the data stored on the root volume, or C: drive, is
* encrypted.
*
*
* @return Specifies whether the data stored on the root volume, or C:
* drive, is encrypted.
*/
public Boolean isRootVolumeEncryptionEnabled() {
return this.rootVolumeEncryptionEnabled;
}
/**
* 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 (getDirectoryId() != null)
sb.append("DirectoryId: " + getDirectoryId() + ",");
if (getUserName() != null)
sb.append("UserName: " + getUserName() + ",");
if (getBundleId() != null)
sb.append("BundleId: " + getBundleId() + ",");
if (getVolumeEncryptionKey() != null)
sb.append("VolumeEncryptionKey: " + getVolumeEncryptionKey() + ",");
if (getUserVolumeEncryptionEnabled() != null)
sb.append("UserVolumeEncryptionEnabled: "
+ getUserVolumeEncryptionEnabled() + ",");
if (getRootVolumeEncryptionEnabled() != null)
sb.append("RootVolumeEncryptionEnabled: "
+ getRootVolumeEncryptionEnabled());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof WorkspaceRequest == false)
return false;
WorkspaceRequest other = (WorkspaceRequest) obj;
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.getVolumeEncryptionKey() == null
^ this.getVolumeEncryptionKey() == null)
return false;
if (other.getVolumeEncryptionKey() != null
&& other.getVolumeEncryptionKey().equals(
this.getVolumeEncryptionKey()) == false)
return false;
if (other.getUserVolumeEncryptionEnabled() == null
^ this.getUserVolumeEncryptionEnabled() == null)
return false;
if (other.getUserVolumeEncryptionEnabled() != null
&& other.getUserVolumeEncryptionEnabled().equals(
this.getUserVolumeEncryptionEnabled()) == false)
return false;
if (other.getRootVolumeEncryptionEnabled() == null
^ this.getRootVolumeEncryptionEnabled() == null)
return false;
if (other.getRootVolumeEncryptionEnabled() != null
&& other.getRootVolumeEncryptionEnabled().equals(
this.getRootVolumeEncryptionEnabled()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
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
+ ((getVolumeEncryptionKey() == null) ? 0
: getVolumeEncryptionKey().hashCode());
hashCode = prime
* hashCode
+ ((getUserVolumeEncryptionEnabled() == null) ? 0
: getUserVolumeEncryptionEnabled().hashCode());
hashCode = prime
* hashCode
+ ((getRootVolumeEncryptionEnabled() == null) ? 0
: getRootVolumeEncryptionEnabled().hashCode());
return hashCode;
}
@Override
public WorkspaceRequest clone() {
try {
return (WorkspaceRequest) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(
"Got a CloneNotSupportedException from Object.clone() "
+ "even though we're Cloneable!", e);
}
}
}