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

com.amazonaws.services.ec2.model.ImageAttribute 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 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.ec2.model;

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

/**
 * 

* Describes an image attribute. *

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

* The block device mapping entries. *

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

* The ID of the AMI. *

*/ private String imageId; /** *

* The launch permissions. *

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

* The product codes. *

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

* A description for the AMI. *

*/ private String description; /** *

* The kernel ID. *

*/ private String kernelId; /** *

* The RAM disk ID. *

*/ private String ramdiskId; /** *

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

*/ private String sriovNetSupport; /** *

* The boot mode. *

*/ private String bootMode; /** *

* If the image is configured for NitroTPM support, the value is v2.0. *

*/ private String tpmSupport; /** *

* Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData * command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see * UEFI Secure Boot in the * Amazon EC2 User Guide. *

*/ private String uefiData; /** *

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

* 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 block device mapping entries. *

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

* The block device mapping entries. *

* * @param blockDeviceMappings * The 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); } /** *

* The 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 * The block device mapping entries. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute 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; } /** *

* The block device mapping entries. *

* * @param blockDeviceMappings * The block device mapping entries. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute withBlockDeviceMappings(java.util.Collection blockDeviceMappings) { setBlockDeviceMappings(blockDeviceMappings); 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 ImageAttribute withImageId(String imageId) { setImageId(imageId); return this; } /** *

* The launch permissions. *

* * @return The launch permissions. */ public java.util.List getLaunchPermissions() { if (launchPermissions == null) { launchPermissions = new com.amazonaws.internal.SdkInternalList(); } return launchPermissions; } /** *

* The launch permissions. *

* * @param launchPermissions * The launch permissions. */ public void setLaunchPermissions(java.util.Collection launchPermissions) { if (launchPermissions == null) { this.launchPermissions = null; return; } this.launchPermissions = new com.amazonaws.internal.SdkInternalList(launchPermissions); } /** *

* The launch permissions. *

*

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

* * @param launchPermissions * The launch permissions. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute withLaunchPermissions(LaunchPermission... launchPermissions) { if (this.launchPermissions == null) { setLaunchPermissions(new com.amazonaws.internal.SdkInternalList(launchPermissions.length)); } for (LaunchPermission ele : launchPermissions) { this.launchPermissions.add(ele); } return this; } /** *

* The launch permissions. *

* * @param launchPermissions * The launch permissions. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute withLaunchPermissions(java.util.Collection launchPermissions) { setLaunchPermissions(launchPermissions); return this; } /** *

* The product codes. *

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

* The product codes. *

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

* The product codes. *

*

* 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 * The product codes. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute 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; } /** *

* The product codes. *

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

* A description for the AMI. *

* * @param description * A description for the AMI. */ public void setDescription(String description) { this.description = description; } /** *

* A description for the AMI. *

* * @return A description for the AMI. */ public String getDescription() { return this.description; } /** *

* A description for the AMI. *

* * @param description * A description for the AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute withDescription(String description) { setDescription(description); return this; } /** *

* The kernel ID. *

* * @param kernelId * The kernel ID. */ public void setKernelId(String kernelId) { this.kernelId = kernelId; } /** *

* The kernel ID. *

* * @return The kernel ID. */ public String getKernelId() { return this.kernelId; } /** *

* The kernel ID. *

* * @param kernelId * The kernel ID. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute withKernelId(String kernelId) { setKernelId(kernelId); return this; } /** *

* The RAM disk ID. *

* * @param ramdiskId * The RAM disk ID. */ public void setRamdiskId(String ramdiskId) { this.ramdiskId = ramdiskId; } /** *

* The RAM disk ID. *

* * @return The RAM disk ID. */ public String getRamdiskId() { return this.ramdiskId; } /** *

* The RAM disk ID. *

* * @param ramdiskId * The RAM disk ID. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute withRamdiskId(String ramdiskId) { setRamdiskId(ramdiskId); return this; } /** *

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

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

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

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

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

* * @param sriovNetSupport * Indicates 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 ImageAttribute withSriovNetSupport(String sriovNetSupport) { setSriovNetSupport(sriovNetSupport); return this; } /** *

* The boot mode. *

* * @param bootMode * The boot mode. */ public void setBootMode(String bootMode) { this.bootMode = bootMode; } /** *

* The boot mode. *

* * @return The boot mode. */ public String getBootMode() { return this.bootMode; } /** *

* The boot mode. *

* * @param bootMode * The boot mode. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute withBootMode(String bootMode) { setBootMode(bootMode); return this; } /** *

* If the image is configured for NitroTPM support, the value is v2.0. *

* * @param tpmSupport * If the image is configured for NitroTPM support, the value is v2.0. */ public void setTpmSupport(String tpmSupport) { this.tpmSupport = tpmSupport; } /** *

* If the image is configured for NitroTPM support, the value is v2.0. *

* * @return If the image is configured for NitroTPM support, the value is v2.0. */ public String getTpmSupport() { return this.tpmSupport; } /** *

* If the image is configured for NitroTPM support, the value is v2.0. *

* * @param tpmSupport * If the image is configured for NitroTPM support, the value is v2.0. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute withTpmSupport(String tpmSupport) { setTpmSupport(tpmSupport); return this; } /** *

* Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData * command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see * UEFI Secure Boot in the * Amazon EC2 User Guide. *

* * @param uefiData * Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more * information, see UEFI * Secure Boot in the Amazon EC2 User Guide. */ public void setUefiData(String uefiData) { this.uefiData = uefiData; } /** *

* Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData * command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see * UEFI Secure Boot in the * Amazon EC2 User Guide. *

* * @return Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData * command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more * information, see UEFI * Secure Boot in the Amazon EC2 User Guide. */ public String getUefiData() { return this.uefiData; } /** *

* Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData * command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see * UEFI Secure Boot in the * Amazon EC2 User Guide. *

* * @param uefiData * Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more * information, see UEFI * Secure Boot in the Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute withUefiData(String uefiData) { setUefiData(uefiData); 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 ImageAttribute withLastLaunchedTime(String lastLaunchedTime) { setLastLaunchedTime(lastLaunchedTime); 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. */ 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. */ 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. */ public ImageAttribute withImdsSupport(String imdsSupport) { setImdsSupport(imdsSupport); 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 (getBlockDeviceMappings() != null) sb.append("BlockDeviceMappings: ").append(getBlockDeviceMappings()).append(","); if (getImageId() != null) sb.append("ImageId: ").append(getImageId()).append(","); if (getLaunchPermissions() != null) sb.append("LaunchPermissions: ").append(getLaunchPermissions()).append(","); if (getProductCodes() != null) sb.append("ProductCodes: ").append(getProductCodes()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getKernelId() != null) sb.append("KernelId: ").append(getKernelId()).append(","); if (getRamdiskId() != null) sb.append("RamdiskId: ").append(getRamdiskId()).append(","); if (getSriovNetSupport() != null) sb.append("SriovNetSupport: ").append(getSriovNetSupport()).append(","); if (getBootMode() != null) sb.append("BootMode: ").append(getBootMode()).append(","); if (getTpmSupport() != null) sb.append("TpmSupport: ").append(getTpmSupport()).append(","); if (getUefiData() != null) sb.append("UefiData: ").append(getUefiData()).append(","); if (getLastLaunchedTime() != null) sb.append("LastLaunchedTime: ").append(getLastLaunchedTime()).append(","); if (getImdsSupport() != null) sb.append("ImdsSupport: ").append(getImdsSupport()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ImageAttribute == false) return false; ImageAttribute other = (ImageAttribute) obj; if (other.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == null) return false; if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals(this.getBlockDeviceMappings()) == 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.getLaunchPermissions() == null ^ this.getLaunchPermissions() == null) return false; if (other.getLaunchPermissions() != null && other.getLaunchPermissions().equals(this.getLaunchPermissions()) == 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.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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.getSriovNetSupport() == null ^ this.getSriovNetSupport() == null) return false; if (other.getSriovNetSupport() != null && other.getSriovNetSupport().equals(this.getSriovNetSupport()) == 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.getUefiData() == null ^ this.getUefiData() == null) return false; if (other.getUefiData() != null && other.getUefiData().equals(this.getUefiData()) == false) return false; if (other.getLastLaunchedTime() == null ^ this.getLastLaunchedTime() == null) return false; if (other.getLastLaunchedTime() != null && other.getLastLaunchedTime().equals(this.getLastLaunchedTime()) == false) return false; if (other.getImdsSupport() == null ^ this.getImdsSupport() == null) return false; if (other.getImdsSupport() != null && other.getImdsSupport().equals(this.getImdsSupport()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode()); hashCode = prime * hashCode + ((getLaunchPermissions() == null) ? 0 : getLaunchPermissions().hashCode()); hashCode = prime * hashCode + ((getProductCodes() == null) ? 0 : getProductCodes().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getKernelId() == null) ? 0 : getKernelId().hashCode()); hashCode = prime * hashCode + ((getRamdiskId() == null) ? 0 : getRamdiskId().hashCode()); hashCode = prime * hashCode + ((getSriovNetSupport() == null) ? 0 : getSriovNetSupport().hashCode()); hashCode = prime * hashCode + ((getBootMode() == null) ? 0 : getBootMode().hashCode()); hashCode = prime * hashCode + ((getTpmSupport() == null) ? 0 : getTpmSupport().hashCode()); hashCode = prime * hashCode + ((getUefiData() == null) ? 0 : getUefiData().hashCode()); hashCode = prime * hashCode + ((getLastLaunchedTime() == null) ? 0 : getLastLaunchedTime().hashCode()); hashCode = prime * hashCode + ((getImdsSupport() == null) ? 0 : getImdsSupport().hashCode()); return hashCode; } @Override public ImageAttribute clone() { try { return (ImageAttribute) 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