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.opsworks.model;
  

Describes an instance.

  
  public class Instance implements SerializableCloneable {

    
The instance ID.
  
      private String instanceId;

    
The ID of the associated Amazon EC2 instance.
  
      private String ec2InstanceId;

    
The instance's virtualization type, paravirtual or hvm.

Constraints:
Allowed Values: paravirtual, hvm

  
      private String virtualizationType;

    
The instance host name.
  
      private String hostname;

    
The stack ID.
  
      private String stackId;

    
An array containing the instance layer IDs.
  
An array containing the instance security group IDs.
  
The instance type. AWS OpsWorks supports all instance types except Cluster Compute, Cluster GPU, and High Memory Cluster. For more information, see Instance Families and Types. The parameter values that specify the various types are in the API Name column of the Available Instance Types table.
  
      private String instanceType;

    
The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.
  
      private String instanceProfileArn;

    
The instance status:
  • booting
  • connection_lost
  • online
  • pending
  • rebooting
  • requested
  • running_setup
  • setup_failed
  • shutting_down
  • start_failed
  • stopped
  • stopping
  • terminated
  • terminating
  
      private String status;

    
The instance's operating system.
  
      private String os;

    
A custom AMI ID to be used to create the instance. The AMI should be based on one of the standard AWS OpsWorks APIs: Amazon Linux, Ubuntu 12.04 LTS, or Ubuntu 14.04 LTS. For more information, see Instances
 
     private String amiId;

    
The instance Availability Zone. For more information, see Regions and Endpoints.
 
     private String availabilityZone;

    
The instance's subnet ID, if the stack is running in a VPC.
 
     private String subnetId;

    
The instance public DNS name.
 
     private String publicDns;

    
The instance private DNS name.
 
     private String privateDns;

    
The instance public IP address.
 
     private String publicIp;

    
The instance private IP address.
 
     private String privateIp;

    
The instance Elastic IP address .
 
     private String elasticIp;

    
For load-based or time-based instances, the type.

Constraints:
Allowed Values: load, timer

 
     private String autoScalingType;

    
The instance's Amazon EC2 key pair name.
 
     private String sshKeyName;

    
The SSH key's RSA fingerprint.
 
     private String sshHostRsaKeyFingerprint;

    
The SSH key's DSA fingerprint.
 
     private String sshHostDsaKeyFingerprint;

    
The time that the instance was created.
 
     private String createdAt;

    
The ID of the last service error. For more information, call DescribeServiceErrors.
 
     private String lastServiceErrorId;

    
The instance architecture, "i386" or "x86_64".

Constraints:
Allowed Values: x86_64, i386

 
     private String architecture;

    
The instance's root device type. For more information, see Storage for the Root Device.

Constraints:
Allowed Values: ebs, instance-store

 
     private String rootDeviceType;

    
The root device volume ID.
 
     private String rootDeviceVolumeId;

    
An array of BlockDeviceMapping objects that specify the instance's block device mappings.
 
Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

 
     private Boolean installUpdatesOnBoot;

    
Whether this is an Amazon EBS-optimized instance.
 
     private Boolean ebsOptimized;

    
The instance's reported AWS OpsWorks agent version.
 
     private String reportedAgentVersion;

    
For registered instances, the reported operating system.
 
     private ReportedOs reportedOs;

    
For registered instances, the infrastructure class: ec2 or on-premises
 
     private String infrastructureClass;

    
For registered instances, who performed the registration.
 
     private String registeredBy;

    
The instance ID.

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

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

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

Parameters:
instanceId The instance ID.
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 associated Amazon EC2 instance.

Returns:
The ID of the associated Amazon EC2 instance.
 
     public String getEc2InstanceId() {
         return ;
     }
    
    
The ID of the associated Amazon EC2 instance.

Parameters:
ec2InstanceId The ID of the associated Amazon EC2 instance.
 
     public void setEc2InstanceId(String ec2InstanceId) {
         this. = ec2InstanceId;
     }
    
    
The ID of the associated Amazon EC2 instance.

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

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

    
The instance's virtualization type, paravirtual or hvm.

Constraints:
Allowed Values: paravirtual, hvm

Returns:
The instance's virtualization type, paravirtual or hvm.
See also:
VirtualizationType
 
     public String getVirtualizationType() {
         return ;
     }
    
    
The instance's virtualization type, paravirtual or hvm.

Constraints:
Allowed Values: paravirtual, hvm

Parameters:
virtualizationType The instance's virtualization type, paravirtual or hvm.
See also:
VirtualizationType
 
     public void setVirtualizationType(String virtualizationType) {
         this. = virtualizationType;
     }
    
    
The instance's virtualization type, paravirtual or hvm.

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

Constraints:
Allowed Values: paravirtual, hvm

Parameters:
virtualizationType The instance's virtualization type, paravirtual or hvm.
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 instance's virtualization type, paravirtual or hvm.

Constraints:
Allowed Values: paravirtual, hvm

Parameters:
virtualizationType The instance's virtualization type, paravirtual or hvm.
See also:
VirtualizationType
 
     public void setVirtualizationType(VirtualizationType virtualizationType) {
         this. = virtualizationType.toString();
     }
    
    
The instance's virtualization type, paravirtual or hvm.

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

Constraints:
Allowed Values: paravirtual, hvm

Parameters:
virtualizationType The instance's virtualization type, paravirtual or hvm.
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;
     }

    
The instance host name.

Returns:
The instance host name.
 
     public String getHostname() {
         return ;
     }
    
    
The instance host name.

Parameters:
hostname The instance host name.
 
     public void setHostname(String hostname) {
         this. = hostname;
     }
    
    
The instance host name.

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

Parameters:
hostname The instance host name.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withHostname(String hostname) {
         this. = hostname;
         return this;
     }

    
The stack ID.

