All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.workspaces.model.WorkspaceRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon WorkSpaces module holds the client classes that are used for communicating with Amazon WorkSpaces Service

There is a newer version: 1.12.778
Show newest version
/*
 * 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes the information used to create a WorkSpace. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class WorkspaceRequest implements Serializable, Cloneable, StructuredPojo { /** *

* The identifier of the Directory Service directory for the WorkSpace. You can use * DescribeWorkspaceDirectories to list the available directories. *

*/ private String directoryId; /** *

* The user name of the user for the WorkSpace. This user name must exist in the Directory Service directory for the * WorkSpace. *

*

* The reserved keyword, [UNDEFINED], is used when creating user-decoupled WorkSpaces. *

*/ private String userName; /** *

* The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the available * bundles. *

*/ private String bundleId; /** *

* The ARN of the symmetric KMS key used to encrypt data stored on your WorkSpace. Amazon WorkSpaces does not * support asymmetric KMS keys. *

*/ private String volumeEncryptionKey; /** *

* Indicates whether the data stored on the user volume is encrypted. *

*/ private Boolean userVolumeEncryptionEnabled; /** *

* Indicates whether the data stored on the root volume is encrypted. *

*/ private Boolean rootVolumeEncryptionEnabled; /** *

* The WorkSpace properties. *

*/ private WorkspaceProperties workspaceProperties; /** *

* The tags for the WorkSpace. *

*/ private com.amazonaws.internal.SdkInternalList tags; /** *

* The name of the user-decoupled WorkSpace. *

*/ private String workspaceName; /** *

* The identifier of the Directory Service directory for the WorkSpace. You can use * DescribeWorkspaceDirectories to list the available directories. *

* * @param directoryId * The identifier of the Directory Service directory for the WorkSpace. You can use * DescribeWorkspaceDirectories to list the available directories. */ public void setDirectoryId(String directoryId) { this.directoryId = directoryId; } /** *

* The identifier of the Directory Service directory for the WorkSpace. You can use * DescribeWorkspaceDirectories to list the available directories. *

* * @return The identifier of the Directory Service directory for the WorkSpace. You can use * DescribeWorkspaceDirectories to list the available directories. */ public String getDirectoryId() { return this.directoryId; } /** *

* The identifier of the Directory Service directory for the WorkSpace. You can use * DescribeWorkspaceDirectories to list the available directories. *

* * @param directoryId * The identifier of the Directory Service directory for the WorkSpace. You can use * DescribeWorkspaceDirectories to list the available directories. * @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 user name of the user for the WorkSpace. This user name must exist in the Directory Service directory for the * WorkSpace. *

*

* The reserved keyword, [UNDEFINED], is used when creating user-decoupled WorkSpaces. *

* * @param userName * The user name of the user for the WorkSpace. This user name must exist in the Directory Service directory * for the WorkSpace.

*

* The reserved keyword, [UNDEFINED], is used when creating user-decoupled WorkSpaces. */ public void setUserName(String userName) { this.userName = userName; } /** *

* The user name of the user for the WorkSpace. This user name must exist in the Directory Service directory for the * WorkSpace. *

*

* The reserved keyword, [UNDEFINED], is used when creating user-decoupled WorkSpaces. *

* * @return The user name of the user for the WorkSpace. This user name must exist in the Directory Service directory * for the WorkSpace.

*

* The reserved keyword, [UNDEFINED], is used when creating user-decoupled WorkSpaces. */ public String getUserName() { return this.userName; } /** *

* The user name of the user for the WorkSpace. This user name must exist in the Directory Service directory for the * WorkSpace. *

*

* The reserved keyword, [UNDEFINED], is used when creating user-decoupled WorkSpaces. *

* * @param userName * The user name of the user for the WorkSpace. This user name must exist in the Directory Service directory * for the WorkSpace.

*

* The reserved keyword, [UNDEFINED], is used when creating user-decoupled WorkSpaces. * @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 for the WorkSpace. You can use DescribeWorkspaceBundles to list the available * bundles. *

* * @param bundleId * The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the * available bundles. */ public void setBundleId(String bundleId) { this.bundleId = bundleId; } /** *

* The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the available * bundles. *

* * @return The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the * available bundles. */ public String getBundleId() { return this.bundleId; } /** *

* The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the available * bundles. *

* * @param bundleId * The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the * available bundles. * @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 ARN of the symmetric KMS key used to encrypt data stored on your WorkSpace. Amazon WorkSpaces does not * support asymmetric KMS keys. *

* * @param volumeEncryptionKey * The ARN of the symmetric KMS key used to encrypt data stored on your WorkSpace. Amazon WorkSpaces does not * support asymmetric KMS keys. */ public void setVolumeEncryptionKey(String volumeEncryptionKey) { this.volumeEncryptionKey = volumeEncryptionKey; } /** *

* The ARN of the symmetric KMS key used to encrypt data stored on your WorkSpace. Amazon WorkSpaces does not * support asymmetric KMS keys. *

* * @return The ARN of the symmetric KMS key used to encrypt data stored on your WorkSpace. Amazon WorkSpaces does * not support asymmetric KMS keys. */ public String getVolumeEncryptionKey() { return this.volumeEncryptionKey; } /** *

* The ARN of the symmetric KMS key used to encrypt data stored on your WorkSpace. Amazon WorkSpaces does not * support asymmetric KMS keys. *

* * @param volumeEncryptionKey * The ARN of the symmetric KMS key used to encrypt data stored on your WorkSpace. Amazon WorkSpaces does not * support asymmetric KMS keys. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkspaceRequest withVolumeEncryptionKey(String volumeEncryptionKey) { setVolumeEncryptionKey(volumeEncryptionKey); return this; } /** *

* Indicates whether the data stored on the user volume is encrypted. *

* * @param userVolumeEncryptionEnabled * Indicates whether the data stored on the user volume is encrypted. */ public void setUserVolumeEncryptionEnabled(Boolean userVolumeEncryptionEnabled) { this.userVolumeEncryptionEnabled = userVolumeEncryptionEnabled; } /** *

* Indicates whether the data stored on the user volume is encrypted. *

* * @return Indicates whether the data stored on the user volume is encrypted. */ public Boolean getUserVolumeEncryptionEnabled() { return this.userVolumeEncryptionEnabled; } /** *

* Indicates whether the data stored on the user volume is encrypted. *

* * @param userVolumeEncryptionEnabled * Indicates whether the data stored on the user volume 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; } /** *

* Indicates whether the data stored on the user volume is encrypted. *

* * @return Indicates whether the data stored on the user volume is encrypted. */ public Boolean isUserVolumeEncryptionEnabled() { return this.userVolumeEncryptionEnabled; } /** *

* Indicates whether the data stored on the root volume is encrypted. *

* * @param rootVolumeEncryptionEnabled * Indicates whether the data stored on the root volume is encrypted. */ public void setRootVolumeEncryptionEnabled(Boolean rootVolumeEncryptionEnabled) { this.rootVolumeEncryptionEnabled = rootVolumeEncryptionEnabled; } /** *

* Indicates whether the data stored on the root volume is encrypted. *

* * @return Indicates whether the data stored on the root volume is encrypted. */ public Boolean getRootVolumeEncryptionEnabled() { return this.rootVolumeEncryptionEnabled; } /** *

* Indicates whether the data stored on the root volume is encrypted. *

* * @param rootVolumeEncryptionEnabled * Indicates whether the data stored on the root volume 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; } /** *

* Indicates whether the data stored on the root volume is encrypted. *

* * @return Indicates whether the data stored on the root volume is encrypted. */ public Boolean isRootVolumeEncryptionEnabled() { return this.rootVolumeEncryptionEnabled; } /** *

* The WorkSpace properties. *

* * @param workspaceProperties * The WorkSpace properties. */ public void setWorkspaceProperties(WorkspaceProperties workspaceProperties) { this.workspaceProperties = workspaceProperties; } /** *

* The WorkSpace properties. *

* * @return The WorkSpace properties. */ public WorkspaceProperties getWorkspaceProperties() { return this.workspaceProperties; } /** *

* The WorkSpace properties. *

* * @param workspaceProperties * The WorkSpace properties. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkspaceRequest withWorkspaceProperties(WorkspaceProperties workspaceProperties) { setWorkspaceProperties(workspaceProperties); return this; } /** *

* The tags for the WorkSpace. *

* * @return The tags for the WorkSpace. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* The tags for the WorkSpace. *

* * @param tags * The tags for the WorkSpace. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* The tags for the WorkSpace. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *

* * @param tags * The tags for the WorkSpace. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkspaceRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* The tags for the WorkSpace. *

* * @param tags * The tags for the WorkSpace. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkspaceRequest withTags(java.util.Collection tags) { setTags(tags); 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 WorkspaceRequest 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 (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 (getVolumeEncryptionKey() != null) sb.append("VolumeEncryptionKey: ").append(getVolumeEncryptionKey()).append(","); if (getUserVolumeEncryptionEnabled() != null) sb.append("UserVolumeEncryptionEnabled: ").append(getUserVolumeEncryptionEnabled()).append(","); if (getRootVolumeEncryptionEnabled() != null) sb.append("RootVolumeEncryptionEnabled: ").append(getRootVolumeEncryptionEnabled()).append(","); if (getWorkspaceProperties() != null) sb.append("WorkspaceProperties: ").append(getWorkspaceProperties()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).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 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; if (other.getWorkspaceProperties() == null ^ this.getWorkspaceProperties() == null) return false; if (other.getWorkspaceProperties() != null && other.getWorkspaceProperties().equals(this.getWorkspaceProperties()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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 + ((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()); hashCode = prime * hashCode + ((getWorkspaceProperties() == null) ? 0 : getWorkspaceProperties().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getWorkspaceName() == null) ? 0 : getWorkspaceName().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); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.workspaces.model.transform.WorkspaceRequestMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy