/* * Copyright 2018-2023 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.appstream.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Describes an image. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Image implements Serializable, Cloneable, StructuredPojo { /** ** The name of the image. *
*/ private String name; /** ** The ARN of the image. *
*/ private String arn; /** ** The ARN of the image from which this image was created. *
*/ private String baseImageArn; /** ** The image name to display. *
*/ private String displayName; /** *
* The image starts in the PENDING
state. If image creation succeeds, the state is
* AVAILABLE
. If image creation fails, the state is FAILED
.
*
* Indicates whether the image is public or private. *
*/ private String visibility; /** ** Indicates whether an image builder can be launched from this image. *
*/ private Boolean imageBuilderSupported; /** ** The name of the image builder that was used to create the private image. If the image is shared, this value is * null. *
*/ private String imageBuilderName; /** ** The operating system platform of the image. *
*/ private String platform; /** ** The description to display. *
*/ private String description; /** ** The reason why the last state change occurred. *
*/ private ImageStateChangeReason stateChangeReason; /** ** The applications associated with the image. *
*/ private java.util.List* The time the image was created. *
*/ private java.util.Date createdTime; /** ** The release date of the public base image. For private images, this date is the release date of the base image * from which the image was created. *
*/ private java.util.Date publicBaseImageReleasedDate; /** ** The version of the AppStream 2.0 agent to use for instances that are launched from this image. *
*/ private String appstreamAgentVersion; /** ** The permissions to provide to the destination AWS account for the specified image. *
*/ private ImagePermissions imagePermissions; /** ** Describes the errors that are returned when a new image can't be created. *
*/ private java.util.List* 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 Image withName(String name) { setName(name); return this; } /** ** The ARN of the image. *
* * @param arn * The ARN of the image. */ public void setArn(String arn) { this.arn = arn; } /** ** The ARN of the image. *
* * @return The ARN of the image. */ public String getArn() { return this.arn; } /** ** The ARN of the image. *
* * @param arn * The ARN of the image. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withArn(String arn) { setArn(arn); return this; } /** ** The ARN of the image from which this image was created. *
* * @param baseImageArn * The ARN of the image from which this image was created. */ public void setBaseImageArn(String baseImageArn) { this.baseImageArn = baseImageArn; } /** ** The ARN of the image from which this image was created. *
* * @return The ARN of the image from which this image was created. */ public String getBaseImageArn() { return this.baseImageArn; } /** ** The ARN of the image from which this image was created. *
* * @param baseImageArn * The ARN of the image from which this image was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withBaseImageArn(String baseImageArn) { setBaseImageArn(baseImageArn); return this; } /** ** The image name to display. *
* * @param displayName * The image name to display. */ public void setDisplayName(String displayName) { this.displayName = displayName; } /** ** The image name to display. *
* * @return The image name to display. */ public String getDisplayName() { return this.displayName; } /** ** The image name to display. *
* * @param displayName * The image name to display. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withDisplayName(String displayName) { setDisplayName(displayName); return this; } /** *
* The image starts in the PENDING
state. If image creation succeeds, the state is
* AVAILABLE
. If image creation fails, the state is FAILED
.
*
PENDING
state. If image creation succeeds, the state is
* AVAILABLE
. If image creation fails, the state is FAILED
.
* @see ImageState
*/
public void setState(String state) {
this.state = state;
}
/**
*
* The image starts in the PENDING
state. If image creation succeeds, the state is
* AVAILABLE
. If image creation fails, the state is FAILED
.
*
PENDING
state. If image creation succeeds, the state is
* AVAILABLE
. If image creation fails, the state is FAILED
.
* @see ImageState
*/
public String getState() {
return this.state;
}
/**
*
* The image starts in the PENDING
state. If image creation succeeds, the state is
* AVAILABLE
. If image creation fails, the state is FAILED
.
*
PENDING
state. If image creation succeeds, the state is
* AVAILABLE
. If image creation fails, the state is FAILED
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ImageState
*/
public Image withState(String state) {
setState(state);
return this;
}
/**
*
* The image starts in the PENDING
state. If image creation succeeds, the state is
* AVAILABLE
. If image creation fails, the state is FAILED
.
*
PENDING
state. If image creation succeeds, the state is
* AVAILABLE
. If image creation fails, the state is FAILED
.
* @see ImageState
*/
public void setState(ImageState state) {
withState(state);
}
/**
*
* The image starts in the PENDING
state. If image creation succeeds, the state is
* AVAILABLE
. If image creation fails, the state is FAILED
.
*
PENDING
state. If image creation succeeds, the state is
* AVAILABLE
. If image creation fails, the state is FAILED
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ImageState
*/
public Image withState(ImageState state) {
this.state = state.toString();
return this;
}
/**
* * Indicates whether the image is public or private. *
* * @param visibility * Indicates whether the image is public or private. * @see VisibilityType */ public void setVisibility(String visibility) { this.visibility = visibility; } /** ** Indicates whether the image is public or private. *
* * @return Indicates whether the image is public or private. * @see VisibilityType */ public String getVisibility() { return this.visibility; } /** ** Indicates whether the image is public or private. *
* * @param visibility * Indicates whether the image is public or private. * @return Returns a reference to this object so that method calls can be chained together. * @see VisibilityType */ public Image withVisibility(String visibility) { setVisibility(visibility); return this; } /** ** Indicates whether the image is public or private. *
* * @param visibility * Indicates whether the image is public or private. * @see VisibilityType */ public void setVisibility(VisibilityType visibility) { withVisibility(visibility); } /** ** Indicates whether the image is public or private. *
* * @param visibility * Indicates whether the image is public or private. * @return Returns a reference to this object so that method calls can be chained together. * @see VisibilityType */ public Image withVisibility(VisibilityType visibility) { this.visibility = visibility.toString(); return this; } /** ** Indicates whether an image builder can be launched from this image. *
* * @param imageBuilderSupported * Indicates whether an image builder can be launched from this image. */ public void setImageBuilderSupported(Boolean imageBuilderSupported) { this.imageBuilderSupported = imageBuilderSupported; } /** ** Indicates whether an image builder can be launched from this image. *
* * @return Indicates whether an image builder can be launched from this image. */ public Boolean getImageBuilderSupported() { return this.imageBuilderSupported; } /** ** Indicates whether an image builder can be launched from this image. *
* * @param imageBuilderSupported * Indicates whether an image builder can be launched from this image. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withImageBuilderSupported(Boolean imageBuilderSupported) { setImageBuilderSupported(imageBuilderSupported); return this; } /** ** Indicates whether an image builder can be launched from this image. *
* * @return Indicates whether an image builder can be launched from this image. */ public Boolean isImageBuilderSupported() { return this.imageBuilderSupported; } /** ** The name of the image builder that was used to create the private image. If the image is shared, this value is * null. *
* * @param imageBuilderName * The name of the image builder that was used to create the private image. If the image is shared, this * value is null. */ public void setImageBuilderName(String imageBuilderName) { this.imageBuilderName = imageBuilderName; } /** ** The name of the image builder that was used to create the private image. If the image is shared, this value is * null. *
* * @return The name of the image builder that was used to create the private image. If the image is shared, this * value is null. */ public String getImageBuilderName() { return this.imageBuilderName; } /** ** The name of the image builder that was used to create the private image. If the image is shared, this value is * null. *
* * @param imageBuilderName * The name of the image builder that was used to create the private image. If the image is shared, this * value is null. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withImageBuilderName(String imageBuilderName) { setImageBuilderName(imageBuilderName); return this; } /** ** The operating system platform of the image. *
* * @param platform * The operating system platform of the image. * @see PlatformType */ public void setPlatform(String platform) { this.platform = platform; } /** ** The operating system platform of the image. *
* * @return The operating system platform of the image. * @see PlatformType */ public String getPlatform() { return this.platform; } /** ** The operating system platform of the image. *
* * @param platform * The operating system platform of the image. * @return Returns a reference to this object so that method calls can be chained together. * @see PlatformType */ public Image withPlatform(String platform) { setPlatform(platform); return this; } /** ** The operating system platform of the image. *
* * @param platform * The operating system platform of the image. * @see PlatformType */ public void setPlatform(PlatformType platform) { withPlatform(platform); } /** ** The operating system platform of the image. *
* * @param platform * The operating system platform of the image. * @return Returns a reference to this object so that method calls can be chained together. * @see PlatformType */ public Image withPlatform(PlatformType platform) { this.platform = platform.toString(); return this; } /** ** The description to display. *
* * @param description * The description to display. */ public void setDescription(String description) { this.description = description; } /** ** The description to display. *
* * @return The description to display. */ public String getDescription() { return this.description; } /** ** The description to display. *
* * @param description * The description to display. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withDescription(String description) { setDescription(description); return this; } /** ** The reason why the last state change occurred. *
* * @param stateChangeReason * The reason why the last state change occurred. */ public void setStateChangeReason(ImageStateChangeReason stateChangeReason) { this.stateChangeReason = stateChangeReason; } /** ** The reason why the last state change occurred. *
* * @return The reason why the last state change occurred. */ public ImageStateChangeReason getStateChangeReason() { return this.stateChangeReason; } /** ** The reason why the last state change occurred. *
* * @param stateChangeReason * The reason why the last state change occurred. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withStateChangeReason(ImageStateChangeReason stateChangeReason) { setStateChangeReason(stateChangeReason); return this; } /** ** The applications associated with the image. *
* * @return The applications associated with the image. */ public java.util.List* The applications associated with the image. *
* * @param applications * The applications associated with the image. */ public void setApplications(java.util.Collection* The applications associated with the image. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setApplications(java.util.Collection)} or {@link #withApplications(java.util.Collection)} if you want to * override the existing values. *
* * @param applications * The applications associated with the image. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withApplications(Application... applications) { if (this.applications == null) { setApplications(new java.util.ArrayList* The applications associated with the image. *
* * @param applications * The applications associated with the image. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withApplications(java.util.Collection* The time the image was created. *
* * @param createdTime * The time the image was created. */ public void setCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; } /** ** The time the image was created. *
* * @return The time the image was created. */ public java.util.Date getCreatedTime() { return this.createdTime; } /** ** The time the image was created. *
* * @param createdTime * The time the image was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withCreatedTime(java.util.Date createdTime) { setCreatedTime(createdTime); return this; } /** ** The release date of the public base image. For private images, this date is the release date of the base image * from which the image was created. *
* * @param publicBaseImageReleasedDate * The release date of the public base image. For private images, this date is the release date of the base * image from which the image was created. */ public void setPublicBaseImageReleasedDate(java.util.Date publicBaseImageReleasedDate) { this.publicBaseImageReleasedDate = publicBaseImageReleasedDate; } /** ** The release date of the public base image. For private images, this date is the release date of the base image * from which the image was created. *
* * @return The release date of the public base image. For private images, this date is the release date of the base * image from which the image was created. */ public java.util.Date getPublicBaseImageReleasedDate() { return this.publicBaseImageReleasedDate; } /** ** The release date of the public base image. For private images, this date is the release date of the base image * from which the image was created. *
* * @param publicBaseImageReleasedDate * The release date of the public base image. For private images, this date is the release date of the base * image from which the image was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withPublicBaseImageReleasedDate(java.util.Date publicBaseImageReleasedDate) { setPublicBaseImageReleasedDate(publicBaseImageReleasedDate); return this; } /** ** The version of the AppStream 2.0 agent to use for instances that are launched from this image. *
* * @param appstreamAgentVersion * The version of the AppStream 2.0 agent to use for instances that are launched from this image. */ public void setAppstreamAgentVersion(String appstreamAgentVersion) { this.appstreamAgentVersion = appstreamAgentVersion; } /** ** The version of the AppStream 2.0 agent to use for instances that are launched from this image. *
* * @return The version of the AppStream 2.0 agent to use for instances that are launched from this image. */ public String getAppstreamAgentVersion() { return this.appstreamAgentVersion; } /** ** The version of the AppStream 2.0 agent to use for instances that are launched from this image. *
* * @param appstreamAgentVersion * The version of the AppStream 2.0 agent to use for instances that are launched from this image. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withAppstreamAgentVersion(String appstreamAgentVersion) { setAppstreamAgentVersion(appstreamAgentVersion); return this; } /** ** The permissions to provide to the destination AWS account for the specified image. *
* * @param imagePermissions * The permissions to provide to the destination AWS account for the specified image. */ public void setImagePermissions(ImagePermissions imagePermissions) { this.imagePermissions = imagePermissions; } /** ** The permissions to provide to the destination AWS account for the specified image. *
* * @return The permissions to provide to the destination AWS account for the specified image. */ public ImagePermissions getImagePermissions() { return this.imagePermissions; } /** ** The permissions to provide to the destination AWS account for the specified image. *
* * @param imagePermissions * The permissions to provide to the destination AWS account for the specified image. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withImagePermissions(ImagePermissions imagePermissions) { setImagePermissions(imagePermissions); return this; } /** ** Describes the errors that are returned when a new image can't be created. *
* * @return Describes the errors that are returned when a new image can't be created. */ public java.util.List* Describes the errors that are returned when a new image can't be created. *
* * @param imageErrors * Describes the errors that are returned when a new image can't be created. */ public void setImageErrors(java.util.Collection* Describes the errors that are returned when a new image can't be created. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setImageErrors(java.util.Collection)} or {@link #withImageErrors(java.util.Collection)} if you want to * override the existing values. *
* * @param imageErrors * Describes the errors that are returned when a new image can't be created. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withImageErrors(ResourceError... imageErrors) { if (this.imageErrors == null) { setImageErrors(new java.util.ArrayList* Describes the errors that are returned when a new image can't be created. *
* * @param imageErrors * Describes the errors that are returned when a new image can't be created. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withImageErrors(java.util.Collection