Returns:
The stack ID.
 
     public String getStackId() {
         return ;
     }
    
    
The stack ID.

Parameters:
stackId The stack ID.
 
     public void setStackId(String stackId) {
         this. = stackId;
     }
    
    
The stack ID.

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

Parameters:
stackId The stack ID.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withStackId(String stackId) {
         this. = stackId;
         return this;
     }

    
An array containing the instance layer IDs.

Returns:
An array containing the instance layer IDs.
 
     public java.util.List<StringgetLayerIds() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
An array containing the instance layer IDs.

Parameters:
layerIds An array containing the instance layer IDs.
 
     public void setLayerIds(java.util.Collection<StringlayerIds) {
         if (layerIds == null) {
             this. = null;
             return;
         }
         layerIdsCopy.addAll(layerIds);
         this. = layerIdsCopy;
     }
    
    
An array containing the instance layer IDs.

NOTE: This method appends the values to the existing list (if any). Use setLayerIds(java.util.Collection) or withLayerIds(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:
layerIds An array containing the instance layer IDs.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withLayerIds(String... layerIds) {
         if (getLayerIds() == nullsetLayerIds(new java.util.ArrayList<String>(layerIds.length));
         for (String value : layerIds) {
             getLayerIds().add(value);
         }
         return this;
     }
    
    
An array containing the instance layer IDs.

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

Parameters:
layerIds An array containing the instance layer IDs.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withLayerIds(java.util.Collection<StringlayerIds) {
         if (layerIds == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringlayerIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(layerIds.size());
             layerIdsCopy.addAll(layerIds);
             this. = layerIdsCopy;
         }
 
         return this;
     }

    
An array containing the instance security group IDs.

Returns:
An array containing the instance security group IDs.
 
     public java.util.List<StringgetSecurityGroupIds() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
An array containing the instance security group IDs.

Parameters:
securityGroupIds An array containing the instance security group IDs.
 
     public void setSecurityGroupIds(java.util.Collection<StringsecurityGroupIds) {
         if (securityGroupIds == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringsecurityGroupIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(securityGroupIds.size());
         securityGroupIdsCopy.addAll(securityGroupIds);
         this. = securityGroupIdsCopy;
     }
    
    
An array containing the instance security group IDs.

NOTE: This method appends the values to the existing list (if any). Use setSecurityGroupIds(java.util.Collection) or withSecurityGroupIds(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:
securityGroupIds An array containing the instance security group IDs.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withSecurityGroupIds(String... securityGroupIds) {
         if (getSecurityGroupIds() == nullsetSecurityGroupIds(new java.util.ArrayList<String>(securityGroupIds.length));
         for (String value : securityGroupIds) {
             getSecurityGroupIds().add(value);
         }
         return this;
     }
    
    
An array containing the instance security group IDs.

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

Parameters:
securityGroupIds An array containing the instance security group IDs.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withSecurityGroupIds(java.util.Collection<StringsecurityGroupIds) {
         if (securityGroupIds == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringsecurityGroupIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(securityGroupIds.size());
             securityGroupIdsCopy.addAll(securityGroupIds);
             this. = securityGroupIdsCopy;
         }
 
         return this;
     }

    
The instance type. AWS OpsWorks supports all instance types except Cluster Compute, Cluster GPU, and High Memory Cluster. For more information, see Instance Families and Types. The parameter values that specify the various types are in the API Name column of the Available Instance Types table.

Returns:
The instance type. AWS OpsWorks supports all instance types except Cluster Compute, Cluster GPU, and High Memory Cluster. For more information, see Instance Families and Types. The parameter values that specify the various types are in the API Name column of the Available Instance Types table.
 
     public String getInstanceType() {
         return ;
     }
    
    
The instance type. AWS OpsWorks supports all instance types except Cluster Compute, Cluster GPU, and High Memory Cluster. For more information, see Instance Families and Types. The parameter values that specify the various types are in the API Name column of the Available Instance Types table.

Parameters:
instanceType The instance type. AWS OpsWorks supports all instance types except Cluster Compute, Cluster GPU, and High Memory Cluster. For more information, see Instance Families and Types. The parameter values that specify the various types are in the API Name column of the Available Instance Types table.
 
     public void setInstanceType(String instanceType) {
         this. = instanceType;
     }
    
    
The instance type. AWS OpsWorks supports all instance types except Cluster Compute, Cluster GPU, and High Memory Cluster. For more information, see Instance Families and Types. The parameter values that specify the various types are in the API Name column of the Available Instance Types table.

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

Parameters:
instanceType The instance type. AWS OpsWorks supports all instance types except Cluster Compute, Cluster GPU, and High Memory Cluster. For more information, see Instance Families and Types. The parameter values that specify the various types are in the API Name column of the Available Instance Types table.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withInstanceType(String instanceType) {
         this. = instanceType;
         return this;
     }

    
The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.

Returns:
The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.
 
     public String getInstanceProfileArn() {
         return ;
     }
    
    
The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.

Parameters:
instanceProfileArn The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.
 
     public void setInstanceProfileArn(String instanceProfileArn) {
         this. = instanceProfileArn;
     }
    
    
The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.

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

Parameters:
instanceProfileArn The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withInstanceProfileArn(String instanceProfileArn) {
         this. = instanceProfileArn;
         return this;
     }

    
The instance status:
  • booting
  • connection_lost
  • online
  • pending
  • rebooting
  • requested
  • running_setup
  • setup_failed
  • shutting_down
  • start_failed
  • stopped
  • stopping
  • terminated
  • terminating

Returns:
The instance status:
  • booting
  • connection_lost
  • online
  • pending
  • rebooting
  • requested
  • running_setup
  • setup_failed
  • shutting_down
  • start_failed
  • stopped
  • stopping
  • terminated
  • terminating
 
     public String getStatus() {
         return ;
     }
    
    
The instance status:
  • booting
  • connection_lost
  • online
  • pending
  • rebooting
  • requested
  • running_setup
  • setup_failed
  • shutting_down
  • start_failed
  • stopped
  • stopping
  • terminated
  • terminating

Parameters:
status The instance status:
  • booting
  • connection_lost
  • online
  • pending
  • rebooting
  • requested
  • running_setup
  • setup_failed
  • shutting_down
  • start_failed
  • stopped
  • stopping
  • terminated
  • terminating
 
     public void setStatus(String status) {
         this. = status;
     }
    
    
The instance status:
  • booting
  • connection_lost
  • online
  • pending
  • rebooting
  • requested
  • running_setup
  • setup_failed
  • shutting_down
  • start_failed
  • stopped
  • stopping
  • terminated
  • terminating

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

Parameters:
status The instance status:
  • booting
  • connection_lost
  • online
  • pending
  • rebooting
  • requested
  • running_setup
  • setup_failed
  • shutting_down
  • start_failed
  • stopped
  • stopping
  • terminated
  • terminating
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withStatus(String status) {
         this. = status;
         return this;
     }

    
The instance's operating system.

Returns:
The instance's operating system.
 
     public String getOs() {
         return ;
     }
    
    
The instance's operating system.

Parameters:
os The instance's operating system.
 
     public void setOs(String os) {
         this. = os;
     }
    
    
The instance's operating system.

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

Parameters:
os The instance's operating system.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withOs(String os) {
         this. = os;
         return this;
     }

    
A custom AMI ID to be used to create the instance. The AMI should be based on one of the standard AWS OpsWorks APIs: Amazon Linux, Ubuntu 12.04 LTS, or Ubuntu 14.04 LTS. For more information, see Instances

Returns:
A custom AMI ID to be used to create the instance. The AMI should be based on one of the standard AWS OpsWorks APIs: Amazon Linux, Ubuntu 12.04 LTS, or Ubuntu 14.04 LTS. For more information, see Instances
 
     public String getAmiId() {
         return ;
     }
    
    
A custom AMI ID to be used to create the instance. The AMI should be based on one of the standard AWS OpsWorks APIs: Amazon Linux, Ubuntu 12.04 LTS, or Ubuntu 14.04 LTS. For more information, see Instances

Parameters:
amiId A custom AMI ID to be used to create the instance. The AMI should be based on one of the standard AWS OpsWorks APIs: Amazon Linux, Ubuntu 12.04 LTS, or Ubuntu 14.04 LTS. For more information, see Instances
 
     public void setAmiId(String amiId) {
         this. = amiId;
     }
    
    
A custom AMI ID to be used to create the instance. The AMI should be based on one of the standard AWS OpsWorks APIs: Amazon Linux, Ubuntu 12.04 LTS, or Ubuntu 14.04 LTS. For more information, see Instances

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

Parameters:
amiId A custom AMI ID to be used to create the instance. The AMI should be based on one of the standard AWS OpsWorks APIs: Amazon Linux, Ubuntu 12.04 LTS, or Ubuntu 14.04 LTS. For more information, see Instances
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withAmiId(String amiId) {
         this. = amiId;
         return this;
     }

    
The instance Availability Zone. For more information, see Regions and Endpoints.

Returns:
The instance Availability Zone. For more information, see Regions and Endpoints.
 
     public String getAvailabilityZone() {
         return ;
     }
    
    
The instance Availability Zone. For more information, see Regions and Endpoints.

Parameters:
availabilityZone The instance Availability Zone. For more information, see Regions and Endpoints.
 
     public void setAvailabilityZone(String availabilityZone) {
         this. = availabilityZone;
     }
    
    
The instance Availability Zone. For more information, see Regions and Endpoints.

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

Parameters:
availabilityZone The instance Availability Zone. For more information, see Regions and Endpoints.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Instance withAvailabilityZone(String availabilityZone) {
         this. = availabilityZone;
         return this;
     }

    
The instance's subnet ID, if the stack is running in a VPC.

Returns:
The instance's subnet ID, if the stack is running in a VPC.
 
     public String getSubnetId() {
         return ;
     }
    
    
The instance's subnet ID, if the stack is running in a VPC.

Parameters:
subnetId The instance's subnet ID, if the stack is running in a VPC.
 
     public void setSubnetId(String subnetId) {
         this. = subnetId;
     }
    
    
The instance's subnet ID, if the stack is running in a VPC.

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

Parameters:
subnetId The instance's subnet ID, if the stack is running in a VPC.
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 instance public DNS name.

Returns:
The instance public DNS name.
 
     public String getPublicDns() {
         return ;
     }
    
    
The instance public DNS name.

Parameters:
publicDns The instance public DNS name.
 
     public void setPublicDns(String publicDns) {
         this. = publicDns;
     }
    
    
The instance public DNS name.

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

Parameters:
publicDns The instance public DNS name.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withPublicDns(String publicDns) {
        this. = publicDns;
        return this;
    }

    
The instance private DNS name.

Returns:
The instance private DNS name.
    public String getPrivateDns() {
        return ;
    }
    
    
The instance private DNS name.

Parameters:
privateDns The instance private DNS name.
    public void setPrivateDns(String privateDns) {
        this. = privateDns;
    }
    
    
The instance private DNS name.

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

Parameters:
privateDns The instance private DNS name.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withPrivateDns(String privateDns) {
        this. = privateDns;
        return this;
    }

    
The instance public IP address.

Returns:
The instance public IP address.
    public String getPublicIp() {
        return ;
    }
    
    
The instance public IP address.

Parameters:
publicIp The instance public IP address.
    public void setPublicIp(String publicIp) {
        this. = publicIp;
    }
    
    
The instance public IP address.

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

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

    
The instance private IP address.

Returns:
The instance private IP address.
    public String getPrivateIp() {
        return ;
    }
    
    
The instance private IP address.

Parameters:
privateIp The instance private IP address.
    public void setPrivateIp(String privateIp) {
        this. = privateIp;
    }
    
    
The instance private IP address.

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

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

    
The instance Elastic IP address .

Returns:
The instance Elastic IP address .
    public String getElasticIp() {
        return ;
    }
    
    
The instance Elastic IP address .

Parameters:
elasticIp The instance Elastic IP address .
    public void setElasticIp(String elasticIp) {
        this. = elasticIp;
    }
    
    
The instance Elastic IP address .

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

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

    
For load-based or time-based instances, the type.

Constraints:
Allowed Values: load, timer

Returns:
For load-based or time-based instances, the type.
See also:
AutoScalingType
    public String getAutoScalingType() {
        return ;
    }
    
    
For load-based or time-based instances, the type.

Constraints:
Allowed Values: load, timer

Parameters:
autoScalingType For load-based or time-based instances, the type.
See also:
AutoScalingType
    public void setAutoScalingType(String autoScalingType) {
        this. = autoScalingType;
    }
    
    
For load-based or time-based instances, the type.

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

Constraints:
Allowed Values: load, timer

Parameters:
autoScalingType For load-based or time-based instances, the type.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
AutoScalingType
    public Instance withAutoScalingType(String autoScalingType) {
        this. = autoScalingType;
        return this;
    }

    
For load-based or time-based instances, the type.

Constraints:
Allowed Values: load, timer

Parameters:
autoScalingType For load-based or time-based instances, the type.
See also:
AutoScalingType
    public void setAutoScalingType(AutoScalingType autoScalingType) {
        this. = autoScalingType.toString();
    }
    
    
For load-based or time-based instances, the type.

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

Constraints:
Allowed Values: load, timer

Parameters:
autoScalingType For load-based or time-based instances, the type.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
AutoScalingType
    public Instance withAutoScalingType(AutoScalingType autoScalingType) {
        this. = autoScalingType.toString();
        return this;
    }

    
The instance's Amazon EC2 key pair name.

Returns:
The instance's Amazon EC2 key pair name.
    public String getSshKeyName() {
        return ;
    }
    
    
The instance's Amazon EC2 key pair name.

Parameters:
sshKeyName The instance's Amazon EC2 key pair name.
    public void setSshKeyName(String sshKeyName) {
        this. = sshKeyName;
    }
    
    
The instance's Amazon EC2 key pair name.

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

Parameters:
sshKeyName The instance's Amazon EC2 key pair name.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withSshKeyName(String sshKeyName) {
        this. = sshKeyName;
        return this;
    }

    
The SSH key's RSA fingerprint.

Returns:
The SSH key's RSA fingerprint.
        return ;
    }
    
    
The SSH key's RSA fingerprint.

Parameters:
sshHostRsaKeyFingerprint The SSH key's RSA fingerprint.
    public void setSshHostRsaKeyFingerprint(String sshHostRsaKeyFingerprint) {
        this. = sshHostRsaKeyFingerprint;
    }
    
    
The SSH key's RSA fingerprint.

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

Parameters:
sshHostRsaKeyFingerprint The SSH key's RSA fingerprint.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withSshHostRsaKeyFingerprint(String sshHostRsaKeyFingerprint) {
        this. = sshHostRsaKeyFingerprint;
        return this;
    }

    
The SSH key's DSA fingerprint.

Returns:
The SSH key's DSA fingerprint.
        return ;
    }
    
    
