Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Copyright 2010-2015 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;
  

Describes an instance.

  
  public class Instance implements SerializableCloneable {

    
The ID of the instance.
  
      private String instanceId;

    
The ID of the AMI used to launch the instance.
  
      private String imageId;

    
The current state of the instance.
  
      private InstanceState state;

    
The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.
  
      private String privateDnsName;

    
The public DNS name assigned to the instance. This name is not available until the instance enters the running state.
  
      private String publicDnsName;

    
The reason for the most recent state transition. This might be an empty string.
  
      private String stateTransitionReason;

    
The name of the key pair, if this instance was launched with an associated key pair.
  
      private String keyName;

    
The AMI launch index, which can be used to find this instance in the launch group.
  
      private Integer amiLaunchIndex;

    
The product codes attached to this instance.
  
The instance type.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, t2.micro, t2.small, t2.medium, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, i2.xlarge, i2.2xlarge, i2.4xlarge, i2.8xlarge, hi1.4xlarge, hs1.8xlarge, c1.medium, c1.xlarge, c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, c4.large, c4.xlarge, c4.2xlarge, c4.4xlarge, c4.8xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, cg1.4xlarge, r3.large, r3.xlarge, r3.2xlarge, r3.4xlarge, r3.8xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge

  
      private String instanceType;

    
The time the instance was launched.
  
      private java.util.Date launchTime;

    
The location where the instance launched.
  
      private Placement placement;

    
The kernel associated with this instance.
  
      private String kernelId;

    
The RAM disk associated with this instance.
 
     private String ramdiskId;

    
The value is Windows for Windows instances; otherwise blank.

Constraints:
Allowed Values: Windows

 
     private String platform;

    
The monitoring information for the instance.
 
     private Monitoring monitoring;

    
The ID of the subnet in which the instance is running.
 
     private String subnetId;

    
The ID of the VPC in which the instance is running.
 
     private String vpcId;

    
The private IP address assigned to the instance.
 
     private String privateIpAddress;

    
The public IP address assigned to the instance.
 
     private String publicIpAddress;

    
The reason for the most recent state transition.
 
     private StateReason stateReason;

    
The architecture of the image.

Constraints:
Allowed Values: i386, x86_64

 
     private String architecture;

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

Constraints:
Allowed Values: ebs, instance-store

 
     private String rootDeviceType;

    
The root device name (for example, /dev/sda1 or /dev/xvda).
 
     private String rootDeviceName;

    
Any block device mapping entries for the instance.
 
The virtualization type of the instance.

Constraints:
Allowed Values: hvm, paravirtual

 
     private String virtualizationType;

    
Indicates whether this is a Spot Instance.

Constraints:
Allowed Values: spot

 
     private String instanceLifecycle;

    
The ID of the Spot Instance request.
 
     private String spotInstanceRequestId;

    
The idempotency token you provided when you launched the instance.
 
     private String clientToken;

    
Any tags assigned to the instance.
 
One or more security groups for the instance.
 
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
 
     private Boolean sourceDestCheck;

    
The hypervisor type of the instance.

Constraints:
Allowed Values: ovm, xen

 
     private String hypervisor;

    
[EC2-VPC] One or more network interfaces for the instance.
 
The IAM instance profile associated with the instance.
 
     private IamInstanceProfile 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 I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
 
     private Boolean ebsOptimized;

    
Specifies whether enhanced networking is enabled.
 
     private String sriovNetSupport;

    
The ID of the instance.

Returns:
The ID of the instance.
 
     public String getInstanceId() {
         return ;
     }
    
    
The ID of the instance.

Parameters:
instanceId The ID of the instance.
 
     public void setInstanceId(String instanceId) {
         this. = instanceId;
     }
    
    
The ID of the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceId The ID of the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withInstanceId(String instanceId) {
         this. = instanceId;
         return this;
     }

    
The ID of the AMI used to launch the instance.

Returns:
The ID of the AMI used to launch the instance.
 
     public String getImageId() {
         return ;
     }
    
    
The ID of the AMI used to launch the instance.

Parameters:
imageId The ID of the AMI used to launch the instance.
 
     public void setImageId(String imageId) {
         this. = imageId;
     }
    
    
The ID of the AMI used to launch the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
imageId The ID of the AMI used to launch the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withImageId(String imageId) {
         this. = imageId;
         return this;
     }

    
The current state of the instance.

Returns:
The current state of the instance.
 
     public InstanceState getState() {
         return ;
     }
    
    
The current state of the instance.

Parameters:
state The current state of the instance.
 
     public void setState(InstanceState state) {
         this. = state;
     }
    
    
The current state of the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
state The current state of the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withState(InstanceState state) {
         this. = state;
         return this;
     }

    
The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

Returns:
The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.
 
     public String getPrivateDnsName() {
         return ;
     }
    
    
The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

Parameters:
privateDnsName The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.
 
     public void setPrivateDnsName(String privateDnsName) {
         this. = privateDnsName;
     }
    
    
The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

Returns a reference to this object so that method calls can be chained together.

Parameters:
privateDnsName The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withPrivateDnsName(String privateDnsName) {
         this. = privateDnsName;
         return this;
     }

    
The public DNS name assigned to the instance. This name is not available until the instance enters the running state.

Returns:
The public DNS name assigned to the instance. This name is not available until the instance enters the running state.
 
     public String getPublicDnsName() {
         return ;
     }
    
    
The public DNS name assigned to the instance. This name is not available until the instance enters the running state.

Parameters:
publicDnsName The public DNS name assigned to the instance. This name is not available until the instance enters the running state.
 
     public void setPublicDnsName(String publicDnsName) {
         this. = publicDnsName;
     }
    
    
The public DNS name assigned to the instance. This name is not available until the instance enters the running state.

Returns a reference to this object so that method calls can be chained together.

Parameters:
publicDnsName The public DNS name assigned to the instance. This name is not available until the instance enters the running state.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withPublicDnsName(String publicDnsName) {
         this. = publicDnsName;
         return this;
     }

    
The reason for the most recent state transition. This might be an empty string.

Returns:
The reason for the most recent state transition. This might be an empty string.
 
     public String getStateTransitionReason() {
         return ;
     }
    
    
The reason for the most recent state transition. This might be an empty string.

Parameters:
stateTransitionReason The reason for the most recent state transition. This might be an empty string.
 
     public void setStateTransitionReason(String stateTransitionReason) {
         this. = stateTransitionReason;
     }
    
    
The reason for the most recent state transition. This might be an empty string.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stateTransitionReason The reason for the most recent state transition. This might be an empty string.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withStateTransitionReason(String stateTransitionReason) {
         this. = stateTransitionReason;
         return this;
     }

    
The name of the key pair, if this instance was launched with an associated key pair.

Returns:
The name of the key pair, if this instance was launched with an associated key pair.
 
     public String getKeyName() {
         return ;
     }
    
    
The name of the key pair, if this instance was launched with an associated key pair.

Parameters:
keyName The name of the key pair, if this instance was launched with an associated key pair.
 
     public void setKeyName(String keyName) {
         this. = keyName;
     }
    
    
The name of the key pair, if this instance was launched with an associated key pair.

Returns a reference to this object so that method calls can be chained together.

Parameters:
keyName The name of the key pair, if this instance was launched with an associated key pair.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withKeyName(String keyName) {
         this. = keyName;
         return this;
     }

    
The AMI launch index, which can be used to find this instance in the launch group.

Returns:
The AMI launch index, which can be used to find this instance in the launch group.
 
     public Integer getAmiLaunchIndex() {
         return ;
     }
    
    
The AMI launch index, which can be used to find this instance in the launch group.

Parameters:
amiLaunchIndex The AMI launch index, which can be used to find this instance in the launch group.
 
     public void setAmiLaunchIndex(Integer amiLaunchIndex) {
         this. = amiLaunchIndex;
     }
    
    
The AMI launch index, which can be used to find this instance in the launch group.

Returns a reference to this object so that method calls can be chained together.

Parameters:
amiLaunchIndex The AMI launch index, which can be used to find this instance in the launch group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withAmiLaunchIndex(Integer amiLaunchIndex) {
         this. = amiLaunchIndex;
         return this;
     }

    
The product codes attached to this instance.

Returns:
The product codes attached to this instance.
 
     public java.util.List<ProductCodegetProductCodes() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<ProductCode>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
The product codes attached to this instance.

Parameters:
productCodes The product codes attached to this instance.
 
     public void setProductCodes(java.util.Collection<ProductCodeproductCodes) {
         if (productCodes == null) {
             this. = null;
             return;
         }
         productCodesCopy.addAll(productCodes);
         this. = productCodesCopy;
     }
    
    
The product codes attached to this instance.

NOTE: This method appends the values to the existing list (if any). Use setProductCodes(java.util.Collection) or withProductCodes(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
productCodes The product codes attached to this instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withProductCodes(ProductCode... productCodes) {
         if (getProductCodes() == nullsetProductCodes(new java.util.ArrayList<ProductCode>(productCodes.length));
         for (ProductCode value : productCodes) {
             getProductCodes().add(value);
         }
         return this;
     }
    
    
The product codes attached to this instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
productCodes The product codes attached to this instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withProductCodes(java.util.Collection<ProductCodeproductCodes) {
         if (productCodes == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<ProductCodeproductCodesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<ProductCode>(productCodes.size());
             productCodesCopy.addAll(productCodes);
             this. = productCodesCopy;
         }
 
         return this;
     }

    
The instance type.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, t2.micro, t2.small, t2.medium, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, i2.xlarge, i2.2xlarge, i2.4xlarge, i2.8xlarge, hi1.4xlarge, hs1.8xlarge, c1.medium, c1.xlarge, c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, c4.large, c4.xlarge, c4.2xlarge, c4.4xlarge, c4.8xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, cg1.4xlarge, r3.large, r3.xlarge, r3.2xlarge, r3.4xlarge, r3.8xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge

Returns:
The instance type.
See also:
InstanceType
 
     public String getInstanceType() {
         return ;
     }
    
    
The instance type.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, t2.micro, t2.small, t2.medium, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, i2.xlarge, i2.2xlarge, i2.4xlarge, i2.8xlarge, hi1.4xlarge, hs1.8xlarge, c1.medium, c1.xlarge, c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, c4.large, c4.xlarge, c4.2xlarge, c4.4xlarge, c4.8xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, cg1.4xlarge, r3.large, r3.xlarge, r3.2xlarge, r3.4xlarge, r3.8xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge

Parameters:
instanceType The instance type.
See also:
InstanceType
 
     public void setInstanceType(String instanceType) {
         this. = instanceType;
     }
    
    
The instance type.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, t2.micro, t2.small, t2.medium, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, i2.xlarge, i2.2xlarge, i2.4xlarge, i2.8xlarge, hi1.4xlarge, hs1.8xlarge, c1.medium, c1.xlarge, c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, c4.large, c4.xlarge, c4.2xlarge, c4.4xlarge, c4.8xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, cg1.4xlarge, r3.large, r3.xlarge, r3.2xlarge, r3.4xlarge, r3.8xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge

Parameters:
instanceType The instance type.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
InstanceType
 
     public Instance withInstanceType(String instanceType) {
         this. = instanceType;
         return this;
     }

    
The instance type.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, t2.micro, t2.small, t2.medium, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, i2.xlarge, i2.2xlarge, i2.4xlarge, i2.8xlarge, hi1.4xlarge, hs1.8xlarge, c1.medium, c1.xlarge, c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, c4.large, c4.xlarge, c4.2xlarge, c4.4xlarge, c4.8xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, cg1.4xlarge, r3.large, r3.xlarge, r3.2xlarge, r3.4xlarge, r3.8xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge

Parameters:
instanceType The instance type.
See also:
InstanceType
 
     public void setInstanceType(InstanceType instanceType) {
         this. = instanceType.toString();
     }
    
    
The instance type.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, t2.micro, t2.small, t2.medium, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, i2.xlarge, i2.2xlarge, i2.4xlarge, i2.8xlarge, hi1.4xlarge, hs1.8xlarge, c1.medium, c1.xlarge, c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, c4.large, c4.xlarge, c4.2xlarge, c4.4xlarge, c4.8xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, cg1.4xlarge, r3.large, r3.xlarge, r3.2xlarge, r3.4xlarge, r3.8xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge

Parameters:
instanceType The instance type.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
InstanceType
 
     public Instance withInstanceType(InstanceType instanceType) {
         this. = instanceType.toString();
         return this;
     }

    
The time the instance was launched.

Returns:
The time the instance was launched.
 
     public java.util.Date getLaunchTime() {
         return ;
     }
    
    
The time the instance was launched.

Parameters:
launchTime The time the instance was launched.
 
     public void setLaunchTime(java.util.Date launchTime) {
         this. = launchTime;
     }
    
    
The time the instance was launched.

Returns a reference to this object so that method calls can be chained together.

Parameters:
launchTime The time the instance was launched.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withLaunchTime(java.util.Date launchTime) {
         this. = launchTime;
         return this;
     }

    
The location where the instance launched.

Returns:
The location where the instance launched.
 
     public Placement getPlacement() {
         return ;
     }
    
    
The location where the instance launched.

Parameters:
placement The location where the instance launched.
 
     public void setPlacement(Placement placement) {
         this. = placement;
     }
    
    
The location where the instance launched.

Returns a reference to this object so that method calls can be chained together.

Parameters:
placement The location where the instance launched.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withPlacement(Placement placement) {
         this. = placement;
         return this;
     }

    
The kernel associated with this instance.

Returns:
The kernel associated with this instance.
 
     public String getKernelId() {
         return ;
     }
    
    
The kernel associated with this instance.

Parameters:
kernelId The kernel associated with this instance.
 
     public void setKernelId(String kernelId) {
         this. = kernelId;
     }
    
    
The kernel associated with this instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
kernelId The kernel associated with this instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withKernelId(String kernelId) {
         this. = kernelId;
         return this;
     }

    
The RAM disk associated with this instance.

Returns:
The RAM disk associated with this instance.
 
     public String getRamdiskId() {
         return ;
     }
    
    
The RAM disk associated with this instance.

Parameters:
ramdiskId The RAM disk associated with this instance.
 
     public void setRamdiskId(String ramdiskId) {
         this. = ramdiskId;
     }
    
    
The RAM disk associated with this instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
ramdiskId The RAM disk associated with this instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withRamdiskId(String ramdiskId) {
         this. = ramdiskId;
         return this;
     }

    
The value is Windows for Windows instances; otherwise blank.

Constraints:
Allowed Values: Windows

Returns:
The value is Windows for Windows instances; otherwise blank.
See also:
PlatformValues
 
     public String getPlatform() {
         return ;
     }
    
    
The value is Windows for Windows instances; otherwise blank.

Constraints:
Allowed Values: Windows

Parameters:
platform The value is Windows for Windows instances; otherwise blank.
See also:
PlatformValues
 
     public void setPlatform(String platform) {
         this. = platform;
     }
    
    
The value is Windows for Windows instances; otherwise blank.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: Windows

Parameters:
platform The value is Windows for Windows instances; otherwise blank.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
PlatformValues
 
     public Instance withPlatform(String platform) {
         this. = platform;
         return this;
     }

    
The value is Windows for Windows instances; otherwise blank.

Constraints:
Allowed Values: Windows

Parameters:
platform The value is Windows for Windows instances; otherwise blank.
See also:
PlatformValues
 
     public void setPlatform(PlatformValues platform) {
         this. = platform.toString();
     }
    
    
The value is Windows for Windows instances; otherwise blank.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: Windows

Parameters:
platform The value is Windows for Windows instances; otherwise blank.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
PlatformValues
 
     public Instance withPlatform(PlatformValues platform) {
         this. = platform.toString();
         return this;
     }

    
The monitoring information for the instance.

Returns:
The monitoring information for the instance.
 
     public Monitoring getMonitoring() {
         return ;
     }
    
    
The monitoring information for the instance.

Parameters:
monitoring The monitoring information for the instance.
 
     public void setMonitoring(Monitoring monitoring) {
         this. = monitoring;
     }
    
    
The monitoring information for the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
monitoring The monitoring information for the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withMonitoring(Monitoring monitoring) {
         this. = monitoring;
         return this;
     }

    
The ID of the subnet in which the instance is running.

Returns:
The ID of the subnet in which the instance is running.
 
     public String getSubnetId() {
         return ;
     }
    
    
The ID of the subnet in which the instance is running.

Parameters:
subnetId The ID of the subnet in which the instance is running.
 
     public void setSubnetId(String subnetId) {
         this. = subnetId;
     }
    
    
The ID of the subnet in which the instance is running.

Returns a reference to this object so that method calls can be chained together.

Parameters:
subnetId The ID of the subnet in which the instance is running.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withSubnetId(String subnetId) {
         this. = subnetId;
         return this;
     }

    
The ID of the VPC in which the instance is running.

Returns:
The ID of the VPC in which the instance is running.
    public String getVpcId() {
        return ;
    }
    
    
The ID of the VPC in which the instance is running.

Parameters:
vpcId The ID of the VPC in which the instance is running.
    public void setVpcId(String vpcId) {
        this. = vpcId;
    }
    
    
The ID of the VPC in which the instance is running.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vpcId The ID of the VPC in which the instance is running.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withVpcId(String vpcId) {
        this. = vpcId;
        return this;
    }

    
The private IP address assigned to the instance.

Returns:
The private IP address assigned to the instance.
    public String getPrivateIpAddress() {
        return ;
    }
    
    
The private IP address assigned to the instance.

Parameters:
privateIpAddress The private IP address assigned to the instance.
    public void setPrivateIpAddress(String privateIpAddress) {
        this. = privateIpAddress;
    }
    
    
The private IP address assigned to the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
privateIpAddress The private IP address assigned to the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withPrivateIpAddress(String privateIpAddress) {
        this. = privateIpAddress;
        return this;
    }

    
The public IP address assigned to the instance.

Returns:
The public IP address assigned to the instance.
    public String getPublicIpAddress() {
        return ;
    }
    
    
The public IP address assigned to the instance.

Parameters:
publicIpAddress The public IP address assigned to the instance.
    public void setPublicIpAddress(String publicIpAddress) {
        this. = publicIpAddress;
    }
    
    
The public IP address assigned to the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
publicIpAddress The public IP address assigned to the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withPublicIpAddress(String publicIpAddress) {
        this. = publicIpAddress;
        return this;
    }

    
The reason for the most recent state transition.

Returns:
The reason for the most recent state transition.
    public StateReason getStateReason() {
        return ;
    }
    
    
The reason for the most recent state transition.

Parameters:
stateReason The reason for the most recent state transition.
    public void setStateReason(StateReason stateReason) {
        this. = stateReason;
    }
    
    
The reason for the most recent state transition.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stateReason The reason for the most recent state transition.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withStateReason(StateReason stateReason) {
        this. = stateReason;
        return this;
    }

    
The architecture of the image.

Constraints:
Allowed Values: i386, x86_64

Returns:
The architecture of the image.
See also:
ArchitectureValues
    public String getArchitecture() {
        return ;
    }
    
    
The architecture of the image.

Constraints:
Allowed Values: i386, x86_64

Parameters:
architecture The architecture of the image.
See also:
ArchitectureValues
    public void setArchitecture(String architecture) {
        this. = architecture;
    }
    
    
The architecture of the image.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: i386, x86_64

Parameters:
architecture The architecture of the image.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ArchitectureValues
    public Instance withArchitecture(String architecture) {
        this. = architecture;
        return this;
    }

    
The architecture of the image.

Constraints:
Allowed Values: i386, x86_64

Parameters:
architecture The architecture of the image.
See also:
ArchitectureValues
    public void setArchitecture(ArchitectureValues architecture) {
        this. = architecture.toString();
    }
    
    
The architecture of the image.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: i386, x86_64

Parameters:
architecture The architecture of the image.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ArchitectureValues
    public Instance withArchitecture(ArchitectureValues architecture) {
        this. = architecture.toString();
        return this;
    }

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

Constraints:
Allowed Values: ebs, instance-store

Returns:
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
See also:
DeviceType
    public String getRootDeviceType() {
        return ;
    }
    
    
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

Constraints:
Allowed Values: ebs, instance-store

Parameters:
rootDeviceType The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
See also:
DeviceType
    public void setRootDeviceType(String rootDeviceType) {
        this. = rootDeviceType;
    }
    
    
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: ebs, instance-store

Parameters:
rootDeviceType The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DeviceType
    public Instance withRootDeviceType(String rootDeviceType) {
        this. = rootDeviceType;
        return this;
    }

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

Constraints:
Allowed Values: ebs, instance-store

Parameters:
rootDeviceType The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
See also:
DeviceType
    public void setRootDeviceType(DeviceType rootDeviceType) {
        this. = rootDeviceType.toString();
    }
    
    
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: ebs, instance-store

Parameters:
rootDeviceType The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DeviceType
    public Instance withRootDeviceType(DeviceType rootDeviceType) {
        this. = rootDeviceType.toString();
        return this;
    }

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

Returns:
The root device name (for example, /dev/sda1 or /dev/xvda).
    public String getRootDeviceName() {
        return ;
    }
    
    
The root device name (for example, /dev/sda1 or /dev/xvda).

Parameters:
rootDeviceName The root device name (for example, /dev/sda1 or /dev/xvda).
    public void setRootDeviceName(String rootDeviceName) {
        this. = rootDeviceName;
    }
    
    
The root device name (for example, /dev/sda1 or /dev/xvda).

Returns a reference to this object so that method calls can be chained together.

Parameters:
rootDeviceName The root device name (for example, /dev/sda1 or /dev/xvda).
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withRootDeviceName(String rootDeviceName) {
        this. = rootDeviceName;
        return this;
    }

    
Any block device mapping entries for the instance.

Returns:
Any block device mapping entries for the instance.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Any block device mapping entries for the instance.

Parameters:
blockDeviceMappings Any block device mapping entries for the instance.
    public void setBlockDeviceMappings(java.util.Collection<InstanceBlockDeviceMappingblockDeviceMappings) {
        if (blockDeviceMappings == null) {
            this. = null;
            return;
        }
        blockDeviceMappingsCopy.addAll(blockDeviceMappings);
        this. = blockDeviceMappingsCopy;
    }
    
    
Any block device mapping entries for the instance.

NOTE: This method appends the values to the existing list (if any). Use setBlockDeviceMappings(java.util.Collection) or withBlockDeviceMappings(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
blockDeviceMappings Any block device mapping entries for the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withBlockDeviceMappings(InstanceBlockDeviceMapping... blockDeviceMappings) {
        if (getBlockDeviceMappings() == nullsetBlockDeviceMappings(new java.util.ArrayList<InstanceBlockDeviceMapping>(blockDeviceMappings.length));
        for (InstanceBlockDeviceMapping value : blockDeviceMappings) {
            getBlockDeviceMappings().add(value);
        }
        return this;
    }
    
    
Any block device mapping entries for the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
blockDeviceMappings Any block device mapping entries for the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (blockDeviceMappings == null) {
            this. = null;
        } else {
            blockDeviceMappingsCopy.addAll(blockDeviceMappings);
            this. = blockDeviceMappingsCopy;
        }
        return this;
    }

    
The virtualization type of the instance.

Constraints:
Allowed Values: hvm, paravirtual

Returns:
The virtualization type of the instance.
See also:
VirtualizationType
    public String getVirtualizationType() {
        return ;
    }
    
    
The virtualization type of the instance.

Constraints:
Allowed Values: hvm, paravirtual

Parameters:
virtualizationType The virtualization type of the instance.
See also:
VirtualizationType
    public void setVirtualizationType(String virtualizationType) {
        this. = virtualizationType;
    }
    
    
The virtualization type of the instance.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: hvm, paravirtual

Parameters:
virtualizationType The virtualization type of the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
VirtualizationType
    public Instance withVirtualizationType(String virtualizationType) {
        this. = virtualizationType;
        return this;
    }

    
The virtualization type of the instance.

Constraints:
Allowed Values: hvm, paravirtual

Parameters:
virtualizationType The virtualization type of the instance.
See also:
VirtualizationType
    public void setVirtualizationType(VirtualizationType virtualizationType) {
        this. = virtualizationType.toString();
    }
    
    
The virtualization type of the instance.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: hvm, paravirtual

Parameters:
virtualizationType The virtualization type of the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
VirtualizationType
    public Instance withVirtualizationType(VirtualizationType virtualizationType) {
        this. = virtualizationType.toString();
        return this;
    }

    
Indicates whether this is a Spot Instance.

Constraints:
Allowed Values: spot

Returns:
Indicates whether this is a Spot Instance.
See also:
InstanceLifecycleType
    public String getInstanceLifecycle() {
        return ;
    }
    
    
Indicates whether this is a Spot Instance.

Constraints:
Allowed Values: spot

Parameters:
instanceLifecycle Indicates whether this is a Spot Instance.
See also:
InstanceLifecycleType
    public void setInstanceLifecycle(String instanceLifecycle) {
        this. = instanceLifecycle;
    }
    
    
Indicates whether this is a Spot Instance.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: spot

Parameters:
instanceLifecycle Indicates whether this is a Spot Instance.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
InstanceLifecycleType
    public Instance withInstanceLifecycle(String instanceLifecycle) {
        this. = instanceLifecycle;
        return this;
    }

    
Indicates whether this is a Spot Instance.

Constraints:
Allowed Values: spot

Parameters:
instanceLifecycle Indicates whether this is a Spot Instance.
See also:
InstanceLifecycleType
    public void setInstanceLifecycle(InstanceLifecycleType instanceLifecycle) {
        this. = instanceLifecycle.toString();
    }
    
    
Indicates whether this is a Spot Instance.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: spot

Parameters:
instanceLifecycle Indicates whether this is a Spot Instance.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
InstanceLifecycleType
    public Instance withInstanceLifecycle(InstanceLifecycleType instanceLifecycle) {
        this. = instanceLifecycle.toString();
        return this;
    }

    
The ID of the Spot Instance request.

Returns:
The ID of the Spot Instance request.
    public String getSpotInstanceRequestId() {
        return ;
    }
    
    
The ID of the Spot Instance request.

Parameters:
spotInstanceRequestId The ID of the Spot Instance request.
    public void setSpotInstanceRequestId(String spotInstanceRequestId) {
        this. = spotInstanceRequestId;
    }
    
    
The ID of the Spot Instance request.

Returns a reference to this object so that method calls can be chained together.

Parameters:
spotInstanceRequestId The ID of the Spot Instance request.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withSpotInstanceRequestId(String spotInstanceRequestId) {
        this. = spotInstanceRequestId;
        return this;
    }

    
The idempotency token you provided when you launched the instance.

Returns:
The idempotency token you provided when you launched the instance.
    public String getClientToken() {
        return ;
    }
    
    
The idempotency token you provided when you launched the instance.

Parameters:
clientToken The idempotency token you provided when you launched the instance.
    public void setClientToken(String clientToken) {
        this. = clientToken;
    }
    
    
The idempotency token you provided when you launched the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
clientToken The idempotency token you provided when you launched the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withClientToken(String clientToken) {
        this. = clientToken;
        return this;
    }

    
Any tags assigned to the instance.

Returns:
Any tags assigned to the instance.
    public java.util.List<TaggetTags() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Any tags assigned to the instance.

Parameters:
tags Any tags assigned to the instance.
    public void setTags(java.util.Collection<Tagtags) {
        if (tags == null) {
            this. = null;
            return;
        }
        tagsCopy.addAll(tags);
        this. = tagsCopy;
    }
    
    
Any tags assigned to the instance.

NOTE: This method appends the values to the existing list (if any). Use setTags(java.util.Collection) or withTags(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
tags Any tags assigned to the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withTags(Tag... tags) {
        if (getTags() == nullsetTags(new java.util.ArrayList<Tag>(tags.length));
        for (Tag value : tags) {
            getTags().add(value);
        }
        return this;
    }
    
    
Any tags assigned to the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
tags Any tags assigned to the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withTags(java.util.Collection<Tagtags) {
        if (tags == null) {
            this. = null;
        } else {
            tagsCopy.addAll(tags);
            this. = tagsCopy;
        }
        return this;
    }

    
One or more security groups for the instance.

Returns:
One or more security groups for the instance.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
One or more security groups for the instance.

Parameters:
securityGroups One or more security groups for the instance.
    public void setSecurityGroups(java.util.Collection<GroupIdentifiersecurityGroups) {
        if (securityGroups == null) {
            this. = null;
            return;
        }
        securityGroupsCopy.addAll(securityGroups);
        this. = securityGroupsCopy;
    }
    
    
One or more security groups for the instance.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
securityGroups One or more security groups for the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withSecurityGroups(GroupIdentifier... securityGroups) {
        if (getSecurityGroups() == nullsetSecurityGroups(new java.util.ArrayList<GroupIdentifier>(securityGroups.length));
        for (GroupIdentifier value : securityGroups) {
            getSecurityGroups().add(value);
        }
        return this;
    }
    
    
One or more security groups for the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
securityGroups One or more security groups for the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withSecurityGroups(java.util.Collection<GroupIdentifiersecurityGroups) {
        if (securityGroups == null) {
            this. = null;
        } else {
            securityGroupsCopy.addAll(securityGroups);
            this. = securityGroupsCopy;
        }
        return this;
    }

    
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.

Returns:
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
    public Boolean isSourceDestCheck() {
        return ;
    }
    
    
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.

Parameters:
sourceDestCheck Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
    public void setSourceDestCheck(Boolean sourceDestCheck) {
        this. = sourceDestCheck;
    }
    
    
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.

Returns a reference to this object so that method calls can be chained together.

Parameters:
sourceDestCheck Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withSourceDestCheck(Boolean sourceDestCheck) {
        this. = sourceDestCheck;
        return this;
    }

    
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.

Returns:
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
    public Boolean getSourceDestCheck() {
        return ;
    }

    
The hypervisor type of the instance.

Constraints:
Allowed Values: ovm, xen

Returns:
The hypervisor type of the instance.
See also:
HypervisorType
    public String getHypervisor() {
        return ;
    }
    
    
The hypervisor type of the instance.

Constraints:
Allowed Values: ovm, xen

Parameters:
hypervisor The hypervisor type of the instance.
See also:
HypervisorType
    public void setHypervisor(String hypervisor) {
        this. = hypervisor;
    }
    
    
The hypervisor type of the instance.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: ovm, xen

Parameters:
hypervisor The hypervisor type of the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
HypervisorType
    public Instance withHypervisor(String hypervisor) {
        this. = hypervisor;
        return this;
    }

    
The hypervisor type of the instance.

Constraints:
Allowed Values: ovm, xen

Parameters:
hypervisor The hypervisor type of the instance.
See also:
HypervisorType
    public void setHypervisor(HypervisorType hypervisor) {
        this. = hypervisor.toString();
    }
    
    
The hypervisor type of the instance.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: ovm, xen

Parameters:
hypervisor The hypervisor type of the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
HypervisorType
    public Instance withHypervisor(HypervisorType hypervisor) {
        this. = hypervisor.toString();
        return this;
    }

    
[EC2-VPC] One or more network interfaces for the instance.

Returns:
[EC2-VPC] One or more network interfaces for the instance.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
[EC2-VPC] One or more network interfaces for the instance.

Parameters:
networkInterfaces [EC2-VPC] One or more network interfaces for the instance.
    public void setNetworkInterfaces(java.util.Collection<InstanceNetworkInterfacenetworkInterfaces) {
        if (networkInterfaces == null) {
            this. = null;
            return;
        }
        networkInterfacesCopy.addAll(networkInterfaces);
        this. = networkInterfacesCopy;
    }
    
    
[EC2-VPC] One or more network interfaces for the instance.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
networkInterfaces [EC2-VPC] One or more network interfaces for the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withNetworkInterfaces(InstanceNetworkInterface... networkInterfaces) {
        if (getNetworkInterfaces() == nullsetNetworkInterfaces(new java.util.ArrayList<InstanceNetworkInterface>(networkInterfaces.length));
        for (InstanceNetworkInterface value : networkInterfaces) {
            getNetworkInterfaces().add(value);
        }
        return this;
    }
    
    
[EC2-VPC] One or more network interfaces for the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
networkInterfaces [EC2-VPC] One or more network interfaces for the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (networkInterfaces == null) {
            this. = null;
        } else {
            networkInterfacesCopy.addAll(networkInterfaces);
            this. = networkInterfacesCopy;
        }
        return this;
    }

    
The IAM instance profile associated with the instance.

Returns:
The IAM instance profile associated with the instance.
        return ;
    }
    
    
The IAM instance profile associated with the instance.

Parameters:
iamInstanceProfile The IAM instance profile associated with the instance.
    public void setIamInstanceProfile(IamInstanceProfile iamInstanceProfile) {
        this. = iamInstanceProfile;
    }
    
    
The IAM instance profile associated with the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
iamInstanceProfile The IAM instance profile associated with the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withIamInstanceProfile(IamInstanceProfile iamInstanceProfile) {
        this. = 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 I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

Returns:
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 I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
    public Boolean isEbsOptimized() {
        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 I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

Parameters:
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 I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
    public void setEbsOptimized(Boolean ebsOptimized) {
        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 I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
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 I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withEbsOptimized(Boolean ebsOptimized) {
        this. = 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 I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

Returns:
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 I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
    public Boolean getEbsOptimized() {
        return ;
    }

    
Specifies whether enhanced networking is enabled.

Returns:
Specifies whether enhanced networking is enabled.
    public String getSriovNetSupport() {
        return ;
    }
    
    
Specifies whether enhanced networking is enabled.

Parameters:
sriovNetSupport Specifies whether enhanced networking is enabled.
    public void setSriovNetSupport(String sriovNetSupport) {
        this. = sriovNetSupport;
    }
    
    
Specifies whether enhanced networking is enabled.

Returns a reference to this object so that method calls can be chained together.

Parameters:
sriovNetSupport Specifies whether enhanced networking is enabled.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withSriovNetSupport(String sriovNetSupport) {
        this. = sriovNetSupport;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getInstanceId() != nullsb.append("InstanceId: " + getInstanceId() + ",");
        if (getImageId() != nullsb.append("ImageId: " + getImageId() + ",");
        if (getState() != nullsb.append("State: " + getState() + ",");
        if (getPrivateDnsName() != nullsb.append("PrivateDnsName: " + getPrivateDnsName() + ",");
        if (getPublicDnsName() != nullsb.append("PublicDnsName: " + getPublicDnsName() + ",");
        if (getStateTransitionReason() != nullsb.append("StateTransitionReason: " + getStateTransitionReason() + ",");
        if (getKeyName() != nullsb.append("KeyName: " + getKeyName() + ",");
        if (getAmiLaunchIndex() != nullsb.append("AmiLaunchIndex: " + getAmiLaunchIndex() + ",");
        if (getProductCodes() != nullsb.append("ProductCodes: " + getProductCodes() + ",");
        if (getInstanceType() != nullsb.append("InstanceType: " + getInstanceType() + ",");
        if (getLaunchTime() != nullsb.append("LaunchTime: " + getLaunchTime() + ",");
        if (getPlacement() != nullsb.append("Placement: " + getPlacement() + ",");
        if (getKernelId() != nullsb.append("KernelId: " + getKernelId() + ",");
        if (getRamdiskId() != nullsb.append("RamdiskId: " + getRamdiskId() + ",");
        if (getPlatform() != nullsb.append("Platform: " + getPlatform() + ",");
        if (getMonitoring() != nullsb.append("Monitoring: " + getMonitoring() + ",");
        if (getSubnetId() != nullsb.append("SubnetId: " + getSubnetId() + ",");
        if (getVpcId() != nullsb.append("VpcId: " + getVpcId() + ",");
        if (getPrivateIpAddress() != nullsb.append("PrivateIpAddress: " + getPrivateIpAddress() + ",");
        if (getPublicIpAddress() != nullsb.append("PublicIpAddress: " + getPublicIpAddress() + ",");
        if (getStateReason() != nullsb.append("StateReason: " + getStateReason() + ",");
        if (getArchitecture() != nullsb.append("Architecture: " + getArchitecture() + ",");
        if (getRootDeviceType() != nullsb.append("RootDeviceType: " + getRootDeviceType() + ",");
        if (getRootDeviceName() != nullsb.append("RootDeviceName: " + getRootDeviceName() + ",");
        if (getBlockDeviceMappings() != nullsb.append("BlockDeviceMappings: " + getBlockDeviceMappings() + ",");
        if (getVirtualizationType() != nullsb.append("VirtualizationType: " + getVirtualizationType() + ",");
        if (getInstanceLifecycle() != nullsb.append("InstanceLifecycle: " + getInstanceLifecycle() + ",");
        if (getSpotInstanceRequestId() != nullsb.append("SpotInstanceRequestId: " + getSpotInstanceRequestId() + ",");
        if (getClientToken() != nullsb.append("ClientToken: " + getClientToken() + ",");
        if (getTags() != nullsb.append("Tags: " + getTags() + ",");
        if (getSecurityGroups() != nullsb.append("SecurityGroups: " + getSecurityGroups() + ",");
        if (isSourceDestCheck() != nullsb.append("SourceDestCheck: " + isSourceDestCheck() + ",");
        if (getHypervisor() != nullsb.append("Hypervisor: " + getHypervisor() + ",");
        if (getNetworkInterfaces() != nullsb.append("NetworkInterfaces: " + getNetworkInterfaces() + ",");
        if (getIamInstanceProfile() != nullsb.append("IamInstanceProfile: " + getIamInstanceProfile() + ",");
        if (isEbsOptimized() != nullsb.append("EbsOptimized: " + isEbsOptimized() + ",");
        if (getSriovNetSupport() != nullsb.append("SriovNetSupport: " + getSriovNetSupport() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); 
        hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode()); 
        hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); 
        hashCode = prime * hashCode + ((getPrivateDnsName() == null) ? 0 : getPrivateDnsName().hashCode()); 
        hashCode = prime * hashCode + ((getPublicDnsName() == null) ? 0 : getPublicDnsName().hashCode()); 
        hashCode = prime * hashCode + ((getStateTransitionReason() == null) ? 0 : getStateTransitionReason().hashCode()); 
        hashCode = prime * hashCode + ((getKeyName() == null) ? 0 : getKeyName().hashCode()); 
        hashCode = prime * hashCode + ((getAmiLaunchIndex() == null) ? 0 : getAmiLaunchIndex().hashCode()); 
        hashCode = prime * hashCode + ((getProductCodes() == null) ? 0 : getProductCodes().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); 
        hashCode = prime * hashCode + ((getLaunchTime() == null) ? 0 : getLaunchTime().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 + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); 
        hashCode = prime * hashCode + ((getMonitoring() == null) ? 0 : getMonitoring().hashCode()); 
        hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); 
        hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode()); 
        hashCode = prime * hashCode + ((getPrivateIpAddress() == null) ? 0 : getPrivateIpAddress().hashCode()); 
        hashCode = prime * hashCode + ((getPublicIpAddress() == null) ? 0 : getPublicIpAddress().hashCode()); 
        hashCode = prime * hashCode + ((getStateReason() == null) ? 0 : getStateReason().hashCode()); 
        hashCode = prime * hashCode + ((getArchitecture() == null) ? 0 : getArchitecture().hashCode()); 
        hashCode = prime * hashCode + ((getRootDeviceType() == null) ? 0 : getRootDeviceType().hashCode()); 
        hashCode = prime * hashCode + ((getRootDeviceName() == null) ? 0 : getRootDeviceName().hashCode()); 
        hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); 
        hashCode = prime * hashCode + ((getVirtualizationType() == null) ? 0 : getVirtualizationType().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceLifecycle() == null) ? 0 : getInstanceLifecycle().hashCode()); 
        hashCode = prime * hashCode + ((getSpotInstanceRequestId() == null) ? 0 : getSpotInstanceRequestId().hashCode()); 
        hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); 
        hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); 
        hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode()); 
        hashCode = prime * hashCode + ((isSourceDestCheck() == null) ? 0 : isSourceDestCheck().hashCode()); 
        hashCode = prime * hashCode + ((getHypervisor() == null) ? 0 : getHypervisor().hashCode()); 
        hashCode = prime * hashCode + ((getNetworkInterfaces() == null) ? 0 : getNetworkInterfaces().hashCode()); 
        hashCode = prime * hashCode + ((getIamInstanceProfile() == null) ? 0 : getIamInstanceProfile().hashCode()); 
        hashCode = prime * hashCode + ((isEbsOptimized() == null) ? 0 : isEbsOptimized().hashCode()); 
        hashCode = prime * hashCode + ((getSriovNetSupport() == null) ? 0 : getSriovNetSupport().hashCode());