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 SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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;

/**
 * 

* Describes an image. *

*/ public class Image implements Serializable, Cloneable { /** *

* The ID of the AMI. *

*/ private String imageId; /** *

* The location of the AMI. *

*/ private String imageLocation; /** *

* 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; /** *

* The AWS account ID of the image owner. *

*/ private String ownerId; /** *

* The date and time the image was created. *

*/ private String creationDate; /** *

* 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; /** *

* Any product codes associated with the AMI. *

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

* The architecture of the image. *

*/ private String architecture; /** *

* The type of image. *

*/ private String imageType; /** *

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

*/ private String kernelId; /** *

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

*/ private String ramdiskId; /** *

* The value is Windows for Windows AMIs; otherwise blank. *

*/ private String platform; /** *

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

*/ private String sriovNetSupport; /** *

* Specifies whether enhanced networking with ENA is enabled. *

*/ private Boolean enaSupport; /** *

* The reason for the state change. *

*/ private StateReason stateReason; /** *

* The AWS account alias (for example, amazon, * self) or the AWS account ID of the AMI owner. *

*/ private String imageOwnerAlias; /** *

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

*/ private String name; /** *

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

*/ private String description; /** *

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

*/ private String rootDeviceType; /** *

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

*/ private String rootDeviceName; /** *

* Any block device mapping entries. *

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

* The type of virtualization of the AMI. *

*/ private String virtualizationType; /** *

* Any tags assigned to the image. *

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

* The hypervisor type of the image. *

*/ private String hypervisor; /** *

* 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 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) { this.state = state.toString(); } /** *

* 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) { setState(state); return this; } /** *

* The AWS account ID of the image owner. *

* * @param ownerId * The AWS account ID of the image owner. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** *

* The AWS account ID of the image owner. *

* * @return The AWS account ID of the image owner. */ public String getOwnerId() { return this.ownerId; } /** *

* The AWS account ID of the image owner. *

* * @param ownerId * The AWS account ID of the image owner. * @return Returns a reference to this object so that method calls can be * chained together. */ public Image withOwnerId(String ownerId) { setOwnerId(ownerId); 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; } /** *

* 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; } /** *

* 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 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) { this.architecture = architecture.toString(); } /** *

* 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) { setArchitecture(architecture); 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) { this.imageType = imageType.toString(); } /** *

* 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) { setImageType(imageType); return this; } /** *

* 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 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 value is Windows for Windows AMIs; otherwise blank. *

* * @param platform * The value is Windows for Windows AMIs; otherwise * blank. * @see PlatformValues */ public void setPlatform(String platform) { this.platform = platform; } /** *

* The value is Windows for Windows AMIs; otherwise blank. *

* * @return The value is Windows for Windows AMIs; otherwise * blank. * @see PlatformValues */ public String getPlatform() { return this.platform; } /** *

* The value is Windows for Windows AMIs; otherwise blank. *

* * @param platform * The value is Windows for Windows AMIs; otherwise * 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; } /** *

* The value is Windows for Windows AMIs; otherwise blank. *

* * @param platform * The value is Windows for Windows AMIs; otherwise * blank. * @see PlatformValues */ public void setPlatform(PlatformValues platform) { this.platform = platform.toString(); } /** *

* The value is Windows for Windows AMIs; otherwise blank. *

* * @param platform * The value is Windows for Windows AMIs; otherwise * blank. * @return Returns a reference to this object so that method calls can be * chained together. * @see PlatformValues */ public Image withPlatform(PlatformValues platform) { setPlatform(platform); 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; } /** *

* 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 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; } /** *

* The AWS account alias (for example, amazon, * self) or the AWS account ID of the AMI owner. *

* * @param imageOwnerAlias * The AWS account alias (for example, amazon, * self) or the AWS account ID of the AMI owner. */ public void setImageOwnerAlias(String imageOwnerAlias) { this.imageOwnerAlias = imageOwnerAlias; } /** *

* The AWS account alias (for example, amazon, * self) or the AWS account ID of the AMI owner. *

* * @return The AWS account alias (for example, amazon, * self) or the AWS account ID of the AMI owner. */ public String getImageOwnerAlias() { return this.imageOwnerAlias; } /** *

* The AWS account alias (for example, amazon, * self) or the AWS account ID of the AMI owner. *

* * @param imageOwnerAlias * The AWS account alias (for example, amazon, * self) or the AWS account ID of the AMI owner. * @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 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; } /** *

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

* * @param rootDeviceType * The type of root device used by the AMI. The AMI can use an 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 EBS volume or * an instance store volume. *

* * @return The type of root device used by the AMI. The AMI can use an 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 EBS volume or * an instance store volume. *

* * @param rootDeviceType * The type of root device used by the AMI. The AMI can use an 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 EBS volume or * an instance store volume. *

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

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

* * @param rootDeviceType * The type of root device used by the AMI. The AMI can use an 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) { setRootDeviceType(rootDeviceType); return this; } /** *

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

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

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

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

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

* * @param rootDeviceName * The device name of the root device (for example, * /dev/sda1 or /dev/xvda). * @return Returns a reference to this object so that method calls can be * chained together. */ public Image withRootDeviceName(String rootDeviceName) { setRootDeviceName(rootDeviceName); 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 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) { this.virtualizationType = virtualizationType.toString(); } /** *

* 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) { setVirtualizationType(virtualizationType); 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 hypervisor type of the image. *

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

* The hypervisor type of the image. *

* * @return The hypervisor type of the image. * @see HypervisorType */ public String getHypervisor() { return this.hypervisor; } /** *

* The hypervisor type of the image. *

* * @param hypervisor * The hypervisor type of the image. * @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. *

* * @param hypervisor * The hypervisor type of the image. * @see HypervisorType */ public void setHypervisor(HypervisorType hypervisor) { this.hypervisor = hypervisor.toString(); } /** *

* The hypervisor type of the image. *

* * @param hypervisor * The hypervisor type of the image. * @return Returns a reference to this object so that method calls can be * chained together. * @see HypervisorType */ public Image withHypervisor(HypervisorType hypervisor) { setHypervisor(hypervisor); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @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: " + getImageId() + ","); if (getImageLocation() != null) sb.append("ImageLocation: " + getImageLocation() + ","); if (getState() != null) sb.append("State: " + getState() + ","); if (getOwnerId() != null) sb.append("OwnerId: " + getOwnerId() + ","); if (getCreationDate() != null) sb.append("CreationDate: " + getCreationDate() + ","); if (getPublic() != null) sb.append("Public: " + getPublic() + ","); if (getProductCodes() != null) sb.append("ProductCodes: " + getProductCodes() + ","); if (getArchitecture() != null) sb.append("Architecture: " + getArchitecture() + ","); if (getImageType() != null) sb.append("ImageType: " + getImageType() + ","); if (getKernelId() != null) sb.append("KernelId: " + getKernelId() + ","); if (getRamdiskId() != null) sb.append("RamdiskId: " + getRamdiskId() + ","); if (getPlatform() != null) sb.append("Platform: " + getPlatform() + ","); if (getSriovNetSupport() != null) sb.append("SriovNetSupport: " + getSriovNetSupport() + ","); if (getEnaSupport() != null) sb.append("EnaSupport: " + getEnaSupport() + ","); if (getStateReason() != null) sb.append("StateReason: " + getStateReason() + ","); if (getImageOwnerAlias() != null) sb.append("ImageOwnerAlias: " + getImageOwnerAlias() + ","); if (getName() != null) sb.append("Name: " + getName() + ","); if (getDescription() != null) sb.append("Description: " + getDescription() + ","); if (getRootDeviceType() != null) sb.append("RootDeviceType: " + getRootDeviceType() + ","); if (getRootDeviceName() != null) sb.append("RootDeviceName: " + getRootDeviceName() + ","); if (getBlockDeviceMappings() != null) sb.append("BlockDeviceMappings: " + getBlockDeviceMappings() + ","); if (getVirtualizationType() != null) sb.append("VirtualizationType: " + getVirtualizationType() + ","); if (getTags() != null) sb.append("Tags: " + getTags() + ","); if (getHypervisor() != null) sb.append("Hypervisor: " + getHypervisor()); 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.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.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == 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.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == 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.getProductCodes() == null ^ this.getProductCodes() == null) return false; if (other.getProductCodes() != null && other.getProductCodes().equals(this.getProductCodes()) == false) return false; if (other.getArchitecture() == null ^ this.getArchitecture() == null) return false; if (other.getArchitecture() != null && other.getArchitecture().equals(this.getArchitecture()) == 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.getKernelId() == null ^ this.getKernelId() == null) return false; if (other.getKernelId() != null && other.getKernelId().equals(this.getKernelId()) == 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.getPlatform() == null ^ this.getPlatform() == null) return false; if (other.getPlatform() != null && other.getPlatform().equals(this.getPlatform()) == 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.getEnaSupport() == null ^ this.getEnaSupport() == null) return false; if (other.getEnaSupport() != null && other.getEnaSupport().equals(this.getEnaSupport()) == 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.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.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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.getRootDeviceName() == null ^ this.getRootDeviceName() == null) return false; if (other.getRootDeviceName() != null && other.getRootDeviceName().equals(this.getRootDeviceName()) == 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.getVirtualizationType() == null ^ this.getVirtualizationType() == null) return false; if (other.getVirtualizationType() != null && other.getVirtualizationType().equals( this.getVirtualizationType()) == 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.getHypervisor() == null ^ this.getHypervisor() == null) return false; if (other.getHypervisor() != null && other.getHypervisor().equals(this.getHypervisor()) == 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 + ((getImageLocation() == null) ? 0 : getImageLocation() .hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate() .hashCode()); hashCode = prime * hashCode + ((getPublic() == null) ? 0 : getPublic().hashCode()); hashCode = prime * hashCode + ((getProductCodes() == null) ? 0 : getProductCodes() .hashCode()); hashCode = prime * hashCode + ((getArchitecture() == null) ? 0 : getArchitecture() .hashCode()); hashCode = prime * hashCode + ((getImageType() == null) ? 0 : getImageType().hashCode()); hashCode = prime * hashCode + ((getKernelId() == null) ? 0 : getKernelId().hashCode()); hashCode = prime * hashCode + ((getRamdiskId() == null) ? 0 : getRamdiskId().hashCode()); hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); hashCode = prime * hashCode + ((getSriovNetSupport() == null) ? 0 : getSriovNetSupport() .hashCode()); hashCode = prime * hashCode + ((getEnaSupport() == null) ? 0 : getEnaSupport().hashCode()); hashCode = prime * hashCode + ((getStateReason() == null) ? 0 : getStateReason().hashCode()); hashCode = prime * hashCode + ((getImageOwnerAlias() == null) ? 0 : getImageOwnerAlias() .hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRootDeviceType() == null) ? 0 : getRootDeviceType() .hashCode()); hashCode = prime * hashCode + ((getRootDeviceName() == null) ? 0 : getRootDeviceName() .hashCode()); hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); hashCode = prime * hashCode + ((getVirtualizationType() == null) ? 0 : getVirtualizationType().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getHypervisor() == null) ? 0 : getHypervisor().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 - 2025 Weber Informatics LLC | Privacy Policy