The SSH key's DSA fingerprint.

Parameters:
sshHostDsaKeyFingerprint The SSH key's DSA fingerprint.
    public void setSshHostDsaKeyFingerprint(String sshHostDsaKeyFingerprint) {
        this. = sshHostDsaKeyFingerprint;
    }
    
    
The SSH key's DSA fingerprint.

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

Parameters:
sshHostDsaKeyFingerprint The SSH key's DSA fingerprint.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withSshHostDsaKeyFingerprint(String sshHostDsaKeyFingerprint) {
        this. = sshHostDsaKeyFingerprint;
        return this;
    }

    
The time that the instance was created.

Returns:
The time that the instance was created.
    public String getCreatedAt() {
        return ;
    }
    
    
The time that the instance was created.

Parameters:
createdAt The time that the instance was created.
    public void setCreatedAt(String createdAt) {
        this. = createdAt;
    }
    
    
The time that the instance was created.

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

Parameters:
createdAt The time that the instance was created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withCreatedAt(String createdAt) {
        this. = createdAt;
        return this;
    }

    
The ID of the last service error. For more information, call DescribeServiceErrors.

Returns:
The ID of the last service error. For more information, call DescribeServiceErrors.
    public String getLastServiceErrorId() {
        return ;
    }
    
    
The ID of the last service error. For more information, call DescribeServiceErrors.

