com.amazonaws.services.workspaces.model.CreateWorkspaceImageResult 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;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateWorkspaceImageResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The identifier of the new WorkSpace image.
*
*/
private String imageId;
/**
*
* The name of the image.
*
*/
private String name;
/**
*
* The description of the image.
*
*/
private String description;
/**
*
* The operating system that the image is running.
*
*/
private OperatingSystem operatingSystem;
/**
*
* The availability status of the image.
*
*/
private String state;
/**
*
* Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this
* value is set to DEDICATED. For more information, see Bring Your Own Windows
* Desktop Images..
*
*/
private String requiredTenancy;
/**
*
* The date when the image was created.
*
*/
private java.util.Date created;
/**
*
* The identifier of the Amazon Web Services account that owns the image.
*
*/
private String ownerAccountId;
/**
*
* The identifier of the new WorkSpace image.
*
*
* @param imageId
* The identifier of the new WorkSpace image.
*/
public void setImageId(String imageId) {
this.imageId = imageId;
}
/**
*
* The identifier of the new WorkSpace image.
*
*
* @return The identifier of the new WorkSpace image.
*/
public String getImageId() {
return this.imageId;
}
/**
*
* The identifier of the new WorkSpace image.
*
*
* @param imageId
* The identifier of the new WorkSpace image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorkspaceImageResult withImageId(String imageId) {
setImageId(imageId);
return this;
}
/**
*
* The name of the image.
*
*
* @param name
* The name of the image.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the image.
*
*
* @return The name of the image.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the image.
*
*
* @param name
* The name of the image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorkspaceImageResult withName(String name) {
setName(name);
return this;
}
/**
*
* The description of the image.
*
*
* @param description
* The description of the image.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description of the image.
*
*
* @return The description of the image.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description of the image.
*
*
* @param description
* The description of the image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorkspaceImageResult withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The operating system that the image is running.
*
*
* @param operatingSystem
* The operating system that the image is running.
*/
public void setOperatingSystem(OperatingSystem operatingSystem) {
this.operatingSystem = operatingSystem;
}
/**
*
* The operating system that the image is running.
*
*
* @return The operating system that the image is running.
*/
public OperatingSystem getOperatingSystem() {
return this.operatingSystem;
}
/**
*
* The operating system that the image is running.
*
*
* @param operatingSystem
* The operating system that the image is running.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorkspaceImageResult withOperatingSystem(OperatingSystem operatingSystem) {
setOperatingSystem(operatingSystem);
return this;
}
/**
*
* The availability status of the image.
*
*
* @param state
* The availability status of the image.
* @see WorkspaceImageState
*/
public void setState(String state) {
this.state = state;
}
/**
*
* The availability status of the image.
*
*
* @return The availability status of the image.
* @see WorkspaceImageState
*/
public String getState() {
return this.state;
}
/**
*
* The availability status of the image.
*
*
* @param state
* The availability status of the image.
* @return Returns a reference to this object so that method calls can be chained together.
* @see WorkspaceImageState
*/
public CreateWorkspaceImageResult withState(String state) {
setState(state);
return this;
}
/**
*
* The availability status of the image.
*
*
* @param state
* The availability status of the image.
* @return Returns a reference to this object so that method calls can be chained together.
* @see WorkspaceImageState
*/
public CreateWorkspaceImageResult withState(WorkspaceImageState state) {
this.state = state.toString();
return this;
}
/**
*
* Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this
* value is set to DEDICATED. For more information, see Bring Your Own Windows
* Desktop Images..
*
*
* @param requiredTenancy
* Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is
* enabled, this value is set to DEDICATED. For more information, see Bring Your Own
* Windows Desktop Images..
* @see WorkspaceImageRequiredTenancy
*/
public void setRequiredTenancy(String requiredTenancy) {
this.requiredTenancy = requiredTenancy;
}
/**
*
* Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this
* value is set to DEDICATED. For more information, see Bring Your Own Windows
* Desktop Images..
*
*
* @return Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is
* enabled, this value is set to DEDICATED. For more information, see Bring Your Own
* Windows Desktop Images..
* @see WorkspaceImageRequiredTenancy
*/
public String getRequiredTenancy() {
return this.requiredTenancy;
}
/**
*
* Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this
* value is set to DEDICATED. For more information, see Bring Your Own Windows
* Desktop Images..
*
*
* @param requiredTenancy
* Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is
* enabled, this value is set to DEDICATED. For more information, see Bring Your Own
* Windows Desktop Images..
* @return Returns a reference to this object so that method calls can be chained together.
* @see WorkspaceImageRequiredTenancy
*/
public CreateWorkspaceImageResult withRequiredTenancy(String requiredTenancy) {
setRequiredTenancy(requiredTenancy);
return this;
}
/**
*
* Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this
* value is set to DEDICATED. For more information, see Bring Your Own Windows
* Desktop Images..
*
*
* @param requiredTenancy
* Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is
* enabled, this value is set to DEDICATED. For more information, see Bring Your Own
* Windows Desktop Images..
* @return Returns a reference to this object so that method calls can be chained together.
* @see WorkspaceImageRequiredTenancy
*/
public CreateWorkspaceImageResult withRequiredTenancy(WorkspaceImageRequiredTenancy requiredTenancy) {
this.requiredTenancy = requiredTenancy.toString();
return this;
}
/**
*
* The date when the image was created.
*
*
* @param created
* The date when the image was created.
*/
public void setCreated(java.util.Date created) {
this.created = created;
}
/**
*
* The date when the image was created.
*
*
* @return The date when the image was created.
*/
public java.util.Date getCreated() {
return this.created;
}
/**
*
* The date when the image was created.
*
*
* @param created
* The date when the image was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorkspaceImageResult withCreated(java.util.Date created) {
setCreated(created);
return this;
}
/**
*
* The identifier of the Amazon Web Services account that owns the image.
*
*
* @param ownerAccountId
* The identifier of the Amazon Web Services account that owns the image.
*/
public void setOwnerAccountId(String ownerAccountId) {
this.ownerAccountId = ownerAccountId;
}
/**
*
* The identifier of the Amazon Web Services account that owns the image.
*
*
* @return The identifier of the Amazon Web Services account that owns the image.
*/
public String getOwnerAccountId() {
return this.ownerAccountId;
}
/**
*
* The identifier of the Amazon Web Services account that owns the image.
*
*
* @param ownerAccountId
* The identifier of the Amazon Web Services account that owns the image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorkspaceImageResult withOwnerAccountId(String ownerAccountId) {
setOwnerAccountId(ownerAccountId);
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 (getImageId() != null)
sb.append("ImageId: ").append(getImageId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getOperatingSystem() != null)
sb.append("OperatingSystem: ").append(getOperatingSystem()).append(",");
if (getState() != null)
sb.append("State: ").append(getState()).append(",");
if (getRequiredTenancy() != null)
sb.append("RequiredTenancy: ").append(getRequiredTenancy()).append(",");
if (getCreated() != null)
sb.append("Created: ").append(getCreated()).append(",");
if (getOwnerAccountId() != null)
sb.append("OwnerAccountId: ").append(getOwnerAccountId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateWorkspaceImageResult == false)
return false;
CreateWorkspaceImageResult other = (CreateWorkspaceImageResult) obj;
if (other.getImageId() == null ^ this.getImageId() == null)
return false;
if (other.getImageId() != null && other.getImageId().equals(this.getImageId()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getOperatingSystem() == null ^ this.getOperatingSystem() == null)
return false;
if (other.getOperatingSystem() != null && other.getOperatingSystem().equals(this.getOperatingSystem()) == false)
return false;
if (other.getState() == null ^ this.getState() == null)
return false;
if (other.getState() != null && other.getState().equals(this.getState()) == false)
return false;
if (other.getRequiredTenancy() == null ^ this.getRequiredTenancy() == null)
return false;
if (other.getRequiredTenancy() != null && other.getRequiredTenancy().equals(this.getRequiredTenancy()) == false)
return false;
if (other.getCreated() == null ^ this.getCreated() == null)
return false;
if (other.getCreated() != null && other.getCreated().equals(this.getCreated()) == false)
return false;
if (other.getOwnerAccountId() == null ^ this.getOwnerAccountId() == null)
return false;
if (other.getOwnerAccountId() != null && other.getOwnerAccountId().equals(this.getOwnerAccountId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getOperatingSystem() == null) ? 0 : getOperatingSystem().hashCode());
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
hashCode = prime * hashCode + ((getRequiredTenancy() == null) ? 0 : getRequiredTenancy().hashCode());
hashCode = prime * hashCode + ((getCreated() == null) ? 0 : getCreated().hashCode());
hashCode = prime * hashCode + ((getOwnerAccountId() == null) ? 0 : getOwnerAccountId().hashCode());
return hashCode;
}
@Override
public CreateWorkspaceImageResult clone() {
try {
return (CreateWorkspaceImageResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}