com.amazonaws.services.workspaces.model.WorkspaceProperties Maven / Gradle / Ivy
Show all versions of aws-java-sdk-workspaces Show documentation
/*
* Copyright 2016-2021 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 a WorkSpace.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class WorkspaceProperties implements Serializable, Cloneable, StructuredPojo {
/**
*
* The running mode. For more information, see Manage the WorkSpace Running
* Mode.
*
*/
private String runningMode;
/**
*
* The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
*
*/
private Integer runningModeAutoStopTimeoutInMinutes;
/**
*
* The size of the root volume. For important information about how to modify the size of the root and user volumes,
* see Modify a
* WorkSpace.
*
*/
private Integer rootVolumeSizeGib;
/**
*
* The size of the user storage. For important information about how to modify the size of the root and user
* volumes, see Modify a
* WorkSpace.
*
*/
private Integer userVolumeSizeGib;
/**
*
* The compute type. For more information, see Amazon WorkSpaces Bundles.
*
*/
private String computeTypeName;
/**
*
* The running mode. For more information, see Manage the WorkSpace Running
* Mode.
*
*
* @param runningMode
* The running mode. For more information, see Manage the WorkSpace
* Running Mode.
* @see RunningMode
*/
public void setRunningMode(String runningMode) {
this.runningMode = runningMode;
}
/**
*
* The running mode. For more information, see Manage the WorkSpace Running
* Mode.
*
*
* @return The running mode. For more information, see Manage the WorkSpace
* Running Mode.
* @see RunningMode
*/
public String getRunningMode() {
return this.runningMode;
}
/**
*
* The running mode. For more information, see Manage the WorkSpace Running
* Mode.
*
*
* @param runningMode
* The running mode. For more information, see Manage the WorkSpace
* Running Mode.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RunningMode
*/
public WorkspaceProperties withRunningMode(String runningMode) {
setRunningMode(runningMode);
return this;
}
/**
*
* The running mode. For more information, see Manage the WorkSpace Running
* Mode.
*
*
* @param runningMode
* The running mode. For more information, see Manage the WorkSpace
* Running Mode.
* @see RunningMode
*/
public void setRunningMode(RunningMode runningMode) {
withRunningMode(runningMode);
}
/**
*
* The running mode. For more information, see Manage the WorkSpace Running
* Mode.
*
*
* @param runningMode
* The running mode. For more information, see Manage the WorkSpace
* Running Mode.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RunningMode
*/
public WorkspaceProperties withRunningMode(RunningMode runningMode) {
this.runningMode = runningMode.toString();
return this;
}
/**
*
* The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
*
*
* @param runningModeAutoStopTimeoutInMinutes
* The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute
* intervals.
*/
public void setRunningModeAutoStopTimeoutInMinutes(Integer runningModeAutoStopTimeoutInMinutes) {
this.runningModeAutoStopTimeoutInMinutes = runningModeAutoStopTimeoutInMinutes;
}
/**
*
* The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
*
*
* @return The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute
* intervals.
*/
public Integer getRunningModeAutoStopTimeoutInMinutes() {
return this.runningModeAutoStopTimeoutInMinutes;
}
/**
*
* The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
*
*
* @param runningModeAutoStopTimeoutInMinutes
* The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute
* intervals.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceProperties withRunningModeAutoStopTimeoutInMinutes(Integer runningModeAutoStopTimeoutInMinutes) {
setRunningModeAutoStopTimeoutInMinutes(runningModeAutoStopTimeoutInMinutes);
return this;
}
/**
*
* The size of the root volume. For important information about how to modify the size of the root and user volumes,
* see Modify a
* WorkSpace.
*
*
* @param rootVolumeSizeGib
* The size of the root volume. For important information about how to modify the size of the root and user
* volumes, see Modify a
* WorkSpace.
*/
public void setRootVolumeSizeGib(Integer rootVolumeSizeGib) {
this.rootVolumeSizeGib = rootVolumeSizeGib;
}
/**
*
* The size of the root volume. For important information about how to modify the size of the root and user volumes,
* see Modify a
* WorkSpace.
*
*
* @return The size of the root volume. For important information about how to modify the size of the root and user
* volumes, see Modify a
* WorkSpace.
*/
public Integer getRootVolumeSizeGib() {
return this.rootVolumeSizeGib;
}
/**
*
* The size of the root volume. For important information about how to modify the size of the root and user volumes,
* see Modify a
* WorkSpace.
*
*
* @param rootVolumeSizeGib
* The size of the root volume. For important information about how to modify the size of the root and user
* volumes, see Modify a
* WorkSpace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceProperties withRootVolumeSizeGib(Integer rootVolumeSizeGib) {
setRootVolumeSizeGib(rootVolumeSizeGib);
return this;
}
/**
*
* The size of the user storage. For important information about how to modify the size of the root and user
* volumes, see Modify a
* WorkSpace.
*
*
* @param userVolumeSizeGib
* The size of the user storage. For important information about how to modify the size of the root and user
* volumes, see Modify a
* WorkSpace.
*/
public void setUserVolumeSizeGib(Integer userVolumeSizeGib) {
this.userVolumeSizeGib = userVolumeSizeGib;
}
/**
*
* The size of the user storage. For important information about how to modify the size of the root and user
* volumes, see Modify a
* WorkSpace.
*
*
* @return The size of the user storage. For important information about how to modify the size of the root and user
* volumes, see Modify a
* WorkSpace.
*/
public Integer getUserVolumeSizeGib() {
return this.userVolumeSizeGib;
}
/**
*
* The size of the user storage. For important information about how to modify the size of the root and user
* volumes, see Modify a
* WorkSpace.
*
*
* @param userVolumeSizeGib
* The size of the user storage. For important information about how to modify the size of the root and user
* volumes, see Modify a
* WorkSpace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceProperties withUserVolumeSizeGib(Integer userVolumeSizeGib) {
setUserVolumeSizeGib(userVolumeSizeGib);
return this;
}
/**
*
* The compute type. For more information, see Amazon WorkSpaces Bundles.
*
*
* @param computeTypeName
* The compute type. For more information, see Amazon WorkSpaces Bundles.
* @see Compute
*/
public void setComputeTypeName(String computeTypeName) {
this.computeTypeName = computeTypeName;
}
/**
*
* The compute type. For more information, see Amazon WorkSpaces Bundles.
*
*
* @return The compute type. For more information, see Amazon WorkSpaces Bundles.
* @see Compute
*/
public String getComputeTypeName() {
return this.computeTypeName;
}
/**
*
* The compute type. For more information, see Amazon WorkSpaces Bundles.
*
*
* @param computeTypeName
* The compute type. For more information, see Amazon WorkSpaces Bundles.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Compute
*/
public WorkspaceProperties withComputeTypeName(String computeTypeName) {
setComputeTypeName(computeTypeName);
return this;
}
/**
*
* The compute type. For more information, see Amazon WorkSpaces Bundles.
*
*
* @param computeTypeName
* The compute type. For more information, see Amazon WorkSpaces Bundles.
* @see Compute
*/
public void setComputeTypeName(Compute computeTypeName) {
withComputeTypeName(computeTypeName);
}
/**
*
* The compute type. For more information, see Amazon WorkSpaces Bundles.
*
*
* @param computeTypeName
* The compute type. For more information, see Amazon WorkSpaces Bundles.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Compute
*/
public WorkspaceProperties withComputeTypeName(Compute computeTypeName) {
this.computeTypeName = computeTypeName.toString();
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 (getRunningMode() != null)
sb.append("RunningMode: ").append(getRunningMode()).append(",");
if (getRunningModeAutoStopTimeoutInMinutes() != null)
sb.append("RunningModeAutoStopTimeoutInMinutes: ").append(getRunningModeAutoStopTimeoutInMinutes()).append(",");
if (getRootVolumeSizeGib() != null)
sb.append("RootVolumeSizeGib: ").append(getRootVolumeSizeGib()).append(",");
if (getUserVolumeSizeGib() != null)
sb.append("UserVolumeSizeGib: ").append(getUserVolumeSizeGib()).append(",");
if (getComputeTypeName() != null)
sb.append("ComputeTypeName: ").append(getComputeTypeName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof WorkspaceProperties == false)
return false;
WorkspaceProperties other = (WorkspaceProperties) obj;
if (other.getRunningMode() == null ^ this.getRunningMode() == null)
return false;
if (other.getRunningMode() != null && other.getRunningMode().equals(this.getRunningMode()) == false)
return false;
if (other.getRunningModeAutoStopTimeoutInMinutes() == null ^ this.getRunningModeAutoStopTimeoutInMinutes() == null)
return false;
if (other.getRunningModeAutoStopTimeoutInMinutes() != null
&& other.getRunningModeAutoStopTimeoutInMinutes().equals(this.getRunningModeAutoStopTimeoutInMinutes()) == false)
return false;
if (other.getRootVolumeSizeGib() == null ^ this.getRootVolumeSizeGib() == null)
return false;
if (other.getRootVolumeSizeGib() != null && other.getRootVolumeSizeGib().equals(this.getRootVolumeSizeGib()) == false)
return false;
if (other.getUserVolumeSizeGib() == null ^ this.getUserVolumeSizeGib() == null)
return false;
if (other.getUserVolumeSizeGib() != null && other.getUserVolumeSizeGib().equals(this.getUserVolumeSizeGib()) == false)
return false;
if (other.getComputeTypeName() == null ^ this.getComputeTypeName() == null)
return false;
if (other.getComputeTypeName() != null && other.getComputeTypeName().equals(this.getComputeTypeName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRunningMode() == null) ? 0 : getRunningMode().hashCode());
hashCode = prime * hashCode + ((getRunningModeAutoStopTimeoutInMinutes() == null) ? 0 : getRunningModeAutoStopTimeoutInMinutes().hashCode());
hashCode = prime * hashCode + ((getRootVolumeSizeGib() == null) ? 0 : getRootVolumeSizeGib().hashCode());
hashCode = prime * hashCode + ((getUserVolumeSizeGib() == null) ? 0 : getUserVolumeSizeGib().hashCode());
hashCode = prime * hashCode + ((getComputeTypeName() == null) ? 0 : getComputeTypeName().hashCode());
return hashCode;
}
@Override
public WorkspaceProperties clone() {
try {
return (WorkspaceProperties) 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.WorkspacePropertiesMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}