Parameters:
lastServiceErrorId The ID of the last service error. For more information, call DescribeServiceErrors.
    public void setLastServiceErrorId(String lastServiceErrorId) {
        this. = lastServiceErrorId;
    }
    
    
The ID of the last service error. For more information, call DescribeServiceErrors.

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

Parameters:
lastServiceErrorId The ID of the last service error. For more information, call DescribeServiceErrors.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withLastServiceErrorId(String lastServiceErrorId) {
        this. = lastServiceErrorId;
        return this;
    }

    
The instance architecture, "i386" or "x86_64".

Constraints:
Allowed Values: x86_64, i386

Returns:
The instance architecture, "i386" or "x86_64".
See also:
Architecture
    public String getArchitecture() {
        return ;
    }
    
    
The instance architecture, "i386" or "x86_64".

Constraints:
Allowed Values: x86_64, i386

Parameters:
architecture The instance architecture, "i386" or "x86_64".
See also:
Architecture
    public void setArchitecture(String architecture) {
        this. = architecture;
    }
    
    
The instance architecture, "i386" or "x86_64".

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

Constraints:
Allowed Values: x86_64, i386

Parameters:
architecture The instance architecture, "i386" or "x86_64".
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
Architecture
    public Instance withArchitecture(String architecture) {
        this. = architecture;
        return this;
    }

    
The instance architecture, "i386" or "x86_64".

Constraints:
Allowed Values: x86_64, i386

Parameters:
architecture The instance architecture, "i386" or "x86_64".
See also:
Architecture
    public void setArchitecture(Architecture architecture) {
        this. = architecture.toString();
    }
    
    
The instance architecture, "i386" or "x86_64".

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

Constraints:
Allowed Values: x86_64, i386

Parameters:
architecture The instance architecture, "i386" or "x86_64".
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
Architecture
    public Instance withArchitecture(Architecture architecture) {
        this. = architecture.toString();
        return this;
    }

    
The instance's root device type. For more information, see Storage for the Root Device.

Constraints:
Allowed Values: ebs, instance-store

Returns:
The instance's root device type. For more information, see Storage for the Root Device.
See also:
RootDeviceType
    public String getRootDeviceType() {
        return ;
    }
    
    
The instance's root device type. For more information, see Storage for the Root Device.

Constraints:
Allowed Values: ebs, instance-store

Parameters:
rootDeviceType The instance's root device type. For more information, see Storage for the Root Device.
See also:
RootDeviceType
    public void setRootDeviceType(String rootDeviceType) {
        this. = rootDeviceType;
    }
    
    
The instance's root device type. For more information, see Storage for the Root Device.

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

Constraints:
Allowed Values: ebs, instance-store

Parameters:
rootDeviceType The instance's root device type. For more information, see Storage for the Root Device.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RootDeviceType
    public Instance withRootDeviceType(String rootDeviceType) {
        this. = rootDeviceType;
        return this;
    }

    
The instance's root device type. For more information, see Storage for the Root Device.

Constraints:
Allowed Values: ebs, instance-store

Parameters:
rootDeviceType The instance's root device type. For more information, see Storage for the Root Device.
See also:
RootDeviceType
    public void setRootDeviceType(RootDeviceType rootDeviceType) {
        this. = rootDeviceType.toString();
    }
    
    
The instance's root device type. For more information, see Storage for the Root Device.

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

Constraints:
Allowed Values: ebs, instance-store

Parameters:
rootDeviceType The instance's root device type. For more information, see Storage for the Root Device.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RootDeviceType
    public Instance withRootDeviceType(RootDeviceType rootDeviceType) {
        this. = rootDeviceType.toString();
        return this;
    }

    
The root device volume ID.

Returns:
The root device volume ID.
    public String getRootDeviceVolumeId() {
        return ;
    }
    
    
The root device volume ID.

Parameters:
rootDeviceVolumeId The root device volume ID.
    public void setRootDeviceVolumeId(String rootDeviceVolumeId) {
        this. = rootDeviceVolumeId;
    }
    
    
The root device volume ID.

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

Parameters:
rootDeviceVolumeId The root device volume ID.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withRootDeviceVolumeId(String rootDeviceVolumeId) {
        this. = rootDeviceVolumeId;
        return this;
    }

    
An array of BlockDeviceMapping objects that specify the instance's block device mappings.

Returns:
An array of BlockDeviceMapping objects that specify the instance's block device mappings.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
An array of BlockDeviceMapping objects that specify the instance's block device mappings.

Parameters:
blockDeviceMappings An array of BlockDeviceMapping objects that specify the instance's block device mappings.
    public void setBlockDeviceMappings(java.util.Collection<BlockDeviceMappingblockDeviceMappings) {
        if (blockDeviceMappings == null) {
            this. = null;
            return;
        }
        blockDeviceMappingsCopy.addAll(blockDeviceMappings);
        this. = blockDeviceMappingsCopy;
    }
    
    
An array of BlockDeviceMapping objects that specify the instance's block device mappings.

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 An array of BlockDeviceMapping objects that specify the instance's block device mappings.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings) {
        if (getBlockDeviceMappings() == nullsetBlockDeviceMappings(new java.util.ArrayList<BlockDeviceMapping>(blockDeviceMappings.length));
        for (BlockDeviceMapping value : blockDeviceMappings) {
            getBlockDeviceMappings().add(value);
        }
        return this;
    }
    
    
An array of BlockDeviceMapping objects that specify the instance's block device mappings.

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

Parameters:
blockDeviceMappings An array of BlockDeviceMapping objects that specify the instance's block device mappings.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withBlockDeviceMappings(java.util.Collection<BlockDeviceMappingblockDeviceMappings) {
        if (blockDeviceMappings == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<BlockDeviceMappingblockDeviceMappingsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<BlockDeviceMapping>(blockDeviceMappings.size());
            blockDeviceMappingsCopy.addAll(blockDeviceMappings);
            this. = blockDeviceMappingsCopy;
        }
        return this;
    }

    
Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

Returns:
Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

    public Boolean isInstallUpdatesOnBoot() {
        return ;
    }
    
    
Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

Parameters:
installUpdatesOnBoot Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

    public void setInstallUpdatesOnBoot(Boolean installUpdatesOnBoot) {
        this. = installUpdatesOnBoot;
    }
    
    
Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

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

Parameters:
installUpdatesOnBoot Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withInstallUpdatesOnBoot(Boolean installUpdatesOnBoot) {
        this. = installUpdatesOnBoot;
        return this;
    }

    
Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

Returns:
Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

    public Boolean getInstallUpdatesOnBoot() {
        return ;
    }

    
Whether this is an Amazon EBS-optimized instance.

Returns:
Whether this is an Amazon EBS-optimized instance.
    public Boolean isEbsOptimized() {
        return ;
    }
    
    
Whether this is an Amazon EBS-optimized instance.

Parameters:
ebsOptimized Whether this is an Amazon EBS-optimized instance.
    public void setEbsOptimized(Boolean ebsOptimized) {
        this. = ebsOptimized;
    }
    
    
Whether this is an Amazon EBS-optimized instance.

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

Parameters:
ebsOptimized Whether this is an Amazon 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;
    }

    
Whether this is an Amazon EBS-optimized instance.

Returns:
Whether this is an Amazon EBS-optimized instance.
    public Boolean getEbsOptimized() {
        return ;
    }

    
The instance's reported AWS OpsWorks agent version.

Returns:
The instance's reported AWS OpsWorks agent version.
    public String getReportedAgentVersion() {
        return ;
    }
    
    
The instance's reported AWS OpsWorks agent version.

Parameters:
reportedAgentVersion The instance's reported AWS OpsWorks agent version.
    public void setReportedAgentVersion(String reportedAgentVersion) {
        this. = reportedAgentVersion;
    }
    
    
The instance's reported AWS OpsWorks agent version.

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

Parameters:
reportedAgentVersion The instance's reported AWS OpsWorks agent version.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withReportedAgentVersion(String reportedAgentVersion) {
        this. = reportedAgentVersion;
        return this;
    }

    
For registered instances, the reported operating system.

Returns:
For registered instances, the reported operating system.
    public ReportedOs getReportedOs() {
        return ;
    }
    
    
For registered instances, the reported operating system.

Parameters:
reportedOs For registered instances, the reported operating system.
    public void setReportedOs(ReportedOs reportedOs) {
        this. = reportedOs;
    }
    
    
For registered instances, the reported operating system.

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

Parameters:
reportedOs For registered instances, the reported operating system.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withReportedOs(ReportedOs reportedOs) {
        this. = reportedOs;
        return this;
    }

    
For registered instances, the infrastructure class: ec2 or on-premises

Returns:
For registered instances, the infrastructure class: ec2 or on-premises
    public String getInfrastructureClass() {
        return ;
    }
    
    
For registered instances, the infrastructure class: ec2 or on-premises

Parameters:
infrastructureClass For registered instances, the infrastructure class: ec2 or on-premises
    public void setInfrastructureClass(String infrastructureClass) {
        this. = infrastructureClass;
    }
    
    
For registered instances, the infrastructure class: ec2 or on-premises

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

Parameters:
infrastructureClass For registered instances, the infrastructure class: ec2 or on-premises
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withInfrastructureClass(String infrastructureClass) {
        this. = infrastructureClass;
        return this;
    }

    
For registered instances, who performed the registration.

Returns:
For registered instances, who performed the registration.
    public String getRegisteredBy() {
        return ;
    }
    
    
For registered instances, who performed the registration.

Parameters:
registeredBy For registered instances, who performed the registration.
    public void setRegisteredBy(String registeredBy) {
        this. = registeredBy;
    }
    
    
For registered instances, who performed the registration.

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

Parameters:
registeredBy For registered instances, who performed the registration.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Instance withRegisteredBy(String registeredBy) {
        this. = registeredBy;
        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 (getEc2InstanceId() != nullsb.append("Ec2InstanceId: " + getEc2InstanceId() + ",");
        if (getVirtualizationType() != nullsb.append("VirtualizationType: " + getVirtualizationType() + ",");
        if (getHostname() != nullsb.append("Hostname: " + getHostname() + ",");
        if (getStackId() != nullsb.append("StackId: " + getStackId() + ",");
        if (getLayerIds() != nullsb.append("LayerIds: " + getLayerIds() + ",");
        if (getSecurityGroupIds() != nullsb.append("SecurityGroupIds: " + getSecurityGroupIds() + ",");
        if (getInstanceType() != nullsb.append("InstanceType: " + getInstanceType() + ",");
        if (getInstanceProfileArn() != nullsb.append("InstanceProfileArn: " + getInstanceProfileArn() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (getOs() != nullsb.append("Os: " + getOs() + ",");
        if (getAmiId() != nullsb.append("AmiId: " + getAmiId() + ",");
        if (getAvailabilityZone() != nullsb.append("AvailabilityZone: " + getAvailabilityZone() + ",");
        if (getSubnetId() != nullsb.append("SubnetId: " + getSubnetId() + ",");
        if (getPublicDns() != nullsb.append("PublicDns: " + getPublicDns() + ",");
        if (getPrivateDns() != nullsb.append("PrivateDns: " + getPrivateDns() + ",");
        if (getPublicIp() != nullsb.append("PublicIp: " + getPublicIp() + ",");
        if (getPrivateIp() != nullsb.append("PrivateIp: " + getPrivateIp() + ",");
        if (getElasticIp() != nullsb.append("ElasticIp: " + getElasticIp() + ",");
        if (getAutoScalingType() != nullsb.append("AutoScalingType: " + getAutoScalingType() + ",");
        if (getSshKeyName() != nullsb.append("SshKeyName: " + getSshKeyName() + ",");
        if (getSshHostRsaKeyFingerprint() != nullsb.append("SshHostRsaKeyFingerprint: " + getSshHostRsaKeyFingerprint() + ",");
        if (getSshHostDsaKeyFingerprint() != nullsb.append("SshHostDsaKeyFingerprint: " + getSshHostDsaKeyFingerprint() + ",");
        if (getCreatedAt() != nullsb.append("CreatedAt: " + getCreatedAt() + ",");
        if (getLastServiceErrorId() != nullsb.append("LastServiceErrorId: " + getLastServiceErrorId() + ",");
        if (getArchitecture() != nullsb.append("Architecture: " + getArchitecture() + ",");
        if (getRootDeviceType() != nullsb.append("RootDeviceType: " + getRootDeviceType() + ",");
        if (getRootDeviceVolumeId() != nullsb.append("RootDeviceVolumeId: " + getRootDeviceVolumeId() + ",");
        if (getBlockDeviceMappings() != nullsb.append("BlockDeviceMappings: " + getBlockDeviceMappings() + ",");
        if (isInstallUpdatesOnBoot() != nullsb.append("InstallUpdatesOnBoot: " + isInstallUpdatesOnBoot() + ",");
        if (isEbsOptimized() != nullsb.append("EbsOptimized: " + isEbsOptimized() + ",");
        if (getReportedAgentVersion() != nullsb.append("ReportedAgentVersion: " + getReportedAgentVersion() + ",");
        if (getReportedOs() != nullsb.append("ReportedOs: " + getReportedOs() + ",");
        if (getInfrastructureClass() != nullsb.append("InfrastructureClass: " + getInfrastructureClass() + ",");
        if (getRegisteredBy() != nullsb.append("RegisteredBy: " + getRegisteredBy() );
        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 + ((getEc2InstanceId() == null) ? 0 : getEc2InstanceId().hashCode()); 
        hashCode = prime * hashCode + ((getVirtualizationType() == null) ? 0 : getVirtualizationType().hashCode()); 
        hashCode = prime * hashCode + ((getHostname() == null) ? 0 : getHostname().hashCode()); 
        hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); 
        hashCode = prime * hashCode + ((getLayerIds() == null) ? 0 : getLayerIds().hashCode()); 
        hashCode = prime * hashCode + ((getSecurityGroupIds() == null) ? 0 : getSecurityGroupIds().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceProfileArn() == null) ? 0 : getInstanceProfileArn().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((getOs() == null) ? 0 : getOs().hashCode()); 
        hashCode = prime * hashCode + ((getAmiId() == null) ? 0 : getAmiId().hashCode()); 
        hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); 
        hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); 
        hashCode = prime * hashCode + ((getPublicDns() == null) ? 0 : getPublicDns().hashCode()); 
        hashCode = prime * hashCode + ((getPrivateDns() == null) ? 0 : getPrivateDns().hashCode()); 
        hashCode = prime * hashCode + ((getPublicIp() == null) ? 0 : getPublicIp().hashCode()); 
        hashCode = prime * hashCode + ((getPrivateIp() == null) ? 0 : getPrivateIp().hashCode()); 
        hashCode = prime * hashCode + ((getElasticIp() == null) ? 0 : getElasticIp().hashCode()); 
        hashCode = prime * hashCode + ((getAutoScalingType() == null) ? 0 : getAutoScalingType().hashCode()); 
        hashCode = prime * hashCode + ((getSshKeyName() == null) ? 0 : getSshKeyName().hashCode()); 
        hashCode = prime * hashCode + ((getSshHostRsaKeyFingerprint() == null) ? 0 : getSshHostRsaKeyFingerprint().hashCode()); 
        hashCode = prime * hashCode + ((getSshHostDsaKeyFingerprint() == null) ? 0 : getSshHostDsaKeyFingerprint().hashCode()); 
        hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); 
        hashCode = prime * hashCode + ((getLastServiceErrorId() == null) ? 0 : getLastServiceErrorId().hashCode()); 
        hashCode = prime * hashCode + ((getArchitecture() == null) ? 0 : getArchitecture().hashCode()); 
        hashCode = prime * hashCode + ((getRootDeviceType() == null) ? 0 : getRootDeviceType().hashCode()); 
        hashCode = prime * hashCode + ((getRootDeviceVolumeId() == null) ? 0 : getRootDeviceVolumeId().hashCode()); 
        hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); 
        hashCode = prime * hashCode + ((isInstallUpdatesOnBoot() == null) ? 0 : isInstallUpdatesOnBoot().hashCode()); 
        hashCode = prime * hashCode + ((isEbsOptimized() == null) ? 0 : isEbsOptimized().hashCode()); 
        hashCode = prime * hashCode + ((getReportedAgentVersion() == null) ? 0 : getReportedAgentVersion().hashCode()); 
        hashCode = prime * hashCode + ((getReportedOs() == null) ? 0 : getReportedOs().hashCode()); 
        hashCode = prime * hashCode + ((getInfrastructureClass() == null) ? 0 : getInfrastructureClass().hashCode()); 
        hashCode = prime * hashCode + ((getRegisteredBy() == null) ? 0 : getRegisteredBy().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof Instance == falsereturn false;
        Instance other = (Instance)obj;
        
        if (other.getInstanceId() == null ^ this.getInstanceId() == nullreturn false;
        if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == falsereturn false
        if (other.getEc2InstanceId() == null ^ this.getEc2InstanceId() == nullreturn false;
        if (other.getEc2InstanceId() != null && other.getEc2InstanceId().equals(this.getEc2InstanceId()) == falsereturn false
        if (other.getVirtualizationType() == null ^ this.getVirtualizationType() == nullreturn false;
        if (other.getVirtualizationType() != null && other.getVirtualizationType().equals(this.getVirtualizationType()) == falsereturn false
        if (other.getHostname() == null ^ this.getHostname() == nullreturn false;
        if (other.getHostname() != null && other.getHostname().equals(this.getHostname()) == falsereturn false
        if (other.getStackId() == null ^ this.getStackId() == nullreturn false;
        if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == falsereturn false
        if (other.getLayerIds() == null ^ this.getLayerIds() == nullreturn false;
        if (other.getLayerIds() != null && other.getLayerIds().equals(this.getLayerIds()) == falsereturn false
        if (other.getSecurityGroupIds() == null ^ this.getSecurityGroupIds() == nullreturn false;
        if (other.getSecurityGroupIds() != null && other.getSecurityGroupIds().equals(this.getSecurityGroupIds()) == falsereturn false
        if (other.getInstanceType() == null ^ this.getInstanceType() == nullreturn false;
        if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == falsereturn false
        if (other.getInstanceProfileArn() == null ^ this.getInstanceProfileArn() == nullreturn false;
        if (other.getInstanceProfileArn() != null && other.getInstanceProfileArn().equals(this.getInstanceProfileArn()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.getOs() == null ^ this.getOs() == nullreturn false;
        if (other.getOs() != null && other.getOs().equals(this.getOs()) == falsereturn false
        if (other.getAmiId() == null ^ this.getAmiId() == nullreturn false;
        if (other.getAmiId() != null && other.getAmiId().equals(this.getAmiId()) == falsereturn false
        if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == nullreturn false;
        if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == falsereturn false
        if (other.getSubnetId() == null ^ this.getSubnetId() == nullreturn false;
        if (other.getSubnetId() != null && other.getSubnetId().equals(this.getSubnetId()) == falsereturn false
        if (other.getPublicDns() == null ^ this.getPublicDns() == nullreturn false;
        if (other.getPublicDns() != null && other.getPublicDns().equals(this.getPublicDns()) == falsereturn false
        if (other.getPrivateDns() == null ^ this.getPrivateDns() == nullreturn false;
        if (other.getPrivateDns() != null && other.getPrivateDns().equals(this.getPrivateDns()) == falsereturn false
        if (other.getPublicIp() == null ^ this.getPublicIp() == nullreturn false;
        if (other.getPublicIp() != null && other.getPublicIp().equals(this.getPublicIp()) == falsereturn false
        if (other.getPrivateIp() == null ^ this.getPrivateIp() == nullreturn false;
        if (other.getPrivateIp() != null && other.getPrivateIp().equals(this.getPrivateIp()) == falsereturn false
        if (other.getElasticIp() == null ^ this.getElasticIp() == nullreturn false;
        if (other.getElasticIp() != null && other.getElasticIp().equals(this.getElasticIp()) == falsereturn false
        if (other.getAutoScalingType() == null ^ this.getAutoScalingType() == nullreturn false;
        if (other.getAutoScalingType() != null && other.getAutoScalingType().equals(this.getAutoScalingType()) == falsereturn false
        if (other.getSshKeyName() == null ^ this.getSshKeyName() == nullreturn false;
        if (other.getSshKeyName() != null && other.getSshKeyName().equals(this.getSshKeyName()) == falsereturn false
        if (other.getSshHostRsaKeyFingerprint() == null ^ this.getSshHostRsaKeyFingerprint() == nullreturn false;
        if (other.getSshHostRsaKeyFingerprint() != null && other.getSshHostRsaKeyFingerprint().equals(this.getSshHostRsaKeyFingerprint()) == falsereturn false
        if (other.getSshHostDsaKeyFingerprint() == null ^ this.getSshHostDsaKeyFingerprint() == nullreturn false;
        if (other.getSshHostDsaKeyFingerprint() != null && other.getSshHostDsaKeyFingerprint().equals(this.getSshHostDsaKeyFingerprint()) == falsereturn false
        if (other.getCreatedAt() == null ^ this.getCreatedAt() == nullreturn false;
        if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == falsereturn false
        if (other.getLastServiceErrorId() == null ^ this.getLastServiceErrorId() == nullreturn false;
        if (other.getLastServiceErrorId() != null && other.getLastServiceErrorId().equals(this.getLastServiceErrorId()) == falsereturn false
        if (other.getArchitecture() == null ^ this.getArchitecture() == nullreturn false;
        if (other.getArchitecture() != null && other.getArchitecture().equals(this.getArchitecture()) == falsereturn false
        if (other.getRootDeviceType() == null ^ this.getRootDeviceType() == nullreturn false;
        if (other.getRootDeviceType() != null && other.getRootDeviceType().equals(this.getRootDeviceType()) == falsereturn false
        if (other.getRootDeviceVolumeId() == null ^ this.getRootDeviceVolumeId() == nullreturn false;
        if (other.getRootDeviceVolumeId() != null && other.getRootDeviceVolumeId().equals(this.getRootDeviceVolumeId()) == falsereturn false
        if (other.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == nullreturn false;
        if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals(this.getBlockDeviceMappings()) == falsereturn false
        if (other.isInstallUpdatesOnBoot() == null ^ this.isInstallUpdatesOnBoot() == nullreturn false;
        if (other.isInstallUpdatesOnBoot() != null && other.isInstallUpdatesOnBoot().equals(this.isInstallUpdatesOnBoot()) == falsereturn false
        if (other.isEbsOptimized() == null ^ this.isEbsOptimized() == nullreturn false;
        if (other.isEbsOptimized() != null && other.isEbsOptimized().equals(this.isEbsOptimized()) == falsereturn false
        if (other.getReportedAgentVersion() == null ^ this.getReportedAgentVersion() == nullreturn false;
        if (other.getReportedAgentVersion() != null && other.getReportedAgentVersion().equals(this.getReportedAgentVersion()) == falsereturn false
        if (other.getReportedOs() == null ^ this.getReportedOs() == nullreturn false;
        if (other.getReportedOs() != null && other.getReportedOs().equals(this.getReportedOs()) == falsereturn false
        if (other.getInfrastructureClass() == null ^ this.getInfrastructureClass() == nullreturn false;
        if (other.getInfrastructureClass() != null && other.getInfrastructureClass().equals(this.getInfrastructureClass()) == falsereturn false
        if (other.getRegisteredBy() == null ^ this.getRegisteredBy() == nullreturn false;
        if (other.getRegisteredBy() != null && other.getRegisteredBy().equals(this.getRegisteredBy()) == falsereturn false
        return true;
    }
    
    @Override