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

com.amazonaws.services.workspaces.model.WorkspaceImage 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.772
Show newest version
/*
 * 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;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes a WorkSpace image. *

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

* The identifier of the 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 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 error code that is returned for the image. *

*/ private String errorCode; /** *

* The text of the error message that is returned for the image. *

*/ private String errorMessage; /** *

* The date when the image was created. If the image has been shared, the Amazon Web Services account that the image * has been shared with sees the original creation date of the image. *

*/ private java.util.Date created; /** *

* The identifier of the Amazon Web Services account that owns the image. *

*/ private String ownerAccountId; /** *

* The updates (if any) that are available for the specified image. *

*/ private UpdateResult updates; /** *

* The identifier of the image. *

* * @param imageId * The identifier of the image. */ public void setImageId(String imageId) { this.imageId = imageId; } /** *

* The identifier of the image. *

* * @return The identifier of the image. */ public String getImageId() { return this.imageId; } /** *

* The identifier of the image. *

* * @param imageId * The identifier of the image. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkspaceImage 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 WorkspaceImage 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 WorkspaceImage 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 WorkspaceImage withOperatingSystem(OperatingSystem operatingSystem) { setOperatingSystem(operatingSystem); return this; } /** *

* The status of the image. *

* * @param state * The status of the image. * @see WorkspaceImageState */ public void setState(String state) { this.state = state; } /** *

* The status of the image. *

* * @return The status of the image. * @see WorkspaceImageState */ public String getState() { return this.state; } /** *

* The status of the image. *

* * @param state * The status of the image. * @return Returns a reference to this object so that method calls can be chained together. * @see WorkspaceImageState */ public WorkspaceImage withState(String state) { setState(state); return this; } /** *

* The status of the image. *

* * @param state * The status of the image. * @return Returns a reference to this object so that method calls can be chained together. * @see WorkspaceImageState */ public WorkspaceImage 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 WorkspaceImage 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 WorkspaceImage withRequiredTenancy(WorkspaceImageRequiredTenancy requiredTenancy) { this.requiredTenancy = requiredTenancy.toString(); return this; } /** *

* The error code that is returned for the image. *

* * @param errorCode * The error code that is returned for the image. */ public void setErrorCode(String errorCode) { this.errorCode = errorCode; } /** *

* The error code that is returned for the image. *

* * @return The error code that is returned for the image. */ public String getErrorCode() { return this.errorCode; } /** *

* The error code that is returned for the image. *

* * @param errorCode * The error code that is returned for the image. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkspaceImage withErrorCode(String errorCode) { setErrorCode(errorCode); return this; } /** *

* The text of the error message that is returned for the image. *

* * @param errorMessage * The text of the error message that is returned for the image. */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } /** *

* The text of the error message that is returned for the image. *

* * @return The text of the error message that is returned for the image. */ public String getErrorMessage() { return this.errorMessage; } /** *

* The text of the error message that is returned for the image. *

* * @param errorMessage * The text of the error message that is returned for the image. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkspaceImage withErrorMessage(String errorMessage) { setErrorMessage(errorMessage); return this; } /** *

* The date when the image was created. If the image has been shared, the Amazon Web Services account that the image * has been shared with sees the original creation date of the image. *

* * @param created * The date when the image was created. If the image has been shared, the Amazon Web Services account that * the image has been shared with sees the original creation date of the image. */ public void setCreated(java.util.Date created) { this.created = created; } /** *

* The date when the image was created. If the image has been shared, the Amazon Web Services account that the image * has been shared with sees the original creation date of the image. *

* * @return The date when the image was created. If the image has been shared, the Amazon Web Services account that * the image has been shared with sees the original creation date of the image. */ public java.util.Date getCreated() { return this.created; } /** *

* The date when the image was created. If the image has been shared, the Amazon Web Services account that the image * has been shared with sees the original creation date of the image. *

* * @param created * The date when the image was created. If the image has been shared, the Amazon Web Services account that * the image has been shared with sees the original creation date of the image. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkspaceImage 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 WorkspaceImage withOwnerAccountId(String ownerAccountId) { setOwnerAccountId(ownerAccountId); return this; } /** *

* The updates (if any) that are available for the specified image. *

* * @param updates * The updates (if any) that are available for the specified image. */ public void setUpdates(UpdateResult updates) { this.updates = updates; } /** *

* The updates (if any) that are available for the specified image. *

* * @return The updates (if any) that are available for the specified image. */ public UpdateResult getUpdates() { return this.updates; } /** *

* The updates (if any) that are available for the specified image. *

* * @param updates * The updates (if any) that are available for the specified image. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkspaceImage withUpdates(UpdateResult updates) { setUpdates(updates); 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 (getErrorCode() != null) sb.append("ErrorCode: ").append(getErrorCode()).append(","); if (getErrorMessage() != null) sb.append("ErrorMessage: ").append(getErrorMessage()).append(","); if (getCreated() != null) sb.append("Created: ").append(getCreated()).append(","); if (getOwnerAccountId() != null) sb.append("OwnerAccountId: ").append(getOwnerAccountId()).append(","); if (getUpdates() != null) sb.append("Updates: ").append(getUpdates()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof WorkspaceImage == false) return false; WorkspaceImage other = (WorkspaceImage) 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.getErrorCode() == null ^ this.getErrorCode() == null) return false; if (other.getErrorCode() != null && other.getErrorCode().equals(this.getErrorCode()) == false) return false; if (other.getErrorMessage() == null ^ this.getErrorMessage() == null) return false; if (other.getErrorMessage() != null && other.getErrorMessage().equals(this.getErrorMessage()) == 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; if (other.getUpdates() == null ^ this.getUpdates() == null) return false; if (other.getUpdates() != null && other.getUpdates().equals(this.getUpdates()) == 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 + ((getErrorCode() == null) ? 0 : getErrorCode().hashCode()); hashCode = prime * hashCode + ((getErrorMessage() == null) ? 0 : getErrorMessage().hashCode()); hashCode = prime * hashCode + ((getCreated() == null) ? 0 : getCreated().hashCode()); hashCode = prime * hashCode + ((getOwnerAccountId() == null) ? 0 : getOwnerAccountId().hashCode()); hashCode = prime * hashCode + ((getUpdates() == null) ? 0 : getUpdates().hashCode()); return hashCode; } @Override public WorkspaceImage clone() { try { return (WorkspaceImage) 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.WorkspaceImageMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy