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

com.amazonaws.services.ec2.model.Image Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
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.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Describes an image. *

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

* The architecture of the image. *

*/ private String architecture; /** *

* The date and time the image was created. *

*/ private String creationDate; /** *

* The ID of the AMI. *

*/ private String imageId; /** *

* The location of the AMI. *

*/ private String imageLocation; /** *

* The type of image. *

*/ private String imageType; /** *

* Indicates whether the image has public launch permissions. The value is true if this image has * public launch permissions or false if it has only implicit and explicit launch permissions. *

*/ private Boolean publicValue; /** *

* The kernel associated with the image, if any. Only applicable for machine images. *

*/ private String kernelId; /** *

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

*/ private String ownerId; /** *

* This value is set to windows for Windows AMIs; otherwise, it is blank. *

*/ private String platform; /** *

* The platform details associated with the billing code of the AMI. For more information, see Understand AMI billing * information in the Amazon EC2 User Guide. *

*/ private String platformDetails; /** *

* The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. * usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price * List API. You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, * or in the responses that are returned by the DescribeImages command * in the Amazon EC2 API, or the describe-images command in * the CLI. *

*/ private String usageOperation; /** *

* Any product codes associated with the AMI. *

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

* The RAM disk associated with the image, if any. Only applicable for machine images. *

*/ private String ramdiskId; /** *

* The current state of the AMI. If the state is available, the image is successfully registered and * can be used to launch an instance. *

*/ private String state; /** *

* Any block device mapping entries. *

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

* The description of the AMI that was provided during image creation. *

*/ private String description; /** *

* Specifies whether enhanced networking with ENA is enabled. *

*/ private Boolean enaSupport; /** *

* The hypervisor type of the image. Only xen is supported. ovm is not supported. *

*/ private String hypervisor; /** *

* The owner alias (amazon | aws-marketplace). *

*/ private String imageOwnerAlias; /** *

* The name of the AMI that was provided during image creation. *

*/ private String name; /** *

* The device name of the root device volume (for example, /dev/sda1). *

*/ private String rootDeviceName; /** *

* The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume. *

*/ private String rootDeviceType; /** *

* Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. *

*/ private String sriovNetSupport; /** *

* The reason for the state change. *

*/ private StateReason stateReason; /** *

* Any tags assigned to the image. *

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

* The type of virtualization of the AMI. *

*/ private String virtualizationType; /** *

* The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User * Guide. *

*/ private String bootMode; /** *

* If the image is configured for NitroTPM support, the value is v2.0. For more information, see NitroTPM in the Amazon EC2 User * Guide. *

*/ private String tpmSupport; /** *

* The date and time to deprecate the AMI, in UTC, in the following format: * YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 * rounds the seconds to the nearest minute. *

*/ private String deprecationTime; /** *

* If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will * have HttpTokens automatically set to required so that, by default, the instance * requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit * is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. *

*/ private String imdsSupport; /** *

* The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This field * only appears if the AMI was created using CreateImage. *

*/ private String sourceInstanceId; /** *

* Indicates whether deregistration protection is enabled for the AMI. *

*/ private String deregistrationProtection; /** *

* The date and time, in ISO 8601 date-time format, when the AMI was * last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before * that usage is reported. *

* *

* lastLaunchedTime data is available starting April 2017. *

*
*/ private String lastLaunchedTime; /** *

* The architecture of the image. *

* * @param architecture * The architecture of the image. * @see ArchitectureValues */ public void setArchitecture(String architecture) { this.architecture = architecture; } /** *

* The architecture of the image. *

* * @return The architecture of the image. * @see ArchitectureValues */ public String getArchitecture() { return this.architecture; } /** *

* The architecture of the image. *

* * @param architecture * The architecture of the image. * @return Returns a reference to this object so that method calls can be chained together. * @see ArchitectureValues */ public Image withArchitecture(String architecture) { setArchitecture(architecture); return this; } /** *

* The architecture of the image. *

* * @param architecture * The architecture of the image. * @see ArchitectureValues */ public void setArchitecture(ArchitectureValues architecture) { withArchitecture(architecture); } /** *

* The architecture of the image. *

* * @param architecture * The architecture of the image. * @return Returns a reference to this object so that method calls can be chained together. * @see ArchitectureValues */ public Image withArchitecture(ArchitectureValues architecture) { this.architecture = architecture.toString(); return this; } /** *

* The date and time the image was created. *

* * @param creationDate * The date and time the image was created. */ public void setCreationDate(String creationDate) { this.creationDate = creationDate; } /** *

* The date and time the image was created. *

* * @return The date and time the image was created. */ public String getCreationDate() { return this.creationDate; } /** *

* The date and time the image was created. *

* * @param creationDate * The date and time the image was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withCreationDate(String creationDate) { setCreationDate(creationDate); return this; } /** *

* The ID of the AMI. *

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

* The ID of the AMI. *

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

* The ID of the AMI. *

* * @param imageId * The ID of the AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withImageId(String imageId) { setImageId(imageId); return this; } /** *

* The location of the AMI. *

* * @param imageLocation * The location of the AMI. */ public void setImageLocation(String imageLocation) { this.imageLocation = imageLocation; } /** *

* The location of the AMI. *

* * @return The location of the AMI. */ public String getImageLocation() { return this.imageLocation; } /** *

* The location of the AMI. *

* * @param imageLocation * The location of the AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withImageLocation(String imageLocation) { setImageLocation(imageLocation); return this; } /** *

* The type of image. *

* * @param imageType * The type of image. * @see ImageTypeValues */ public void setImageType(String imageType) { this.imageType = imageType; } /** *

* The type of image. *

* * @return The type of image. * @see ImageTypeValues */ public String getImageType() { return this.imageType; } /** *

* The type of image. *

* * @param imageType * The type of image. * @return Returns a reference to this object so that method calls can be chained together. * @see ImageTypeValues */ public Image withImageType(String imageType) { setImageType(imageType); return this; } /** *

* The type of image. *

* * @param imageType * The type of image. * @see ImageTypeValues */ public void setImageType(ImageTypeValues imageType) { withImageType(imageType); } /** *

* The type of image. *

* * @param imageType * The type of image. * @return Returns a reference to this object so that method calls can be chained together. * @see ImageTypeValues */ public Image withImageType(ImageTypeValues imageType) { this.imageType = imageType.toString(); return this; } /** *

* Indicates whether the image has public launch permissions. The value is true if this image has * public launch permissions or false if it has only implicit and explicit launch permissions. *

* * @param publicValue * Indicates whether the image has public launch permissions. The value is true if this image * has public launch permissions or false if it has only implicit and explicit launch * permissions. */ public void setPublic(Boolean publicValue) { this.publicValue = publicValue; } /** *

* Indicates whether the image has public launch permissions. The value is true if this image has * public launch permissions or false if it has only implicit and explicit launch permissions. *

* * @return Indicates whether the image has public launch permissions. The value is true if this image * has public launch permissions or false if it has only implicit and explicit launch * permissions. */ public Boolean getPublic() { return this.publicValue; } /** *

* Indicates whether the image has public launch permissions. The value is true if this image has * public launch permissions or false if it has only implicit and explicit launch permissions. *

* * @param publicValue * Indicates whether the image has public launch permissions. The value is true if this image * has public launch permissions or false if it has only implicit and explicit launch * permissions. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withPublic(Boolean publicValue) { setPublic(publicValue); return this; } /** *

* Indicates whether the image has public launch permissions. The value is true if this image has * public launch permissions or false if it has only implicit and explicit launch permissions. *

* * @return Indicates whether the image has public launch permissions. The value is true if this image * has public launch permissions or false if it has only implicit and explicit launch * permissions. */ public Boolean isPublic() { return this.publicValue; } /** *

* The kernel associated with the image, if any. Only applicable for machine images. *

* * @param kernelId * The kernel associated with the image, if any. Only applicable for machine images. */ public void setKernelId(String kernelId) { this.kernelId = kernelId; } /** *

* The kernel associated with the image, if any. Only applicable for machine images. *

* * @return The kernel associated with the image, if any. Only applicable for machine images. */ public String getKernelId() { return this.kernelId; } /** *

* The kernel associated with the image, if any. Only applicable for machine images. *

* * @param kernelId * The kernel associated with the image, if any. Only applicable for machine images. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withKernelId(String kernelId) { setKernelId(kernelId); return this; } /** *

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

* * @param ownerId * The ID of the Amazon Web Services account that owns the image. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** *

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

* * @return The ID of the Amazon Web Services account that owns the image. */ public String getOwnerId() { return this.ownerId; } /** *

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

* * @param ownerId * The ID 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 Image withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** *

* This value is set to windows for Windows AMIs; otherwise, it is blank. *

* * @param platform * This value is set to windows for Windows AMIs; otherwise, it is blank. * @see PlatformValues */ public void setPlatform(String platform) { this.platform = platform; } /** *

* This value is set to windows for Windows AMIs; otherwise, it is blank. *

* * @return This value is set to windows for Windows AMIs; otherwise, it is blank. * @see PlatformValues */ public String getPlatform() { return this.platform; } /** *

* This value is set to windows for Windows AMIs; otherwise, it is blank. *

* * @param platform * This value is set to windows for Windows AMIs; otherwise, it is blank. * @return Returns a reference to this object so that method calls can be chained together. * @see PlatformValues */ public Image withPlatform(String platform) { setPlatform(platform); return this; } /** *

* This value is set to windows for Windows AMIs; otherwise, it is blank. *

* * @param platform * This value is set to windows for Windows AMIs; otherwise, it is blank. * @see PlatformValues */ public void setPlatform(PlatformValues platform) { withPlatform(platform); } /** *

* This value is set to windows for Windows AMIs; otherwise, it is blank. *

* * @param platform * This value is set to windows for Windows AMIs; otherwise, it is blank. * @return Returns a reference to this object so that method calls can be chained together. * @see PlatformValues */ public Image withPlatform(PlatformValues platform) { this.platform = platform.toString(); return this; } /** *

* The platform details associated with the billing code of the AMI. For more information, see Understand AMI billing * information in the Amazon EC2 User Guide. *

* * @param platformDetails * The platform details associated with the billing code of the AMI. For more information, see Understand AMI billing * information in the Amazon EC2 User Guide. */ public void setPlatformDetails(String platformDetails) { this.platformDetails = platformDetails; } /** *

* The platform details associated with the billing code of the AMI. For more information, see Understand AMI billing * information in the Amazon EC2 User Guide. *

* * @return The platform details associated with the billing code of the AMI. For more information, see Understand AMI billing * information in the Amazon EC2 User Guide. */ public String getPlatformDetails() { return this.platformDetails; } /** *

* The platform details associated with the billing code of the AMI. For more information, see Understand AMI billing * information in the Amazon EC2 User Guide. *

* * @param platformDetails * The platform details associated with the billing code of the AMI. For more information, see Understand AMI billing * information in the Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withPlatformDetails(String platformDetails) { setPlatformDetails(platformDetails); return this; } /** *

* The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. * usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price * List API. You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, * or in the responses that are returned by the DescribeImages command * in the Amazon EC2 API, or the describe-images command in * the CLI. *

* * @param usageOperation * The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. * usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services * Price List API. You can view these fields on the Instances or AMIs pages in the Amazon * EC2 console, or in the responses that are returned by the DescribeImages * command in the Amazon EC2 API, or the describe-images * command in the CLI. */ public void setUsageOperation(String usageOperation) { this.usageOperation = usageOperation; } /** *

* The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. * usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price * List API. You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, * or in the responses that are returned by the DescribeImages command * in the Amazon EC2 API, or the describe-images command in * the CLI. *

* * @return The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. * usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web * Services Price List API. You can view these fields on the Instances or AMIs pages in * the Amazon EC2 console, or in the responses that are returned by the DescribeImages * command in the Amazon EC2 API, or the describe-images * command in the CLI. */ public String getUsageOperation() { return this.usageOperation; } /** *

* The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. * usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price * List API. You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, * or in the responses that are returned by the DescribeImages command * in the Amazon EC2 API, or the describe-images command in * the CLI. *

* * @param usageOperation * The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. * usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services * Price List API. You can view these fields on the Instances or AMIs pages in the Amazon * EC2 console, or in the responses that are returned by the DescribeImages * command in the Amazon EC2 API, or the describe-images * command in the CLI. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withUsageOperation(String usageOperation) { setUsageOperation(usageOperation); return this; } /** *

* Any product codes associated with the AMI. *

* * @return Any product codes associated with the AMI. */ public java.util.List getProductCodes() { if (productCodes == null) { productCodes = new com.amazonaws.internal.SdkInternalList(); } return productCodes; } /** *

* Any product codes associated with the AMI. *

* * @param productCodes * Any product codes associated with the AMI. */ public void setProductCodes(java.util.Collection productCodes) { if (productCodes == null) { this.productCodes = null; return; } this.productCodes = new com.amazonaws.internal.SdkInternalList(productCodes); } /** *

* Any product codes associated with the AMI. *

*

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

* * @param productCodes * Any product codes associated with the AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withProductCodes(ProductCode... productCodes) { if (this.productCodes == null) { setProductCodes(new com.amazonaws.internal.SdkInternalList(productCodes.length)); } for (ProductCode ele : productCodes) { this.productCodes.add(ele); } return this; } /** *

* Any product codes associated with the AMI. *

* * @param productCodes * Any product codes associated with the AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withProductCodes(java.util.Collection productCodes) { setProductCodes(productCodes); return this; } /** *

* The RAM disk associated with the image, if any. Only applicable for machine images. *

* * @param ramdiskId * The RAM disk associated with the image, if any. Only applicable for machine images. */ public void setRamdiskId(String ramdiskId) { this.ramdiskId = ramdiskId; } /** *

* The RAM disk associated with the image, if any. Only applicable for machine images. *

* * @return The RAM disk associated with the image, if any. Only applicable for machine images. */ public String getRamdiskId() { return this.ramdiskId; } /** *

* The RAM disk associated with the image, if any. Only applicable for machine images. *

* * @param ramdiskId * The RAM disk associated with the image, if any. Only applicable for machine images. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withRamdiskId(String ramdiskId) { setRamdiskId(ramdiskId); return this; } /** *

* The current state of the AMI. If the state is available, the image is successfully registered and * can be used to launch an instance. *

* * @param state * The current state of the AMI. If the state is available, the image is successfully registered * and can be used to launch an instance. * @see ImageState */ public void setState(String state) { this.state = state; } /** *

* The current state of the AMI. If the state is available, the image is successfully registered and * can be used to launch an instance. *

* * @return The current state of the AMI. If the state is available, the image is successfully * registered and can be used to launch an instance. * @see ImageState */ public String getState() { return this.state; } /** *

* The current state of the AMI. If the state is available, the image is successfully registered and * can be used to launch an instance. *

* * @param state * The current state of the AMI. If the state is available, the image is successfully registered * and can be used to launch an instance. * @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 current state of the AMI. If the state is available, the image is successfully registered and * can be used to launch an instance. *

* * @param state * The current state of the AMI. If the state is available, the image is successfully registered * and can be used to launch an instance. * @see ImageState */ public void setState(ImageState state) { withState(state); } /** *

* The current state of the AMI. If the state is available, the image is successfully registered and * can be used to launch an instance. *

* * @param state * The current state of the AMI. If the state is available, the image is successfully registered * and can be used to launch an instance. * @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; } /** *

* Any block device mapping entries. *

* * @return Any block device mapping entries. */ public java.util.List getBlockDeviceMappings() { if (blockDeviceMappings == null) { blockDeviceMappings = new com.amazonaws.internal.SdkInternalList(); } return blockDeviceMappings; } /** *

* Any block device mapping entries. *

* * @param blockDeviceMappings * Any block device mapping entries. */ public void setBlockDeviceMappings(java.util.Collection blockDeviceMappings) { if (blockDeviceMappings == null) { this.blockDeviceMappings = null; return; } this.blockDeviceMappings = new com.amazonaws.internal.SdkInternalList(blockDeviceMappings); } /** *

* Any block device mapping entries. *

*

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

* * @param blockDeviceMappings * Any block device mapping entries. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings) { if (this.blockDeviceMappings == null) { setBlockDeviceMappings(new com.amazonaws.internal.SdkInternalList(blockDeviceMappings.length)); } for (BlockDeviceMapping ele : blockDeviceMappings) { this.blockDeviceMappings.add(ele); } return this; } /** *

* Any block device mapping entries. *

* * @param blockDeviceMappings * Any block device mapping entries. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withBlockDeviceMappings(java.util.Collection blockDeviceMappings) { setBlockDeviceMappings(blockDeviceMappings); return this; } /** *

* The description of the AMI that was provided during image creation. *

* * @param description * The description of the AMI that was provided during image creation. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the AMI that was provided during image creation. *

* * @return The description of the AMI that was provided during image creation. */ public String getDescription() { return this.description; } /** *

* The description of the AMI that was provided during image creation. *

* * @param description * The description of the AMI that was provided during image creation. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withDescription(String description) { setDescription(description); return this; } /** *

* Specifies whether enhanced networking with ENA is enabled. *

* * @param enaSupport * Specifies whether enhanced networking with ENA is enabled. */ public void setEnaSupport(Boolean enaSupport) { this.enaSupport = enaSupport; } /** *

* Specifies whether enhanced networking with ENA is enabled. *

* * @return Specifies whether enhanced networking with ENA is enabled. */ public Boolean getEnaSupport() { return this.enaSupport; } /** *

* Specifies whether enhanced networking with ENA is enabled. *

* * @param enaSupport * Specifies whether enhanced networking with ENA is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withEnaSupport(Boolean enaSupport) { setEnaSupport(enaSupport); return this; } /** *

* Specifies whether enhanced networking with ENA is enabled. *

* * @return Specifies whether enhanced networking with ENA is enabled. */ public Boolean isEnaSupport() { return this.enaSupport; } /** *

* The hypervisor type of the image. Only xen is supported. ovm is not supported. *

* * @param hypervisor * The hypervisor type of the image. Only xen is supported. ovm is not supported. * @see HypervisorType */ public void setHypervisor(String hypervisor) { this.hypervisor = hypervisor; } /** *

* The hypervisor type of the image. Only xen is supported. ovm is not supported. *

* * @return The hypervisor type of the image. Only xen is supported. ovm is not supported. * @see HypervisorType */ public String getHypervisor() { return this.hypervisor; } /** *

* The hypervisor type of the image. Only xen is supported. ovm is not supported. *

* * @param hypervisor * The hypervisor type of the image. Only xen is supported. ovm is not supported. * @return Returns a reference to this object so that method calls can be chained together. * @see HypervisorType */ public Image withHypervisor(String hypervisor) { setHypervisor(hypervisor); return this; } /** *

* The hypervisor type of the image. Only xen is supported. ovm is not supported. *

* * @param hypervisor * The hypervisor type of the image. Only xen is supported. ovm is not supported. * @see HypervisorType */ public void setHypervisor(HypervisorType hypervisor) { withHypervisor(hypervisor); } /** *

* The hypervisor type of the image. Only xen is supported. ovm is not supported. *

* * @param hypervisor * The hypervisor type of the image. Only xen is supported. ovm is not supported. * @return Returns a reference to this object so that method calls can be chained together. * @see HypervisorType */ public Image withHypervisor(HypervisorType hypervisor) { this.hypervisor = hypervisor.toString(); return this; } /** *

* The owner alias (amazon | aws-marketplace). *

* * @param imageOwnerAlias * The owner alias (amazon | aws-marketplace). */ public void setImageOwnerAlias(String imageOwnerAlias) { this.imageOwnerAlias = imageOwnerAlias; } /** *

* The owner alias (amazon | aws-marketplace). *

* * @return The owner alias (amazon | aws-marketplace). */ public String getImageOwnerAlias() { return this.imageOwnerAlias; } /** *

* The owner alias (amazon | aws-marketplace). *

* * @param imageOwnerAlias * The owner alias (amazon | aws-marketplace). * @return Returns a reference to this object so that method calls can be chained together. */ public Image withImageOwnerAlias(String imageOwnerAlias) { setImageOwnerAlias(imageOwnerAlias); return this; } /** *

* The name of the AMI that was provided during image creation. *

* * @param name * The name of the AMI that was provided during image creation. */ public void setName(String name) { this.name = name; } /** *

* The name of the AMI that was provided during image creation. *

* * @return The name of the AMI that was provided during image creation. */ public String getName() { return this.name; } /** *

* The name of the AMI that was provided during image creation. *

* * @param name * The name of the AMI that was provided during image creation. * @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 device name of the root device volume (for example, /dev/sda1). *

* * @param rootDeviceName * The device name of the root device volume (for example, /dev/sda1). */ public void setRootDeviceName(String rootDeviceName) { this.rootDeviceName = rootDeviceName; } /** *

* The device name of the root device volume (for example, /dev/sda1). *

* * @return The device name of the root device volume (for example, /dev/sda1). */ public String getRootDeviceName() { return this.rootDeviceName; } /** *

* The device name of the root device volume (for example, /dev/sda1). *

* * @param rootDeviceName * The device name of the root device volume (for example, /dev/sda1). * @return Returns a reference to this object so that method calls can be chained together. */ public Image withRootDeviceName(String rootDeviceName) { setRootDeviceName(rootDeviceName); return this; } /** *

* The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume. *

* * @param rootDeviceType * The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume. * @see DeviceType */ public void setRootDeviceType(String rootDeviceType) { this.rootDeviceType = rootDeviceType; } /** *

* The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume. *

* * @return The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store * volume. * @see DeviceType */ public String getRootDeviceType() { return this.rootDeviceType; } /** *

* The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume. *

* * @param rootDeviceType * The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume. * @return Returns a reference to this object so that method calls can be chained together. * @see DeviceType */ public Image withRootDeviceType(String rootDeviceType) { setRootDeviceType(rootDeviceType); return this; } /** *

* The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume. *

* * @param rootDeviceType * The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume. * @see DeviceType */ public void setRootDeviceType(DeviceType rootDeviceType) { withRootDeviceType(rootDeviceType); } /** *

* The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume. *

* * @param rootDeviceType * The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume. * @return Returns a reference to this object so that method calls can be chained together. * @see DeviceType */ public Image withRootDeviceType(DeviceType rootDeviceType) { this.rootDeviceType = rootDeviceType.toString(); return this; } /** *

* Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. *

* * @param sriovNetSupport * Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. */ public void setSriovNetSupport(String sriovNetSupport) { this.sriovNetSupport = sriovNetSupport; } /** *

* Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. *

* * @return Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. */ public String getSriovNetSupport() { return this.sriovNetSupport; } /** *

* Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. *

* * @param sriovNetSupport * Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withSriovNetSupport(String sriovNetSupport) { setSriovNetSupport(sriovNetSupport); return this; } /** *

* The reason for the state change. *

* * @param stateReason * The reason for the state change. */ public void setStateReason(StateReason stateReason) { this.stateReason = stateReason; } /** *

* The reason for the state change. *

* * @return The reason for the state change. */ public StateReason getStateReason() { return this.stateReason; } /** *

* The reason for the state change. *

* * @param stateReason * The reason for the state change. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withStateReason(StateReason stateReason) { setStateReason(stateReason); return this; } /** *

* Any tags assigned to the image. *

* * @return Any tags assigned to the image. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* Any tags assigned to the image. *

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

* Any tags assigned to the image. *

*

* 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 * Any tags assigned to the image. * @return Returns a reference to this object so that method calls can be chained together. */ public Image 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; } /** *

* Any tags assigned to the image. *

* * @param tags * Any tags assigned to the image. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

* The type of virtualization of the AMI. *

* * @param virtualizationType * The type of virtualization of the AMI. * @see VirtualizationType */ public void setVirtualizationType(String virtualizationType) { this.virtualizationType = virtualizationType; } /** *

* The type of virtualization of the AMI. *

* * @return The type of virtualization of the AMI. * @see VirtualizationType */ public String getVirtualizationType() { return this.virtualizationType; } /** *

* The type of virtualization of the AMI. *

* * @param virtualizationType * The type of virtualization of the AMI. * @return Returns a reference to this object so that method calls can be chained together. * @see VirtualizationType */ public Image withVirtualizationType(String virtualizationType) { setVirtualizationType(virtualizationType); return this; } /** *

* The type of virtualization of the AMI. *

* * @param virtualizationType * The type of virtualization of the AMI. * @see VirtualizationType */ public void setVirtualizationType(VirtualizationType virtualizationType) { withVirtualizationType(virtualizationType); } /** *

* The type of virtualization of the AMI. *

* * @param virtualizationType * The type of virtualization of the AMI. * @return Returns a reference to this object so that method calls can be chained together. * @see VirtualizationType */ public Image withVirtualizationType(VirtualizationType virtualizationType) { this.virtualizationType = virtualizationType.toString(); return this; } /** *

* The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User * Guide. *

* * @param bootMode * The boot mode of the image. For more information, see Boot modes in the Amazon * EC2 User Guide. * @see BootModeValues */ public void setBootMode(String bootMode) { this.bootMode = bootMode; } /** *

* The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User * Guide. *

* * @return The boot mode of the image. For more information, see Boot modes in the Amazon * EC2 User Guide. * @see BootModeValues */ public String getBootMode() { return this.bootMode; } /** *

* The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User * Guide. *

* * @param bootMode * The boot mode of the image. For more information, see Boot modes in the Amazon * EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see BootModeValues */ public Image withBootMode(String bootMode) { setBootMode(bootMode); return this; } /** *

* The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User * Guide. *

* * @param bootMode * The boot mode of the image. For more information, see Boot modes in the Amazon * EC2 User Guide. * @see BootModeValues */ public void setBootMode(BootModeValues bootMode) { withBootMode(bootMode); } /** *

* The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User * Guide. *

* * @param bootMode * The boot mode of the image. For more information, see Boot modes in the Amazon * EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see BootModeValues */ public Image withBootMode(BootModeValues bootMode) { this.bootMode = bootMode.toString(); return this; } /** *

* If the image is configured for NitroTPM support, the value is v2.0. For more information, see NitroTPM in the Amazon EC2 User * Guide. *

* * @param tpmSupport * If the image is configured for NitroTPM support, the value is v2.0. For more information, see * NitroTPM in the Amazon * EC2 User Guide. * @see TpmSupportValues */ public void setTpmSupport(String tpmSupport) { this.tpmSupport = tpmSupport; } /** *

* If the image is configured for NitroTPM support, the value is v2.0. For more information, see NitroTPM in the Amazon EC2 User * Guide. *

* * @return If the image is configured for NitroTPM support, the value is v2.0. For more information, * see NitroTPM in the * Amazon EC2 User Guide. * @see TpmSupportValues */ public String getTpmSupport() { return this.tpmSupport; } /** *

* If the image is configured for NitroTPM support, the value is v2.0. For more information, see NitroTPM in the Amazon EC2 User * Guide. *

* * @param tpmSupport * If the image is configured for NitroTPM support, the value is v2.0. For more information, see * NitroTPM in the Amazon * EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see TpmSupportValues */ public Image withTpmSupport(String tpmSupport) { setTpmSupport(tpmSupport); return this; } /** *

* If the image is configured for NitroTPM support, the value is v2.0. For more information, see NitroTPM in the Amazon EC2 User * Guide. *

* * @param tpmSupport * If the image is configured for NitroTPM support, the value is v2.0. For more information, see * NitroTPM in the Amazon * EC2 User Guide. * @see TpmSupportValues */ public void setTpmSupport(TpmSupportValues tpmSupport) { withTpmSupport(tpmSupport); } /** *

* If the image is configured for NitroTPM support, the value is v2.0. For more information, see NitroTPM in the Amazon EC2 User * Guide. *

* * @param tpmSupport * If the image is configured for NitroTPM support, the value is v2.0. For more information, see * NitroTPM in the Amazon * EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see TpmSupportValues */ public Image withTpmSupport(TpmSupportValues tpmSupport) { this.tpmSupport = tpmSupport.toString(); return this; } /** *

* The date and time to deprecate the AMI, in UTC, in the following format: * YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 * rounds the seconds to the nearest minute. *

* * @param deprecationTime * The date and time to deprecate the AMI, in UTC, in the following format: * YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, * Amazon EC2 rounds the seconds to the nearest minute. */ public void setDeprecationTime(String deprecationTime) { this.deprecationTime = deprecationTime; } /** *

* The date and time to deprecate the AMI, in UTC, in the following format: * YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 * rounds the seconds to the nearest minute. *

* * @return The date and time to deprecate the AMI, in UTC, in the following format: * YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, * Amazon EC2 rounds the seconds to the nearest minute. */ public String getDeprecationTime() { return this.deprecationTime; } /** *

* The date and time to deprecate the AMI, in UTC, in the following format: * YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 * rounds the seconds to the nearest minute. *

* * @param deprecationTime * The date and time to deprecate the AMI, in UTC, in the following format: * YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, * Amazon EC2 rounds the seconds to the nearest minute. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withDeprecationTime(String deprecationTime) { setDeprecationTime(deprecationTime); return this; } /** *

* If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will * have HttpTokens automatically set to required so that, by default, the instance * requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit * is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. *

* * @param imdsSupport * If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI * will have HttpTokens automatically set to required so that, by default, the * instance requires that IMDSv2 is used when requesting instance metadata. In addition, * HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. * @see ImdsSupportValues */ public void setImdsSupport(String imdsSupport) { this.imdsSupport = imdsSupport; } /** *

* If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will * have HttpTokens automatically set to required so that, by default, the instance * requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit * is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. *

* * @return If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI * will have HttpTokens automatically set to required so that, by default, the * instance requires that IMDSv2 is used when requesting instance metadata. In addition, * HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. * @see ImdsSupportValues */ public String getImdsSupport() { return this.imdsSupport; } /** *

* If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will * have HttpTokens automatically set to required so that, by default, the instance * requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit * is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. *

* * @param imdsSupport * If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI * will have HttpTokens automatically set to required so that, by default, the * instance requires that IMDSv2 is used when requesting instance metadata. In addition, * HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see ImdsSupportValues */ public Image withImdsSupport(String imdsSupport) { setImdsSupport(imdsSupport); return this; } /** *

* If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will * have HttpTokens automatically set to required so that, by default, the instance * requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit * is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. *

* * @param imdsSupport * If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI * will have HttpTokens automatically set to required so that, by default, the * instance requires that IMDSv2 is used when requesting instance metadata. In addition, * HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. * @see ImdsSupportValues */ public void setImdsSupport(ImdsSupportValues imdsSupport) { withImdsSupport(imdsSupport); } /** *

* If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will * have HttpTokens automatically set to required so that, by default, the instance * requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit * is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. *

* * @param imdsSupport * If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI * will have HttpTokens automatically set to required so that, by default, the * instance requires that IMDSv2 is used when requesting instance metadata. In addition, * HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see ImdsSupportValues */ public Image withImdsSupport(ImdsSupportValues imdsSupport) { this.imdsSupport = imdsSupport.toString(); return this; } /** *

* The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This field * only appears if the AMI was created using CreateImage. *

* * @param sourceInstanceId * The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This * field only appears if the AMI was created using CreateImage. */ public void setSourceInstanceId(String sourceInstanceId) { this.sourceInstanceId = sourceInstanceId; } /** *

* The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This field * only appears if the AMI was created using CreateImage. *

* * @return The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This * field only appears if the AMI was created using CreateImage. */ public String getSourceInstanceId() { return this.sourceInstanceId; } /** *

* The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This field * only appears if the AMI was created using CreateImage. *

* * @param sourceInstanceId * The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This * field only appears if the AMI was created using CreateImage. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withSourceInstanceId(String sourceInstanceId) { setSourceInstanceId(sourceInstanceId); return this; } /** *

* Indicates whether deregistration protection is enabled for the AMI. *

* * @param deregistrationProtection * Indicates whether deregistration protection is enabled for the AMI. */ public void setDeregistrationProtection(String deregistrationProtection) { this.deregistrationProtection = deregistrationProtection; } /** *

* Indicates whether deregistration protection is enabled for the AMI. *

* * @return Indicates whether deregistration protection is enabled for the AMI. */ public String getDeregistrationProtection() { return this.deregistrationProtection; } /** *

* Indicates whether deregistration protection is enabled for the AMI. *

* * @param deregistrationProtection * Indicates whether deregistration protection is enabled for the AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withDeregistrationProtection(String deregistrationProtection) { setDeregistrationProtection(deregistrationProtection); return this; } /** *

* The date and time, in ISO 8601 date-time format, when the AMI was * last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before * that usage is reported. *

* *

* lastLaunchedTime data is available starting April 2017. *

*
* * @param lastLaunchedTime * The date and time, in ISO 8601 date-time format, when the AMI * was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour * delay before that usage is reported.

*

* lastLaunchedTime data is available starting April 2017. *

*/ public void setLastLaunchedTime(String lastLaunchedTime) { this.lastLaunchedTime = lastLaunchedTime; } /** *

* The date and time, in ISO 8601 date-time format, when the AMI was * last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before * that usage is reported. *

* *

* lastLaunchedTime data is available starting April 2017. *

*
* * @return The date and time, in ISO 8601 date-time format, when the * AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a * 24-hour delay before that usage is reported.

*

* lastLaunchedTime data is available starting April 2017. *

*/ public String getLastLaunchedTime() { return this.lastLaunchedTime; } /** *

* The date and time, in ISO 8601 date-time format, when the AMI was * last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before * that usage is reported. *

* *

* lastLaunchedTime data is available starting April 2017. *

*
* * @param lastLaunchedTime * The date and time, in ISO 8601 date-time format, when the AMI * was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour * delay before that usage is reported.

*

* lastLaunchedTime data is available starting April 2017. *

* @return Returns a reference to this object so that method calls can be chained together. */ public Image withLastLaunchedTime(String lastLaunchedTime) { setLastLaunchedTime(lastLaunchedTime); 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 (getArchitecture() != null) sb.append("Architecture: ").append(getArchitecture()).append(","); if (getCreationDate() != null) sb.append("CreationDate: ").append(getCreationDate()).append(","); if (getImageId() != null) sb.append("ImageId: ").append(getImageId()).append(","); if (getImageLocation() != null) sb.append("ImageLocation: ").append(getImageLocation()).append(","); if (getImageType() != null) sb.append("ImageType: ").append(getImageType()).append(","); if (getPublic() != null) sb.append("Public: ").append(getPublic()).append(","); if (getKernelId() != null) sb.append("KernelId: ").append(getKernelId()).append(","); if (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()).append(","); if (getPlatform() != null) sb.append("Platform: ").append(getPlatform()).append(","); if (getPlatformDetails() != null) sb.append("PlatformDetails: ").append(getPlatformDetails()).append(","); if (getUsageOperation() != null) sb.append("UsageOperation: ").append(getUsageOperation()).append(","); if (getProductCodes() != null) sb.append("ProductCodes: ").append(getProductCodes()).append(","); if (getRamdiskId() != null) sb.append("RamdiskId: ").append(getRamdiskId()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getBlockDeviceMappings() != null) sb.append("BlockDeviceMappings: ").append(getBlockDeviceMappings()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getEnaSupport() != null) sb.append("EnaSupport: ").append(getEnaSupport()).append(","); if (getHypervisor() != null) sb.append("Hypervisor: ").append(getHypervisor()).append(","); if (getImageOwnerAlias() != null) sb.append("ImageOwnerAlias: ").append(getImageOwnerAlias()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getRootDeviceName() != null) sb.append("RootDeviceName: ").append(getRootDeviceName()).append(","); if (getRootDeviceType() != null) sb.append("RootDeviceType: ").append(getRootDeviceType()).append(","); if (getSriovNetSupport() != null) sb.append("SriovNetSupport: ").append(getSriovNetSupport()).append(","); if (getStateReason() != null) sb.append("StateReason: ").append(getStateReason()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getVirtualizationType() != null) sb.append("VirtualizationType: ").append(getVirtualizationType()).append(","); if (getBootMode() != null) sb.append("BootMode: ").append(getBootMode()).append(","); if (getTpmSupport() != null) sb.append("TpmSupport: ").append(getTpmSupport()).append(","); if (getDeprecationTime() != null) sb.append("DeprecationTime: ").append(getDeprecationTime()).append(","); if (getImdsSupport() != null) sb.append("ImdsSupport: ").append(getImdsSupport()).append(","); if (getSourceInstanceId() != null) sb.append("SourceInstanceId: ").append(getSourceInstanceId()).append(","); if (getDeregistrationProtection() != null) sb.append("DeregistrationProtection: ").append(getDeregistrationProtection()).append(","); if (getLastLaunchedTime() != null) sb.append("LastLaunchedTime: ").append(getLastLaunchedTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Image == false) return false; Image other = (Image) obj; if (other.getArchitecture() == null ^ this.getArchitecture() == null) return false; if (other.getArchitecture() != null && other.getArchitecture().equals(this.getArchitecture()) == false) return false; if (other.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false) return false; if (other.getImageId() == null ^ this.getImageId() == null) return false; if (other.getImageId() != null && other.getImageId().equals(this.getImageId()) == false) return false; if (other.getImageLocation() == null ^ this.getImageLocation() == null) return false; if (other.getImageLocation() != null && other.getImageLocation().equals(this.getImageLocation()) == false) return false; if (other.getImageType() == null ^ this.getImageType() == null) return false; if (other.getImageType() != null && other.getImageType().equals(this.getImageType()) == false) return false; if (other.getPublic() == null ^ this.getPublic() == null) return false; if (other.getPublic() != null && other.getPublic().equals(this.getPublic()) == false) return false; if (other.getKernelId() == null ^ this.getKernelId() == null) return false; if (other.getKernelId() != null && other.getKernelId().equals(this.getKernelId()) == false) return false; if (other.getOwnerId() == null ^ this.getOwnerId() == null) return false; if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == false) return false; if (other.getPlatform() == null ^ this.getPlatform() == null) return false; if (other.getPlatform() != null && other.getPlatform().equals(this.getPlatform()) == false) return false; if (other.getPlatformDetails() == null ^ this.getPlatformDetails() == null) return false; if (other.getPlatformDetails() != null && other.getPlatformDetails().equals(this.getPlatformDetails()) == false) return false; if (other.getUsageOperation() == null ^ this.getUsageOperation() == null) return false; if (other.getUsageOperation() != null && other.getUsageOperation().equals(this.getUsageOperation()) == false) return false; if (other.getProductCodes() == null ^ this.getProductCodes() == null) return false; if (other.getProductCodes() != null && other.getProductCodes().equals(this.getProductCodes()) == false) return false; if (other.getRamdiskId() == null ^ this.getRamdiskId() == null) return false; if (other.getRamdiskId() != null && other.getRamdiskId().equals(this.getRamdiskId()) == 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.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == null) return false; if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals(this.getBlockDeviceMappings()) == 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.getEnaSupport() == null ^ this.getEnaSupport() == null) return false; if (other.getEnaSupport() != null && other.getEnaSupport().equals(this.getEnaSupport()) == false) return false; if (other.getHypervisor() == null ^ this.getHypervisor() == null) return false; if (other.getHypervisor() != null && other.getHypervisor().equals(this.getHypervisor()) == false) return false; if (other.getImageOwnerAlias() == null ^ this.getImageOwnerAlias() == null) return false; if (other.getImageOwnerAlias() != null && other.getImageOwnerAlias().equals(this.getImageOwnerAlias()) == 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.getRootDeviceName() == null ^ this.getRootDeviceName() == null) return false; if (other.getRootDeviceName() != null && other.getRootDeviceName().equals(this.getRootDeviceName()) == false) return false; if (other.getRootDeviceType() == null ^ this.getRootDeviceType() == null) return false; if (other.getRootDeviceType() != null && other.getRootDeviceType().equals(this.getRootDeviceType()) == false) return false; if (other.getSriovNetSupport() == null ^ this.getSriovNetSupport() == null) return false; if (other.getSriovNetSupport() != null && other.getSriovNetSupport().equals(this.getSriovNetSupport()) == false) return false; if (other.getStateReason() == null ^ this.getStateReason() == null) return false; if (other.getStateReason() != null && other.getStateReason().equals(this.getStateReason()) == 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.getVirtualizationType() == null ^ this.getVirtualizationType() == null) return false; if (other.getVirtualizationType() != null && other.getVirtualizationType().equals(this.getVirtualizationType()) == false) return false; if (other.getBootMode() == null ^ this.getBootMode() == null) return false; if (other.getBootMode() != null && other.getBootMode().equals(this.getBootMode()) == false) return false; if (other.getTpmSupport() == null ^ this.getTpmSupport() == null) return false; if (other.getTpmSupport() != null && other.getTpmSupport().equals(this.getTpmSupport()) == false) return false; if (other.getDeprecationTime() == null ^ this.getDeprecationTime() == null) return false; if (other.getDeprecationTime() != null && other.getDeprecationTime().equals(this.getDeprecationTime()) == false) return false; if (other.getImdsSupport() == null ^ this.getImdsSupport() == null) return false; if (other.getImdsSupport() != null && other.getImdsSupport().equals(this.getImdsSupport()) == false) return false; if (other.getSourceInstanceId() == null ^ this.getSourceInstanceId() == null) return false; if (other.getSourceInstanceId() != null && other.getSourceInstanceId().equals(this.getSourceInstanceId()) == false) return false; if (other.getDeregistrationProtection() == null ^ this.getDeregistrationProtection() == null) return false; if (other.getDeregistrationProtection() != null && other.getDeregistrationProtection().equals(this.getDeregistrationProtection()) == false) return false; if (other.getLastLaunchedTime() == null ^ this.getLastLaunchedTime() == null) return false; if (other.getLastLaunchedTime() != null && other.getLastLaunchedTime().equals(this.getLastLaunchedTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArchitecture() == null) ? 0 : getArchitecture().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode()); hashCode = prime * hashCode + ((getImageLocation() == null) ? 0 : getImageLocation().hashCode()); hashCode = prime * hashCode + ((getImageType() == null) ? 0 : getImageType().hashCode()); hashCode = prime * hashCode + ((getPublic() == null) ? 0 : getPublic().hashCode()); hashCode = prime * hashCode + ((getKernelId() == null) ? 0 : getKernelId().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); hashCode = prime * hashCode + ((getPlatformDetails() == null) ? 0 : getPlatformDetails().hashCode()); hashCode = prime * hashCode + ((getUsageOperation() == null) ? 0 : getUsageOperation().hashCode()); hashCode = prime * hashCode + ((getProductCodes() == null) ? 0 : getProductCodes().hashCode()); hashCode = prime * hashCode + ((getRamdiskId() == null) ? 0 : getRamdiskId().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getEnaSupport() == null) ? 0 : getEnaSupport().hashCode()); hashCode = prime * hashCode + ((getHypervisor() == null) ? 0 : getHypervisor().hashCode()); hashCode = prime * hashCode + ((getImageOwnerAlias() == null) ? 0 : getImageOwnerAlias().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getRootDeviceName() == null) ? 0 : getRootDeviceName().hashCode()); hashCode = prime * hashCode + ((getRootDeviceType() == null) ? 0 : getRootDeviceType().hashCode()); hashCode = prime * hashCode + ((getSriovNetSupport() == null) ? 0 : getSriovNetSupport().hashCode()); hashCode = prime * hashCode + ((getStateReason() == null) ? 0 : getStateReason().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getVirtualizationType() == null) ? 0 : getVirtualizationType().hashCode()); hashCode = prime * hashCode + ((getBootMode() == null) ? 0 : getBootMode().hashCode()); hashCode = prime * hashCode + ((getTpmSupport() == null) ? 0 : getTpmSupport().hashCode()); hashCode = prime * hashCode + ((getDeprecationTime() == null) ? 0 : getDeprecationTime().hashCode()); hashCode = prime * hashCode + ((getImdsSupport() == null) ? 0 : getImdsSupport().hashCode()); hashCode = prime * hashCode + ((getSourceInstanceId() == null) ? 0 : getSourceInstanceId().hashCode()); hashCode = prime * hashCode + ((getDeregistrationProtection() == null) ? 0 : getDeregistrationProtection().hashCode()); hashCode = prime * hashCode + ((getLastLaunchedTime() == null) ? 0 : getLastLaunchedTime().hashCode()); return hashCode; } @Override public Image clone() { try { return (Image) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy