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

* 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; } /** * @param bootMode */ public void setBootMode(String bootMode) { this.bootMode = bootMode; } /** * @return */ public String getBootMode() { return this.bootMode; } /** * @param bootMode * @return Returns a reference to this object so that method calls can be chained together. */ public ImageAttribute withBootMode(String bootMode) { setBootMode(bootMode); 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()); 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; 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()); 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