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

com.amazonaws.services.ec2.model.LaunchSpecification 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 the launch specification for an instance. *

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

* The ID of the AMI. *

*/ private String imageId; /** *

* The name of the key pair. *

*/ private String keyName; /** *

* The user data to make available to the instances. If you are using an AWS * SDK or command line tool, Base64-encoding is performed for you, and you * can load the text from a file. Otherwise, you must provide Base64-encoded * text. *

*/ private String userData; /** *

* Deprecated. *

*/ private String addressingType; /** *

* The instance type. *

*/ private String instanceType; /** *

* The placement information for the instance. *

*/ private SpotPlacement placement; /** *

* The ID of the kernel. *

*/ private String kernelId; /** *

* The ID of the RAM disk. *

*/ private String ramdiskId; /** *

* One or more block device mapping entries. *

*

* Although you can specify encrypted EBS volumes in this block device * mapping for your Spot Instances, these volumes are not encrypted. *

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

* The ID of the subnet in which to launch the instance. *

*/ private String subnetId; /** *

* One or more network interfaces. *

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

* The IAM instance profile. *

*/ private IamInstanceProfileSpecification iamInstanceProfile; /** *

* Indicates whether the instance is optimized for EBS I/O. This * optimization provides dedicated throughput to Amazon EBS and an optimized * configuration stack to provide optimal EBS I/O performance. This * optimization isn't available with all instance types. Additional usage * charges apply when using an EBS Optimized instance. *

*

* Default: false *

*/ private Boolean ebsOptimized; /** *

* One or more security groups. When requesting instances in a VPC, you must * specify the IDs of the security groups. When requesting instances in * EC2-Classic, you can specify the names or the IDs of the security groups. *

*/ private com.amazonaws.internal.SdkInternalList allSecurityGroups; private Boolean monitoringEnabled; /** *

* One or more security group names. *

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

* 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 LaunchSpecification withImageId(String imageId) { setImageId(imageId); return this; } /** *

* The name of the key pair. *

* * @param keyName * The name of the key pair. */ public void setKeyName(String keyName) { this.keyName = keyName; } /** *

* The name of the key pair. *

* * @return The name of the key pair. */ public String getKeyName() { return this.keyName; } /** *

* The name of the key pair. *

* * @param keyName * The name of the key pair. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withKeyName(String keyName) { setKeyName(keyName); return this; } /** *

* The user data to make available to the instances. If you are using an AWS * SDK or command line tool, Base64-encoding is performed for you, and you * can load the text from a file. Otherwise, you must provide Base64-encoded * text. *

* * @param userData * The user data to make available to the instances. If you are using * an AWS SDK or command line tool, Base64-encoding is performed for * you, and you can load the text from a file. Otherwise, you must * provide Base64-encoded text. */ public void setUserData(String userData) { this.userData = userData; } /** *

* The user data to make available to the instances. If you are using an AWS * SDK or command line tool, Base64-encoding is performed for you, and you * can load the text from a file. Otherwise, you must provide Base64-encoded * text. *

* * @return The user data to make available to the instances. If you are * using an AWS SDK or command line tool, Base64-encoding is * performed for you, and you can load the text from a file. * Otherwise, you must provide Base64-encoded text. */ public String getUserData() { return this.userData; } /** *

* The user data to make available to the instances. If you are using an AWS * SDK or command line tool, Base64-encoding is performed for you, and you * can load the text from a file. Otherwise, you must provide Base64-encoded * text. *

* * @param userData * The user data to make available to the instances. If you are using * an AWS SDK or command line tool, Base64-encoding is performed for * you, and you can load the text from a file. Otherwise, you must * provide Base64-encoded text. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withUserData(String userData) { setUserData(userData); return this; } /** *

* Deprecated. *

* * @param addressingType * Deprecated. */ public void setAddressingType(String addressingType) { this.addressingType = addressingType; } /** *

* Deprecated. *

* * @return Deprecated. */ public String getAddressingType() { return this.addressingType; } /** *

* Deprecated. *

* * @param addressingType * Deprecated. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withAddressingType(String addressingType) { setAddressingType(addressingType); return this; } /** *

* The instance type. *

* * @param instanceType * The instance type. * @see InstanceType */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** *

* The instance type. *

* * @return The instance type. * @see InstanceType */ public String getInstanceType() { return this.instanceType; } /** *

* The instance type. *

* * @param instanceType * The instance type. * @return Returns a reference to this object so that method calls can be * chained together. * @see InstanceType */ public LaunchSpecification withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *

* The instance type. *

* * @param instanceType * The instance type. * @see InstanceType */ public void setInstanceType(InstanceType instanceType) { this.instanceType = instanceType.toString(); } /** *

* The instance type. *

* * @param instanceType * The instance type. * @return Returns a reference to this object so that method calls can be * chained together. * @see InstanceType */ public LaunchSpecification withInstanceType(InstanceType instanceType) { setInstanceType(instanceType); return this; } /** *

* The placement information for the instance. *

* * @param placement * The placement information for the instance. */ public void setPlacement(SpotPlacement placement) { this.placement = placement; } /** *

* The placement information for the instance. *

* * @return The placement information for the instance. */ public SpotPlacement getPlacement() { return this.placement; } /** *

* The placement information for the instance. *

* * @param placement * The placement information for the instance. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withPlacement(SpotPlacement placement) { setPlacement(placement); return this; } /** *

* The ID of the kernel. *

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

* The ID of the kernel. *

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

* The ID of the kernel. *

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

* The ID of the RAM disk. *

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

* The ID of the RAM disk. *

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

* The ID of the RAM disk. *

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

* One or more block device mapping entries. *

*

* Although you can specify encrypted EBS volumes in this block device * mapping for your Spot Instances, these volumes are not encrypted. *

* * @return One or more block device mapping entries.

*

* Although you can specify encrypted EBS volumes in this block * device mapping for your Spot Instances, these volumes are not * encrypted. */ public java.util.List getBlockDeviceMappings() { if (blockDeviceMappings == null) { blockDeviceMappings = new com.amazonaws.internal.SdkInternalList(); } return blockDeviceMappings; } /** *

* One or more block device mapping entries. *

*

* Although you can specify encrypted EBS volumes in this block device * mapping for your Spot Instances, these volumes are not encrypted. *

* * @param blockDeviceMappings * One or more block device mapping entries.

*

* Although you can specify encrypted EBS volumes in this block * device mapping for your Spot Instances, these volumes are not * encrypted. */ public void setBlockDeviceMappings( java.util.Collection blockDeviceMappings) { if (blockDeviceMappings == null) { this.blockDeviceMappings = null; return; } this.blockDeviceMappings = new com.amazonaws.internal.SdkInternalList( blockDeviceMappings); } /** *

* One or more block device mapping entries. *

*

* Although you can specify encrypted EBS volumes in this block device * mapping for your Spot Instances, these volumes are not encrypted. *

*

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

*

* Although you can specify encrypted EBS volumes in this block * device mapping for your Spot Instances, these volumes are not * encrypted. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification 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; } /** *

* One or more block device mapping entries. *

*

* Although you can specify encrypted EBS volumes in this block device * mapping for your Spot Instances, these volumes are not encrypted. *

* * @param blockDeviceMappings * One or more block device mapping entries.

*

* Although you can specify encrypted EBS volumes in this block * device mapping for your Spot Instances, these volumes are not * encrypted. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withBlockDeviceMappings( java.util.Collection blockDeviceMappings) { setBlockDeviceMappings(blockDeviceMappings); return this; } /** *

* The ID of the subnet in which to launch the instance. *

* * @param subnetId * The ID of the subnet in which to launch the instance. */ public void setSubnetId(String subnetId) { this.subnetId = subnetId; } /** *

* The ID of the subnet in which to launch the instance. *

* * @return The ID of the subnet in which to launch the instance. */ public String getSubnetId() { return this.subnetId; } /** *

* The ID of the subnet in which to launch the instance. *

* * @param subnetId * The ID of the subnet in which to launch the instance. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withSubnetId(String subnetId) { setSubnetId(subnetId); return this; } /** *

* One or more network interfaces. *

* * @return One or more network interfaces. */ public java.util.List getNetworkInterfaces() { if (networkInterfaces == null) { networkInterfaces = new com.amazonaws.internal.SdkInternalList(); } return networkInterfaces; } /** *

* One or more network interfaces. *

* * @param networkInterfaces * One or more network interfaces. */ public void setNetworkInterfaces( java.util.Collection networkInterfaces) { if (networkInterfaces == null) { this.networkInterfaces = null; return; } this.networkInterfaces = new com.amazonaws.internal.SdkInternalList( networkInterfaces); } /** *

* One or more network interfaces. *

*

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

* * @param networkInterfaces * One or more network interfaces. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withNetworkInterfaces( InstanceNetworkInterfaceSpecification... networkInterfaces) { if (this.networkInterfaces == null) { setNetworkInterfaces(new com.amazonaws.internal.SdkInternalList( networkInterfaces.length)); } for (InstanceNetworkInterfaceSpecification ele : networkInterfaces) { this.networkInterfaces.add(ele); } return this; } /** *

* One or more network interfaces. *

* * @param networkInterfaces * One or more network interfaces. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withNetworkInterfaces( java.util.Collection networkInterfaces) { setNetworkInterfaces(networkInterfaces); return this; } /** *

* The IAM instance profile. *

* * @param iamInstanceProfile * The IAM instance profile. */ public void setIamInstanceProfile( IamInstanceProfileSpecification iamInstanceProfile) { this.iamInstanceProfile = iamInstanceProfile; } /** *

* The IAM instance profile. *

* * @return The IAM instance profile. */ public IamInstanceProfileSpecification getIamInstanceProfile() { return this.iamInstanceProfile; } /** *

* The IAM instance profile. *

* * @param iamInstanceProfile * The IAM instance profile. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withIamInstanceProfile( IamInstanceProfileSpecification iamInstanceProfile) { setIamInstanceProfile(iamInstanceProfile); return this; } /** *

* Indicates whether the instance is optimized for EBS I/O. This * optimization provides dedicated throughput to Amazon EBS and an optimized * configuration stack to provide optimal EBS I/O performance. This * optimization isn't available with all instance types. Additional usage * charges apply when using an EBS Optimized instance. *

*

* Default: false *

* * @param ebsOptimized * Indicates whether the instance is optimized for EBS I/O. This * optimization provides dedicated throughput to Amazon EBS and an * optimized configuration stack to provide optimal EBS I/O * performance. This optimization isn't available with all instance * types. Additional usage charges apply when using an EBS Optimized * instance.

*

* Default: false */ public void setEbsOptimized(Boolean ebsOptimized) { this.ebsOptimized = ebsOptimized; } /** *

* Indicates whether the instance is optimized for EBS I/O. This * optimization provides dedicated throughput to Amazon EBS and an optimized * configuration stack to provide optimal EBS I/O performance. This * optimization isn't available with all instance types. Additional usage * charges apply when using an EBS Optimized instance. *

*

* Default: false *

* * @return Indicates whether the instance is optimized for EBS I/O. This * optimization provides dedicated throughput to Amazon EBS and an * optimized configuration stack to provide optimal EBS I/O * performance. This optimization isn't available with all instance * types. Additional usage charges apply when using an EBS Optimized * instance.

*

* Default: false */ public Boolean getEbsOptimized() { return this.ebsOptimized; } /** *

* Indicates whether the instance is optimized for EBS I/O. This * optimization provides dedicated throughput to Amazon EBS and an optimized * configuration stack to provide optimal EBS I/O performance. This * optimization isn't available with all instance types. Additional usage * charges apply when using an EBS Optimized instance. *

*

* Default: false *

* * @param ebsOptimized * Indicates whether the instance is optimized for EBS I/O. This * optimization provides dedicated throughput to Amazon EBS and an * optimized configuration stack to provide optimal EBS I/O * performance. This optimization isn't available with all instance * types. Additional usage charges apply when using an EBS Optimized * instance.

*

* Default: false * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withEbsOptimized(Boolean ebsOptimized) { setEbsOptimized(ebsOptimized); return this; } /** *

* Indicates whether the instance is optimized for EBS I/O. This * optimization provides dedicated throughput to Amazon EBS and an optimized * configuration stack to provide optimal EBS I/O performance. This * optimization isn't available with all instance types. Additional usage * charges apply when using an EBS Optimized instance. *

*

* Default: false *

* * @return Indicates whether the instance is optimized for EBS I/O. This * optimization provides dedicated throughput to Amazon EBS and an * optimized configuration stack to provide optimal EBS I/O * performance. This optimization isn't available with all instance * types. Additional usage charges apply when using an EBS Optimized * instance.

*

* Default: false */ public Boolean isEbsOptimized() { return this.ebsOptimized; } /** *

* One or more security groups. When requesting instances in a VPC, you must * specify the IDs of the security groups. When requesting instances in * EC2-Classic, you can specify the names or the IDs of the security groups. *

* * @return One or more security groups. When requesting instances in a VPC, * you must specify the IDs of the security groups. When requesting * instances in EC2-Classic, you can specify the names or the IDs of * the security groups. */ public java.util.List getAllSecurityGroups() { if (allSecurityGroups == null) { allSecurityGroups = new com.amazonaws.internal.SdkInternalList(); } return allSecurityGroups; } /** *

* One or more security groups. When requesting instances in a VPC, you must * specify the IDs of the security groups. When requesting instances in * EC2-Classic, you can specify the names or the IDs of the security groups. *

* * @param allSecurityGroups * One or more security groups. When requesting instances in a VPC, * you must specify the IDs of the security groups. When requesting * instances in EC2-Classic, you can specify the names or the IDs of * the security groups. */ public void setAllSecurityGroups( java.util.Collection allSecurityGroups) { if (allSecurityGroups == null) { this.allSecurityGroups = null; return; } this.allSecurityGroups = new com.amazonaws.internal.SdkInternalList( allSecurityGroups); } /** *

* One or more security groups. When requesting instances in a VPC, you must * specify the IDs of the security groups. When requesting instances in * EC2-Classic, you can specify the names or the IDs of the security groups. *

*

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

* * @param allSecurityGroups * One or more security groups. When requesting instances in a VPC, * you must specify the IDs of the security groups. When requesting * instances in EC2-Classic, you can specify the names or the IDs of * the security groups. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withAllSecurityGroups( GroupIdentifier... allSecurityGroups) { if (this.allSecurityGroups == null) { setAllSecurityGroups(new com.amazonaws.internal.SdkInternalList( allSecurityGroups.length)); } for (GroupIdentifier ele : allSecurityGroups) { this.allSecurityGroups.add(ele); } return this; } /** *

* One or more security groups. When requesting instances in a VPC, you must * specify the IDs of the security groups. When requesting instances in * EC2-Classic, you can specify the names or the IDs of the security groups. *

* * @param allSecurityGroups * One or more security groups. When requesting instances in a VPC, * you must specify the IDs of the security groups. When requesting * instances in EC2-Classic, you can specify the names or the IDs of * the security groups. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withAllSecurityGroups( java.util.Collection allSecurityGroups) { setAllSecurityGroups(allSecurityGroups); return this; } /** * @param monitoringEnabled */ public void setMonitoringEnabled(Boolean monitoringEnabled) { this.monitoringEnabled = monitoringEnabled; } /** * @return */ public Boolean getMonitoringEnabled() { return this.monitoringEnabled; } /** * @param monitoringEnabled * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withMonitoringEnabled(Boolean monitoringEnabled) { setMonitoringEnabled(monitoringEnabled); return this; } /** * @return */ public Boolean isMonitoringEnabled() { return this.monitoringEnabled; } /** *

* One or more security group names. *

* * @return One or more security group names. */ public java.util.List getSecurityGroups() { if (securityGroups == null) { securityGroups = new com.amazonaws.internal.SdkInternalList(); } return securityGroups; } /** *

* One or more security group names. *

* * @param securityGroups * One or more security group names. */ public void setSecurityGroups(java.util.Collection securityGroups) { if (securityGroups == null) { this.securityGroups = null; return; } this.securityGroups = new com.amazonaws.internal.SdkInternalList( securityGroups); } /** *

* One or more security group names. *

*

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

* * @param securityGroups * One or more security group names. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withSecurityGroups(String... securityGroups) { if (this.securityGroups == null) { setSecurityGroups(new com.amazonaws.internal.SdkInternalList( securityGroups.length)); } for (String ele : securityGroups) { this.securityGroups.add(ele); } return this; } /** *

* One or more security group names. *

* * @param securityGroups * One or more security group names. * @return Returns a reference to this object so that method calls can be * chained together. */ public LaunchSpecification withSecurityGroups( java.util.Collection securityGroups) { setSecurityGroups(securityGroups); 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 (getKeyName() != null) sb.append("KeyName: " + getKeyName() + ","); if (getUserData() != null) sb.append("UserData: " + getUserData() + ","); if (getAddressingType() != null) sb.append("AddressingType: " + getAddressingType() + ","); if (getInstanceType() != null) sb.append("InstanceType: " + getInstanceType() + ","); if (getPlacement() != null) sb.append("Placement: " + getPlacement() + ","); if (getKernelId() != null) sb.append("KernelId: " + getKernelId() + ","); if (getRamdiskId() != null) sb.append("RamdiskId: " + getRamdiskId() + ","); if (getBlockDeviceMappings() != null) sb.append("BlockDeviceMappings: " + getBlockDeviceMappings() + ","); if (getSubnetId() != null) sb.append("SubnetId: " + getSubnetId() + ","); if (getNetworkInterfaces() != null) sb.append("NetworkInterfaces: " + getNetworkInterfaces() + ","); if (getIamInstanceProfile() != null) sb.append("IamInstanceProfile: " + getIamInstanceProfile() + ","); if (getEbsOptimized() != null) sb.append("EbsOptimized: " + getEbsOptimized() + ","); if (getAllSecurityGroups() != null) sb.append("AllSecurityGroups: " + getAllSecurityGroups() + ","); if (getMonitoringEnabled() != null) sb.append("MonitoringEnabled: " + getMonitoringEnabled() + ","); if (getSecurityGroups() != null) sb.append("SecurityGroups: " + getSecurityGroups()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LaunchSpecification == false) return false; LaunchSpecification other = (LaunchSpecification) obj; if (other.getImageId() == null ^ this.getImageId() == null) return false; if (other.getImageId() != null && other.getImageId().equals(this.getImageId()) == false) return false; if (other.getKeyName() == null ^ this.getKeyName() == null) return false; if (other.getKeyName() != null && other.getKeyName().equals(this.getKeyName()) == false) return false; if (other.getUserData() == null ^ this.getUserData() == null) return false; if (other.getUserData() != null && other.getUserData().equals(this.getUserData()) == false) return false; if (other.getAddressingType() == null ^ this.getAddressingType() == null) return false; if (other.getAddressingType() != null && other.getAddressingType().equals(this.getAddressingType()) == false) return false; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getPlacement() == null ^ this.getPlacement() == null) return false; if (other.getPlacement() != null && other.getPlacement().equals(this.getPlacement()) == 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.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == null) return false; if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals( this.getBlockDeviceMappings()) == false) return false; if (other.getSubnetId() == null ^ this.getSubnetId() == null) return false; if (other.getSubnetId() != null && other.getSubnetId().equals(this.getSubnetId()) == false) return false; if (other.getNetworkInterfaces() == null ^ this.getNetworkInterfaces() == null) return false; if (other.getNetworkInterfaces() != null && other.getNetworkInterfaces().equals( this.getNetworkInterfaces()) == false) return false; if (other.getIamInstanceProfile() == null ^ this.getIamInstanceProfile() == null) return false; if (other.getIamInstanceProfile() != null && other.getIamInstanceProfile().equals( this.getIamInstanceProfile()) == false) return false; if (other.getEbsOptimized() == null ^ this.getEbsOptimized() == null) return false; if (other.getEbsOptimized() != null && other.getEbsOptimized().equals(this.getEbsOptimized()) == false) return false; if (other.getAllSecurityGroups() == null ^ this.getAllSecurityGroups() == null) return false; if (other.getAllSecurityGroups() != null && other.getAllSecurityGroups().equals( this.getAllSecurityGroups()) == false) return false; if (other.getMonitoringEnabled() == null ^ this.getMonitoringEnabled() == null) return false; if (other.getMonitoringEnabled() != null && other.getMonitoringEnabled().equals( this.getMonitoringEnabled()) == false) return false; if (other.getSecurityGroups() == null ^ this.getSecurityGroups() == null) return false; if (other.getSecurityGroups() != null && other.getSecurityGroups().equals(this.getSecurityGroups()) == 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 + ((getKeyName() == null) ? 0 : getKeyName().hashCode()); hashCode = prime * hashCode + ((getUserData() == null) ? 0 : getUserData().hashCode()); hashCode = prime * hashCode + ((getAddressingType() == null) ? 0 : getAddressingType() .hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType() .hashCode()); hashCode = prime * hashCode + ((getPlacement() == null) ? 0 : getPlacement().hashCode()); hashCode = prime * hashCode + ((getKernelId() == null) ? 0 : getKernelId().hashCode()); hashCode = prime * hashCode + ((getRamdiskId() == null) ? 0 : getRamdiskId().hashCode()); hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaces() == null) ? 0 : getNetworkInterfaces().hashCode()); hashCode = prime * hashCode + ((getIamInstanceProfile() == null) ? 0 : getIamInstanceProfile().hashCode()); hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized() .hashCode()); hashCode = prime * hashCode + ((getAllSecurityGroups() == null) ? 0 : getAllSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getMonitoringEnabled() == null) ? 0 : getMonitoringEnabled().hashCode()); hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups() .hashCode()); return hashCode; } @Override public LaunchSpecification clone() { try { return (LaunchSpecification) 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