/* * 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; /** *
* The information for a launch template. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ResponseLaunchTemplateData implements Serializable, Cloneable { /** ** The ID of the kernel, if applicable. *
*/ private String kernelId; /** ** Indicates whether the instance is optimized for Amazon EBS I/O. *
*/ private Boolean ebsOptimized; /** ** The IAM instance profile. *
*/ private LaunchTemplateIamInstanceProfileSpecification iamInstanceProfile; /** ** The block device mappings. *
*/ private com.amazonaws.internal.SdkInternalList* The network interfaces. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of the AMI * at instance launch. *
** The value depends on what you specified in the request. The possible values are: *
** If an AMI ID was specified in the request, then this is the AMI ID. *
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured as
* true
, then this is the AMI ID that the parameter is mapped to in the Parameter Store.
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured as
* false
, then this is the parameter value.
*
* For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon Elastic Compute Cloud User Guide. *
*/ private String imageId; /** ** The instance type. *
*/ private String instanceType; /** ** The name of the key pair. *
*/ private String keyName; /** ** The monitoring for the instance. *
*/ private LaunchTemplatesMonitoring monitoring; /** ** The placement of the instance. *
*/ private LaunchTemplatePlacement placement; /** ** The ID of the RAM disk, if applicable. *
*/ private String ramDiskId; /** *
* If set to true
, indicates that the instance cannot be terminated using the Amazon EC2 console,
* command line tool, or API.
*
* Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). *
*/ private String instanceInitiatedShutdownBehavior; /** ** The user data for the instance. *
*/ private String userData; /** ** The tags that are applied to the resources that are created during instance launch. *
*/ private com.amazonaws.internal.SdkInternalList* The elastic GPU specification. *
*/ private com.amazonaws.internal.SdkInternalList* The elastic inference accelerator for the instance. *
*/ private com.amazonaws.internal.SdkInternalList* The security group IDs. *
*/ private com.amazonaws.internal.SdkInternalList* The security group names. *
*/ private com.amazonaws.internal.SdkInternalList* The market (purchasing) option for the instances. *
*/ private LaunchTemplateInstanceMarketOptions instanceMarketOptions; /** ** The credit option for CPU usage of the instance. *
*/ private CreditSpecification creditSpecification; /** ** The CPU options for the instance. For more information, see Optimizing CPU options * in the Amazon Elastic Compute Cloud User Guide. *
*/ private LaunchTemplateCpuOptions cpuOptions; /** ** Information about the Capacity Reservation targeting option. *
*/ private LaunchTemplateCapacityReservationSpecificationResponse capacityReservationSpecification; /** ** The license configurations. *
*/ private com.amazonaws.internal.SdkInternalList* Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the * Amazon Elastic Compute Cloud User Guide. *
*/ private LaunchTemplateHibernationOptions hibernationOptions; /** ** The metadata options for the instance. For more information, see Instance metadata and user * data in the Amazon Elastic Compute Cloud User Guide. *
*/ private LaunchTemplateInstanceMetadataOptions metadataOptions; /** ** Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. *
*/ private LaunchTemplateEnclaveOptions enclaveOptions; /** ** The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance * types with these attributes. *
*
* If you specify InstanceRequirements
, you can't specify InstanceTypes
.
*
* The options for the instance hostname. *
*/ private LaunchTemplatePrivateDnsNameOptions privateDnsNameOptions; /** ** The maintenance options for your instance. *
*/ private LaunchTemplateInstanceMaintenanceOptions maintenanceOptions; /** ** Indicates whether the instance is enabled for stop protection. For more information, see Stop * protection in the Amazon Elastic Compute Cloud User Guide. *
*/ private Boolean disableApiStop; /** ** The ID of the kernel, if applicable. *
* * @param kernelId * The ID of the kernel, if applicable. */ public void setKernelId(String kernelId) { this.kernelId = kernelId; } /** ** The ID of the kernel, if applicable. *
* * @return The ID of the kernel, if applicable. */ public String getKernelId() { return this.kernelId; } /** ** The ID of the kernel, if applicable. *
* * @param kernelId * The ID of the kernel, if applicable. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withKernelId(String kernelId) { setKernelId(kernelId); return this; } /** ** Indicates whether the instance is optimized for Amazon EBS I/O. *
* * @param ebsOptimized * Indicates whether the instance is optimized for Amazon EBS I/O. */ public void setEbsOptimized(Boolean ebsOptimized) { this.ebsOptimized = ebsOptimized; } /** ** Indicates whether the instance is optimized for Amazon EBS I/O. *
* * @return Indicates whether the instance is optimized for Amazon EBS I/O. */ public Boolean getEbsOptimized() { return this.ebsOptimized; } /** ** Indicates whether the instance is optimized for Amazon EBS I/O. *
* * @param ebsOptimized * Indicates whether the instance is optimized for Amazon EBS I/O. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withEbsOptimized(Boolean ebsOptimized) { setEbsOptimized(ebsOptimized); return this; } /** ** Indicates whether the instance is optimized for Amazon EBS I/O. *
* * @return Indicates whether the instance is optimized for Amazon EBS I/O. */ public Boolean isEbsOptimized() { return this.ebsOptimized; } /** ** The IAM instance profile. *
* * @param iamInstanceProfile * The IAM instance profile. */ public void setIamInstanceProfile(LaunchTemplateIamInstanceProfileSpecification iamInstanceProfile) { this.iamInstanceProfile = iamInstanceProfile; } /** ** The IAM instance profile. *
* * @return The IAM instance profile. */ public LaunchTemplateIamInstanceProfileSpecification 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 ResponseLaunchTemplateData withIamInstanceProfile(LaunchTemplateIamInstanceProfileSpecification iamInstanceProfile) { setIamInstanceProfile(iamInstanceProfile); return this; } /** ** The block device mappings. *
* * @return The block device mappings. */ public java.util.List* The block device mappings. *
* * @param blockDeviceMappings * The block device mappings. */ public void setBlockDeviceMappings(java.util.Collection* The block device mappings. *
** 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 mappings. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withBlockDeviceMappings(LaunchTemplateBlockDeviceMapping... blockDeviceMappings) { if (this.blockDeviceMappings == null) { setBlockDeviceMappings(new com.amazonaws.internal.SdkInternalList* The block device mappings. *
* * @param blockDeviceMappings * The block device mappings. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withBlockDeviceMappings(java.util.Collection* The network interfaces. *
* * @return The network interfaces. */ public java.util.List* The network interfaces. *
* * @param networkInterfaces * The network interfaces. */ public void setNetworkInterfaces(java.util.Collection* The 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 * The network interfaces. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withNetworkInterfaces(LaunchTemplateInstanceNetworkInterfaceSpecification... networkInterfaces) { if (this.networkInterfaces == null) { setNetworkInterfaces(new com.amazonaws.internal.SdkInternalList* The network interfaces. *
* * @param networkInterfaces * The network interfaces. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withNetworkInterfaces(java.util.Collection* The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of the AMI * at instance launch. *
** The value depends on what you specified in the request. The possible values are: *
** If an AMI ID was specified in the request, then this is the AMI ID. *
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured as
* true
, then this is the AMI ID that the parameter is mapped to in the Parameter Store.
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured as
* false
, then this is the parameter value.
*
* For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon Elastic Compute Cloud User Guide. *
* * @param imageId * The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of * the AMI at instance launch. ** The value depends on what you specified in the request. The possible values are: *
** If an AMI ID was specified in the request, then this is the AMI ID. *
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured
* as true
, then this is the AMI ID that the parameter is mapped to in the Parameter Store.
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured
* as false
, then this is the parameter value.
*
* For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon Elastic Compute Cloud User * Guide. */ public void setImageId(String imageId) { this.imageId = imageId; } /** *
* The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of the AMI * at instance launch. *
** The value depends on what you specified in the request. The possible values are: *
** If an AMI ID was specified in the request, then this is the AMI ID. *
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured as
* true
, then this is the AMI ID that the parameter is mapped to in the Parameter Store.
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured as
* false
, then this is the parameter value.
*
* For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon Elastic Compute Cloud User Guide. *
* * @return The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of * the AMI at instance launch. ** The value depends on what you specified in the request. The possible values are: *
** If an AMI ID was specified in the request, then this is the AMI ID. *
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured
* as true
, then this is the AMI ID that the parameter is mapped to in the Parameter Store.
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured
* as false
, then this is the parameter value.
*
* For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon Elastic Compute Cloud User * Guide. */ public String getImageId() { return this.imageId; } /** *
* The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of the AMI * at instance launch. *
** The value depends on what you specified in the request. The possible values are: *
** If an AMI ID was specified in the request, then this is the AMI ID. *
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured as
* true
, then this is the AMI ID that the parameter is mapped to in the Parameter Store.
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured as
* false
, then this is the parameter value.
*
* For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon Elastic Compute Cloud User Guide. *
* * @param imageId * The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of * the AMI at instance launch. ** The value depends on what you specified in the request. The possible values are: *
** If an AMI ID was specified in the request, then this is the AMI ID. *
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured
* as true
, then this is the AMI ID that the parameter is mapped to in the Parameter Store.
*
* If a Systems Manager parameter was specified in the request, and ResolveAlias
was configured
* as false
, then this is the parameter value.
*
* For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon Elastic Compute Cloud User * Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withImageId(String imageId) { setImageId(imageId); 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 ResponseLaunchTemplateData withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** ** 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 ResponseLaunchTemplateData withInstanceType(InstanceType instanceType) { this.instanceType = instanceType.toString(); 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 ResponseLaunchTemplateData withKeyName(String keyName) { setKeyName(keyName); return this; } /** ** The monitoring for the instance. *
* * @param monitoring * The monitoring for the instance. */ public void setMonitoring(LaunchTemplatesMonitoring monitoring) { this.monitoring = monitoring; } /** ** The monitoring for the instance. *
* * @return The monitoring for the instance. */ public LaunchTemplatesMonitoring getMonitoring() { return this.monitoring; } /** ** The monitoring for the instance. *
* * @param monitoring * The monitoring for the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withMonitoring(LaunchTemplatesMonitoring monitoring) { setMonitoring(monitoring); return this; } /** ** The placement of the instance. *
* * @param placement * The placement of the instance. */ public void setPlacement(LaunchTemplatePlacement placement) { this.placement = placement; } /** ** The placement of the instance. *
* * @return The placement of the instance. */ public LaunchTemplatePlacement getPlacement() { return this.placement; } /** ** The placement of the instance. *
* * @param placement * The placement of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withPlacement(LaunchTemplatePlacement placement) { setPlacement(placement); return this; } /** ** The ID of the RAM disk, if applicable. *
* * @param ramDiskId * The ID of the RAM disk, if applicable. */ public void setRamDiskId(String ramDiskId) { this.ramDiskId = ramDiskId; } /** ** The ID of the RAM disk, if applicable. *
* * @return The ID of the RAM disk, if applicable. */ public String getRamDiskId() { return this.ramDiskId; } /** ** The ID of the RAM disk, if applicable. *
* * @param ramDiskId * The ID of the RAM disk, if applicable. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withRamDiskId(String ramDiskId) { setRamDiskId(ramDiskId); return this; } /** *
* If set to true
, indicates that the instance cannot be terminated using the Amazon EC2 console,
* command line tool, or API.
*
true
, indicates that the instance cannot be terminated using the Amazon EC2
* console, command line tool, or API.
*/
public void setDisableApiTermination(Boolean disableApiTermination) {
this.disableApiTermination = disableApiTermination;
}
/**
*
* If set to true
, indicates that the instance cannot be terminated using the Amazon EC2 console,
* command line tool, or API.
*
true
, indicates that the instance cannot be terminated using the Amazon EC2
* console, command line tool, or API.
*/
public Boolean getDisableApiTermination() {
return this.disableApiTermination;
}
/**
*
* If set to true
, indicates that the instance cannot be terminated using the Amazon EC2 console,
* command line tool, or API.
*
true
, indicates that the instance cannot be terminated using the Amazon EC2
* console, command line tool, or API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseLaunchTemplateData withDisableApiTermination(Boolean disableApiTermination) {
setDisableApiTermination(disableApiTermination);
return this;
}
/**
*
* If set to true
, indicates that the instance cannot be terminated using the Amazon EC2 console,
* command line tool, or API.
*
true
, indicates that the instance cannot be terminated using the Amazon EC2
* console, command line tool, or API.
*/
public Boolean isDisableApiTermination() {
return this.disableApiTermination;
}
/**
* * Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). *
* * @param instanceInitiatedShutdownBehavior * Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). * @see ShutdownBehavior */ public void setInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior) { this.instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehavior; } /** ** Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). *
* * @return Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). * @see ShutdownBehavior */ public String getInstanceInitiatedShutdownBehavior() { return this.instanceInitiatedShutdownBehavior; } /** ** Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). *
* * @param instanceInitiatedShutdownBehavior * Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). * @return Returns a reference to this object so that method calls can be chained together. * @see ShutdownBehavior */ public ResponseLaunchTemplateData withInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior) { setInstanceInitiatedShutdownBehavior(instanceInitiatedShutdownBehavior); return this; } /** ** Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). *
* * @param instanceInitiatedShutdownBehavior * Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). * @return Returns a reference to this object so that method calls can be chained together. * @see ShutdownBehavior */ public ResponseLaunchTemplateData withInstanceInitiatedShutdownBehavior(ShutdownBehavior instanceInitiatedShutdownBehavior) { this.instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehavior.toString(); return this; } /** ** The user data for the instance. *
* * @param userData * The user data for the instance. */ public void setUserData(String userData) { this.userData = userData; } /** ** The user data for the instance. *
* * @return The user data for the instance. */ public String getUserData() { return this.userData; } /** ** The user data for the instance. *
* * @param userData * The user data for the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withUserData(String userData) { setUserData(userData); return this; } /** ** The tags that are applied to the resources that are created during instance launch. *
* * @return The tags that are applied to the resources that are created during instance launch. */ public java.util.List* The tags that are applied to the resources that are created during instance launch. *
* * @param tagSpecifications * The tags that are applied to the resources that are created during instance launch. */ public void setTagSpecifications(java.util.Collection* The tags that are applied to the resources that are created during instance launch. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagSpecifications(java.util.Collection)} or {@link #withTagSpecifications(java.util.Collection)} if * you want to override the existing values. *
* * @param tagSpecifications * The tags that are applied to the resources that are created during instance launch. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withTagSpecifications(LaunchTemplateTagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList* The tags that are applied to the resources that are created during instance launch. *
* * @param tagSpecifications * The tags that are applied to the resources that are created during instance launch. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withTagSpecifications(java.util.Collection* The elastic GPU specification. *
* * @return The elastic GPU specification. */ public java.util.List* The elastic GPU specification. *
* * @param elasticGpuSpecifications * The elastic GPU specification. */ public void setElasticGpuSpecifications(java.util.Collection* The elastic GPU specification. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setElasticGpuSpecifications(java.util.Collection)} or * {@link #withElasticGpuSpecifications(java.util.Collection)} if you want to override the existing values. *
* * @param elasticGpuSpecifications * The elastic GPU specification. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withElasticGpuSpecifications(ElasticGpuSpecificationResponse... elasticGpuSpecifications) { if (this.elasticGpuSpecifications == null) { setElasticGpuSpecifications(new com.amazonaws.internal.SdkInternalList* The elastic GPU specification. *
* * @param elasticGpuSpecifications * The elastic GPU specification. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withElasticGpuSpecifications(java.util.Collection* The elastic inference accelerator for the instance. *
* * @return The elastic inference accelerator for the instance. */ public java.util.List* The elastic inference accelerator for the instance. *
* * @param elasticInferenceAccelerators * The elastic inference accelerator for the instance. */ public void setElasticInferenceAccelerators(java.util.Collection* The elastic inference accelerator for the instance. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setElasticInferenceAccelerators(java.util.Collection)} or * {@link #withElasticInferenceAccelerators(java.util.Collection)} if you want to override the existing values. *
* * @param elasticInferenceAccelerators * The elastic inference accelerator for the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withElasticInferenceAccelerators(LaunchTemplateElasticInferenceAcceleratorResponse... elasticInferenceAccelerators) { if (this.elasticInferenceAccelerators == null) { setElasticInferenceAccelerators(new com.amazonaws.internal.SdkInternalList* The elastic inference accelerator for the instance. *
* * @param elasticInferenceAccelerators * The elastic inference accelerator for the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withElasticInferenceAccelerators( java.util.Collection* The security group IDs. *
* * @return The security group IDs. */ public java.util.List* The security group IDs. *
* * @param securityGroupIds * The security group IDs. */ public void setSecurityGroupIds(java.util.Collection* The security group IDs. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecurityGroupIds(java.util.Collection)} or {@link #withSecurityGroupIds(java.util.Collection)} if you * want to override the existing values. *
* * @param securityGroupIds * The security group IDs. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withSecurityGroupIds(String... securityGroupIds) { if (this.securityGroupIds == null) { setSecurityGroupIds(new com.amazonaws.internal.SdkInternalList* The security group IDs. *
* * @param securityGroupIds * The security group IDs. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withSecurityGroupIds(java.util.Collection* The security group names. *
* * @return The security group names. */ public java.util.List* The security group names. *
* * @param securityGroups * The security group names. */ public void setSecurityGroups(java.util.Collection* The 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 * The security group names. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withSecurityGroups(String... securityGroups) { if (this.securityGroups == null) { setSecurityGroups(new com.amazonaws.internal.SdkInternalList* The security group names. *
* * @param securityGroups * The security group names. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withSecurityGroups(java.util.Collection* The market (purchasing) option for the instances. *
* * @param instanceMarketOptions * The market (purchasing) option for the instances. */ public void setInstanceMarketOptions(LaunchTemplateInstanceMarketOptions instanceMarketOptions) { this.instanceMarketOptions = instanceMarketOptions; } /** ** The market (purchasing) option for the instances. *
* * @return The market (purchasing) option for the instances. */ public LaunchTemplateInstanceMarketOptions getInstanceMarketOptions() { return this.instanceMarketOptions; } /** ** The market (purchasing) option for the instances. *
* * @param instanceMarketOptions * The market (purchasing) option for the instances. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withInstanceMarketOptions(LaunchTemplateInstanceMarketOptions instanceMarketOptions) { setInstanceMarketOptions(instanceMarketOptions); return this; } /** ** The credit option for CPU usage of the instance. *
* * @param creditSpecification * The credit option for CPU usage of the instance. */ public void setCreditSpecification(CreditSpecification creditSpecification) { this.creditSpecification = creditSpecification; } /** ** The credit option for CPU usage of the instance. *
* * @return The credit option for CPU usage of the instance. */ public CreditSpecification getCreditSpecification() { return this.creditSpecification; } /** ** The credit option for CPU usage of the instance. *
* * @param creditSpecification * The credit option for CPU usage of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withCreditSpecification(CreditSpecification creditSpecification) { setCreditSpecification(creditSpecification); return this; } /** ** The CPU options for the instance. For more information, see Optimizing CPU options * in the Amazon Elastic Compute Cloud User Guide. *
* * @param cpuOptions * The CPU options for the instance. For more information, see Optimizing CPU * options in the Amazon Elastic Compute Cloud User Guide. */ public void setCpuOptions(LaunchTemplateCpuOptions cpuOptions) { this.cpuOptions = cpuOptions; } /** ** The CPU options for the instance. For more information, see Optimizing CPU options * in the Amazon Elastic Compute Cloud User Guide. *
* * @return The CPU options for the instance. For more information, see Optimizing CPU * options in the Amazon Elastic Compute Cloud User Guide. */ public LaunchTemplateCpuOptions getCpuOptions() { return this.cpuOptions; } /** ** The CPU options for the instance. For more information, see Optimizing CPU options * in the Amazon Elastic Compute Cloud User Guide. *
* * @param cpuOptions * The CPU options for the instance. For more information, see Optimizing CPU * options in the Amazon Elastic Compute Cloud User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withCpuOptions(LaunchTemplateCpuOptions cpuOptions) { setCpuOptions(cpuOptions); return this; } /** ** Information about the Capacity Reservation targeting option. *
* * @param capacityReservationSpecification * Information about the Capacity Reservation targeting option. */ public void setCapacityReservationSpecification(LaunchTemplateCapacityReservationSpecificationResponse capacityReservationSpecification) { this.capacityReservationSpecification = capacityReservationSpecification; } /** ** Information about the Capacity Reservation targeting option. *
* * @return Information about the Capacity Reservation targeting option. */ public LaunchTemplateCapacityReservationSpecificationResponse getCapacityReservationSpecification() { return this.capacityReservationSpecification; } /** ** Information about the Capacity Reservation targeting option. *
* * @param capacityReservationSpecification * Information about the Capacity Reservation targeting option. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withCapacityReservationSpecification( LaunchTemplateCapacityReservationSpecificationResponse capacityReservationSpecification) { setCapacityReservationSpecification(capacityReservationSpecification); return this; } /** ** The license configurations. *
* * @return The license configurations. */ public java.util.List* The license configurations. *
* * @param licenseSpecifications * The license configurations. */ public void setLicenseSpecifications(java.util.Collection* The license configurations. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setLicenseSpecifications(java.util.Collection)} or * {@link #withLicenseSpecifications(java.util.Collection)} if you want to override the existing values. *
* * @param licenseSpecifications * The license configurations. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withLicenseSpecifications(LaunchTemplateLicenseConfiguration... licenseSpecifications) { if (this.licenseSpecifications == null) { setLicenseSpecifications(new com.amazonaws.internal.SdkInternalList* The license configurations. *
* * @param licenseSpecifications * The license configurations. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withLicenseSpecifications(java.util.Collection* Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the * Amazon Elastic Compute Cloud User Guide. *
* * @param hibernationOptions * Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in * the Amazon Elastic Compute Cloud User Guide. */ public void setHibernationOptions(LaunchTemplateHibernationOptions hibernationOptions) { this.hibernationOptions = hibernationOptions; } /** ** Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the * Amazon Elastic Compute Cloud User Guide. *
* * @return Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in * the Amazon Elastic Compute Cloud User Guide. */ public LaunchTemplateHibernationOptions getHibernationOptions() { return this.hibernationOptions; } /** ** Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the * Amazon Elastic Compute Cloud User Guide. *
* * @param hibernationOptions * Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in * the Amazon Elastic Compute Cloud User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withHibernationOptions(LaunchTemplateHibernationOptions hibernationOptions) { setHibernationOptions(hibernationOptions); return this; } /** ** The metadata options for the instance. For more information, see Instance metadata and user * data in the Amazon Elastic Compute Cloud User Guide. *
* * @param metadataOptions * The metadata options for the instance. For more information, see Instance metadata * and user data in the Amazon Elastic Compute Cloud User Guide. */ public void setMetadataOptions(LaunchTemplateInstanceMetadataOptions metadataOptions) { this.metadataOptions = metadataOptions; } /** ** The metadata options for the instance. For more information, see Instance metadata and user * data in the Amazon Elastic Compute Cloud User Guide. *
* * @return The metadata options for the instance. For more information, see Instance metadata * and user data in the Amazon Elastic Compute Cloud User Guide. */ public LaunchTemplateInstanceMetadataOptions getMetadataOptions() { return this.metadataOptions; } /** ** The metadata options for the instance. For more information, see Instance metadata and user * data in the Amazon Elastic Compute Cloud User Guide. *
* * @param metadataOptions * The metadata options for the instance. For more information, see Instance metadata * and user data in the Amazon Elastic Compute Cloud User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withMetadataOptions(LaunchTemplateInstanceMetadataOptions metadataOptions) { setMetadataOptions(metadataOptions); return this; } /** ** Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. *
* * @param enclaveOptions * Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. */ public void setEnclaveOptions(LaunchTemplateEnclaveOptions enclaveOptions) { this.enclaveOptions = enclaveOptions; } /** ** Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. *
* * @return Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. */ public LaunchTemplateEnclaveOptions getEnclaveOptions() { return this.enclaveOptions; } /** ** Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. *
* * @param enclaveOptions * Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withEnclaveOptions(LaunchTemplateEnclaveOptions enclaveOptions) { setEnclaveOptions(enclaveOptions); return this; } /** ** The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance * types with these attributes. *
*
* If you specify InstanceRequirements
, you can't specify InstanceTypes
.
*
* If you specify InstanceRequirements
, you can't specify InstanceTypes
.
*/
public void setInstanceRequirements(InstanceRequirements instanceRequirements) {
this.instanceRequirements = instanceRequirements;
}
/**
*
* The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance * types with these attributes. *
*
* If you specify InstanceRequirements
, you can't specify InstanceTypes
.
*
* If you specify InstanceRequirements
, you can't specify InstanceTypes
.
*/
public InstanceRequirements getInstanceRequirements() {
return this.instanceRequirements;
}
/**
*
* The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance * types with these attributes. *
*
* If you specify InstanceRequirements
, you can't specify InstanceTypes
.
*
* If you specify InstanceRequirements
, you can't specify InstanceTypes
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseLaunchTemplateData withInstanceRequirements(InstanceRequirements instanceRequirements) {
setInstanceRequirements(instanceRequirements);
return this;
}
/**
*
* The options for the instance hostname. *
* * @param privateDnsNameOptions * The options for the instance hostname. */ public void setPrivateDnsNameOptions(LaunchTemplatePrivateDnsNameOptions privateDnsNameOptions) { this.privateDnsNameOptions = privateDnsNameOptions; } /** ** The options for the instance hostname. *
* * @return The options for the instance hostname. */ public LaunchTemplatePrivateDnsNameOptions getPrivateDnsNameOptions() { return this.privateDnsNameOptions; } /** ** The options for the instance hostname. *
* * @param privateDnsNameOptions * The options for the instance hostname. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withPrivateDnsNameOptions(LaunchTemplatePrivateDnsNameOptions privateDnsNameOptions) { setPrivateDnsNameOptions(privateDnsNameOptions); return this; } /** ** The maintenance options for your instance. *
* * @param maintenanceOptions * The maintenance options for your instance. */ public void setMaintenanceOptions(LaunchTemplateInstanceMaintenanceOptions maintenanceOptions) { this.maintenanceOptions = maintenanceOptions; } /** ** The maintenance options for your instance. *
* * @return The maintenance options for your instance. */ public LaunchTemplateInstanceMaintenanceOptions getMaintenanceOptions() { return this.maintenanceOptions; } /** ** The maintenance options for your instance. *
* * @param maintenanceOptions * The maintenance options for your instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withMaintenanceOptions(LaunchTemplateInstanceMaintenanceOptions maintenanceOptions) { setMaintenanceOptions(maintenanceOptions); return this; } /** ** Indicates whether the instance is enabled for stop protection. For more information, see Stop * protection in the Amazon Elastic Compute Cloud User Guide. *
* * @param disableApiStop * Indicates whether the instance is enabled for stop protection. For more information, see Stop * protection in the Amazon Elastic Compute Cloud User Guide. */ public void setDisableApiStop(Boolean disableApiStop) { this.disableApiStop = disableApiStop; } /** ** Indicates whether the instance is enabled for stop protection. For more information, see Stop * protection in the Amazon Elastic Compute Cloud User Guide. *
* * @return Indicates whether the instance is enabled for stop protection. For more information, see Stop * protection in the Amazon Elastic Compute Cloud User Guide. */ public Boolean getDisableApiStop() { return this.disableApiStop; } /** ** Indicates whether the instance is enabled for stop protection. For more information, see Stop * protection in the Amazon Elastic Compute Cloud User Guide. *
* * @param disableApiStop * Indicates whether the instance is enabled for stop protection. For more information, see Stop * protection in the Amazon Elastic Compute Cloud User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ResponseLaunchTemplateData withDisableApiStop(Boolean disableApiStop) { setDisableApiStop(disableApiStop); return this; } /** ** Indicates whether the instance is enabled for stop protection. For more information, see Stop * protection in the Amazon Elastic Compute Cloud User Guide. *
* * @return Indicates whether the instance is enabled for stop protection. For more information, see Stop * protection in the Amazon Elastic Compute Cloud User Guide. */ public Boolean isDisableApiStop() { return this.disableApiStop; } /** * 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 (getKernelId() != null) sb.append("KernelId: ").append(getKernelId()).append(","); if (getEbsOptimized() != null) sb.append("EbsOptimized: ").append(getEbsOptimized()).append(","); if (getIamInstanceProfile() != null) sb.append("IamInstanceProfile: ").append(getIamInstanceProfile()).append(","); if (getBlockDeviceMappings() != null) sb.append("BlockDeviceMappings: ").append(getBlockDeviceMappings()).append(","); if (getNetworkInterfaces() != null) sb.append("NetworkInterfaces: ").append(getNetworkInterfaces()).append(","); if (getImageId() != null) sb.append("ImageId: ").append(getImageId()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getKeyName() != null) sb.append("KeyName: ").append(getKeyName()).append(","); if (getMonitoring() != null) sb.append("Monitoring: ").append(getMonitoring()).append(","); if (getPlacement() != null) sb.append("Placement: ").append(getPlacement()).append(","); if (getRamDiskId() != null) sb.append("RamDiskId: ").append(getRamDiskId()).append(","); if (getDisableApiTermination() != null) sb.append("DisableApiTermination: ").append(getDisableApiTermination()).append(","); if (getInstanceInitiatedShutdownBehavior() != null) sb.append("InstanceInitiatedShutdownBehavior: ").append(getInstanceInitiatedShutdownBehavior()).append(","); if (getUserData() != null) sb.append("UserData: ").append("***Sensitive Data Redacted***").append(","); if (getTagSpecifications() != null) sb.append("TagSpecifications: ").append(getTagSpecifications()).append(","); if (getElasticGpuSpecifications() != null) sb.append("ElasticGpuSpecifications: ").append(getElasticGpuSpecifications()).append(","); if (getElasticInferenceAccelerators() != null) sb.append("ElasticInferenceAccelerators: ").append(getElasticInferenceAccelerators()).append(","); if (getSecurityGroupIds() != null) sb.append("SecurityGroupIds: ").append(getSecurityGroupIds()).append(","); if (getSecurityGroups() != null) sb.append("SecurityGroups: ").append(getSecurityGroups()).append(","); if (getInstanceMarketOptions() != null) sb.append("InstanceMarketOptions: ").append(getInstanceMarketOptions()).append(","); if (getCreditSpecification() != null) sb.append("CreditSpecification: ").append(getCreditSpecification()).append(","); if (getCpuOptions() != null) sb.append("CpuOptions: ").append(getCpuOptions()).append(","); if (getCapacityReservationSpecification() != null) sb.append("CapacityReservationSpecification: ").append(getCapacityReservationSpecification()).append(","); if (getLicenseSpecifications() != null) sb.append("LicenseSpecifications: ").append(getLicenseSpecifications()).append(","); if (getHibernationOptions() != null) sb.append("HibernationOptions: ").append(getHibernationOptions()).append(","); if (getMetadataOptions() != null) sb.append("MetadataOptions: ").append(getMetadataOptions()).append(","); if (getEnclaveOptions() != null) sb.append("EnclaveOptions: ").append(getEnclaveOptions()).append(","); if (getInstanceRequirements() != null) sb.append("InstanceRequirements: ").append(getInstanceRequirements()).append(","); if (getPrivateDnsNameOptions() != null) sb.append("PrivateDnsNameOptions: ").append(getPrivateDnsNameOptions()).append(","); if (getMaintenanceOptions() != null) sb.append("MaintenanceOptions: ").append(getMaintenanceOptions()).append(","); if (getDisableApiStop() != null) sb.append("DisableApiStop: ").append(getDisableApiStop()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ResponseLaunchTemplateData == false) return false; ResponseLaunchTemplateData other = (ResponseLaunchTemplateData) obj; if (other.getKernelId() == null ^ this.getKernelId() == null) return false; if (other.getKernelId() != null && other.getKernelId().equals(this.getKernelId()) == 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.getIamInstanceProfile() == null ^ this.getIamInstanceProfile() == null) return false; if (other.getIamInstanceProfile() != null && other.getIamInstanceProfile().equals(this.getIamInstanceProfile()) == 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.getNetworkInterfaces() == null ^ this.getNetworkInterfaces() == null) return false; if (other.getNetworkInterfaces() != null && other.getNetworkInterfaces().equals(this.getNetworkInterfaces()) == 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.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == 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.getMonitoring() == null ^ this.getMonitoring() == null) return false; if (other.getMonitoring() != null && other.getMonitoring().equals(this.getMonitoring()) == 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.getRamDiskId() == null ^ this.getRamDiskId() == null) return false; if (other.getRamDiskId() != null && other.getRamDiskId().equals(this.getRamDiskId()) == false) return false; if (other.getDisableApiTermination() == null ^ this.getDisableApiTermination() == null) return false; if (other.getDisableApiTermination() != null && other.getDisableApiTermination().equals(this.getDisableApiTermination()) == false) return false; if (other.getInstanceInitiatedShutdownBehavior() == null ^ this.getInstanceInitiatedShutdownBehavior() == null) return false; if (other.getInstanceInitiatedShutdownBehavior() != null && other.getInstanceInitiatedShutdownBehavior().equals(this.getInstanceInitiatedShutdownBehavior()) == 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.getTagSpecifications() == null ^ this.getTagSpecifications() == null) return false; if (other.getTagSpecifications() != null && other.getTagSpecifications().equals(this.getTagSpecifications()) == false) return false; if (other.getElasticGpuSpecifications() == null ^ this.getElasticGpuSpecifications() == null) return false; if (other.getElasticGpuSpecifications() != null && other.getElasticGpuSpecifications().equals(this.getElasticGpuSpecifications()) == false) return false; if (other.getElasticInferenceAccelerators() == null ^ this.getElasticInferenceAccelerators() == null) return false; if (other.getElasticInferenceAccelerators() != null && other.getElasticInferenceAccelerators().equals(this.getElasticInferenceAccelerators()) == false) return false; if (other.getSecurityGroupIds() == null ^ this.getSecurityGroupIds() == null) return false; if (other.getSecurityGroupIds() != null && other.getSecurityGroupIds().equals(this.getSecurityGroupIds()) == false) return false; if (other.getSecurityGroups() == null ^ this.getSecurityGroups() == null) return false; if (other.getSecurityGroups() != null && other.getSecurityGroups().equals(this.getSecurityGroups()) == false) return false; if (other.getInstanceMarketOptions() == null ^ this.getInstanceMarketOptions() == null) return false; if (other.getInstanceMarketOptions() != null && other.getInstanceMarketOptions().equals(this.getInstanceMarketOptions()) == false) return false; if (other.getCreditSpecification() == null ^ this.getCreditSpecification() == null) return false; if (other.getCreditSpecification() != null && other.getCreditSpecification().equals(this.getCreditSpecification()) == false) return false; if (other.getCpuOptions() == null ^ this.getCpuOptions() == null) return false; if (other.getCpuOptions() != null && other.getCpuOptions().equals(this.getCpuOptions()) == false) return false; if (other.getCapacityReservationSpecification() == null ^ this.getCapacityReservationSpecification() == null) return false; if (other.getCapacityReservationSpecification() != null && other.getCapacityReservationSpecification().equals(this.getCapacityReservationSpecification()) == false) return false; if (other.getLicenseSpecifications() == null ^ this.getLicenseSpecifications() == null) return false; if (other.getLicenseSpecifications() != null && other.getLicenseSpecifications().equals(this.getLicenseSpecifications()) == false) return false; if (other.getHibernationOptions() == null ^ this.getHibernationOptions() == null) return false; if (other.getHibernationOptions() != null && other.getHibernationOptions().equals(this.getHibernationOptions()) == false) return false; if (other.getMetadataOptions() == null ^ this.getMetadataOptions() == null) return false; if (other.getMetadataOptions() != null && other.getMetadataOptions().equals(this.getMetadataOptions()) == false) return false; if (other.getEnclaveOptions() == null ^ this.getEnclaveOptions() == null) return false; if (other.getEnclaveOptions() != null && other.getEnclaveOptions().equals(this.getEnclaveOptions()) == false) return false; if (other.getInstanceRequirements() == null ^ this.getInstanceRequirements() == null) return false; if (other.getInstanceRequirements() != null && other.getInstanceRequirements().equals(this.getInstanceRequirements()) == false) return false; if (other.getPrivateDnsNameOptions() == null ^ this.getPrivateDnsNameOptions() == null) return false; if (other.getPrivateDnsNameOptions() != null && other.getPrivateDnsNameOptions().equals(this.getPrivateDnsNameOptions()) == false) return false; if (other.getMaintenanceOptions() == null ^ this.getMaintenanceOptions() == null) return false; if (other.getMaintenanceOptions() != null && other.getMaintenanceOptions().equals(this.getMaintenanceOptions()) == false) return false; if (other.getDisableApiStop() == null ^ this.getDisableApiStop() == null) return false; if (other.getDisableApiStop() != null && other.getDisableApiStop().equals(this.getDisableApiStop()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKernelId() == null) ? 0 : getKernelId().hashCode()); hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized().hashCode()); hashCode = prime * hashCode + ((getIamInstanceProfile() == null) ? 0 : getIamInstanceProfile().hashCode()); hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaces() == null) ? 0 : getNetworkInterfaces().hashCode()); hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getKeyName() == null) ? 0 : getKeyName().hashCode()); hashCode = prime * hashCode + ((getMonitoring() == null) ? 0 : getMonitoring().hashCode()); hashCode = prime * hashCode + ((getPlacement() == null) ? 0 : getPlacement().hashCode()); hashCode = prime * hashCode + ((getRamDiskId() == null) ? 0 : getRamDiskId().hashCode()); hashCode = prime * hashCode + ((getDisableApiTermination() == null) ? 0 : getDisableApiTermination().hashCode()); hashCode = prime * hashCode + ((getInstanceInitiatedShutdownBehavior() == null) ? 0 : getInstanceInitiatedShutdownBehavior().hashCode()); hashCode = prime * hashCode + ((getUserData() == null) ? 0 : getUserData().hashCode()); hashCode = prime * hashCode + ((getTagSpecifications() == null) ? 0 : getTagSpecifications().hashCode()); hashCode = prime * hashCode + ((getElasticGpuSpecifications() == null) ? 0 : getElasticGpuSpecifications().hashCode()); hashCode = prime * hashCode + ((getElasticInferenceAccelerators() == null) ? 0 : getElasticInferenceAccelerators().hashCode()); hashCode = prime * hashCode + ((getSecurityGroupIds() == null) ? 0 : getSecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getInstanceMarketOptions() == null) ? 0 : getInstanceMarketOptions().hashCode()); hashCode = prime * hashCode + ((getCreditSpecification() == null) ? 0 : getCreditSpecification().hashCode()); hashCode = prime * hashCode + ((getCpuOptions() == null) ? 0 : getCpuOptions().hashCode()); hashCode = prime * hashCode + ((getCapacityReservationSpecification() == null) ? 0 : getCapacityReservationSpecification().hashCode()); hashCode = prime * hashCode + ((getLicenseSpecifications() == null) ? 0 : getLicenseSpecifications().hashCode()); hashCode = prime * hashCode + ((getHibernationOptions() == null) ? 0 : getHibernationOptions().hashCode()); hashCode = prime * hashCode + ((getMetadataOptions() == null) ? 0 : getMetadataOptions().hashCode()); hashCode = prime * hashCode + ((getEnclaveOptions() == null) ? 0 : getEnclaveOptions().hashCode()); hashCode = prime * hashCode + ((getInstanceRequirements() == null) ? 0 : getInstanceRequirements().hashCode()); hashCode = prime * hashCode + ((getPrivateDnsNameOptions() == null) ? 0 : getPrivateDnsNameOptions().hashCode()); hashCode = prime * hashCode + ((getMaintenanceOptions() == null) ? 0 : getMaintenanceOptions().hashCode()); hashCode = prime * hashCode + ((getDisableApiStop() == null) ? 0 : getDisableApiStop().hashCode()); return hashCode; } @Override public ResponseLaunchTemplateData clone() { try { return (ResponseLaunchTemplateData) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }