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

com.amazonaws.services.opsworks.model.Instance Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not
 * use this file except in compliance with the License. A copy of the License is
 * located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
package com.amazonaws.services.opsworks.model;

import java.io.Serializable;

/**
 * 

* Describes an instance. *

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

* The agent version. This parameter is set to INHERIT if the * instance inherits the default stack setting or to a a version number for * a fixed agent version. *

*/ private String agentVersion; /** *

* A custom AMI ID to be used to create the instance. For more information, * see Instances *

*/ private String amiId; /** *

* The instance architecture: "i386" or "x86_64". *

*/ private String architecture; /** *

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

*/ private String autoScalingType; /** *

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

*/ private String availabilityZone; /** *

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

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

* The time that the instance was created. *

*/ private String createdAt; /** *

* Whether this is an Amazon EBS-optimized instance. *

*/ private Boolean ebsOptimized; /** *

* The ID of the associated Amazon EC2 instance. *

*/ private String ec2InstanceId; /** *

* For container instances, the Amazon ECS cluster's ARN. *

*/ private String ecsClusterArn; /** *

* For container instances, the instance's ARN. *

*/ private String ecsContainerInstanceArn; /** *

* The instance Elastic IP address . *

*/ private String elasticIp; /** *

* The instance host name. *

*/ private String hostname; /** *

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

*/ private String infrastructureClass; /** *

* 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 by manually running yum (Amazon Linux) or * apt-get (Ubuntu) on the instances. *

* *

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

*
*/ private Boolean installUpdatesOnBoot; /** *

* The instance ID. *

*/ private String instanceId; /** *

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

*/ private String instanceProfileArn; /** *

* The instance type, such as t2.micro. *

*/ private String instanceType; /** *

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

*/ private String lastServiceErrorId; /** *

* An array containing the instance layer IDs. *

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

* The instance's operating system. *

*/ private String os; /** *

* The instance's platform. *

*/ private String platform; /** *

* The The instance's private DNS name. *

*/ private String privateDns; /** *

* The instance's private IP address. *

*/ private String privateIp; /** *

* The instance public DNS name. *

*/ private String publicDns; /** *

* The instance public IP address. *

*/ private String publicIp; /** *

* For registered instances, who performed the registration. *

*/ private String registeredBy; /** *

* The instance's reported AWS OpsWorks agent version. *

*/ private String reportedAgentVersion; /** *

* For registered instances, the reported operating system. *

*/ private ReportedOs reportedOs; /** *

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

*/ private String rootDeviceType; /** *

* The root device volume ID. *

*/ private String rootDeviceVolumeId; /** *

* An array containing the instance security group IDs. *

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

* The SSH key's Deep Security Agent (DSA) fingerprint. *

*/ private String sshHostDsaKeyFingerprint; /** *

* The SSH key's RSA fingerprint. *

*/ private String sshHostRsaKeyFingerprint; /** *

* The instance's Amazon EC2 key-pair name. *

*/ private String sshKeyName; /** *

* The stack ID. *

*/ private String stackId; /** *

* The instance status: *

*
    *
  • *

    * booting *

    *
  • *
  • *

    * connection_lost *

    *
  • *
  • *

    * online *

    *
  • *
  • *

    * pending *

    *
  • *
  • *

    * rebooting *

    *
  • *
  • *

    * requested *

    *
  • *
  • *

    * running_setup *

    *
  • *
  • *

    * setup_failed *

    *
  • *
  • *

    * shutting_down *

    *
  • *
  • *

    * start_failed *

    *
  • *
  • *

    * stop_failed *

    *
  • *
  • *

    * stopped *

    *
  • *
  • *

    * stopping *

    *
  • *
  • *

    * terminated *

    *
  • *
  • *

    * terminating *

    *
  • *
*/ private String status; /** *

* The instance's subnet ID; applicable only if the stack is running in a * VPC. *

*/ private String subnetId; /** *

* The instance's tenancy option, such as dedicated or * host. *

*/ private String tenancy; /** *

* The instance's virtualization type: paravirtual or * hvm. *

*/ private String virtualizationType; /** *

* The agent version. This parameter is set to INHERIT if the * instance inherits the default stack setting or to a a version number for * a fixed agent version. *

* * @param agentVersion * The agent version. This parameter is set to INHERIT * if the instance inherits the default stack setting or to a a * version number for a fixed agent version. */ public void setAgentVersion(String agentVersion) { this.agentVersion = agentVersion; } /** *

* The agent version. This parameter is set to INHERIT if the * instance inherits the default stack setting or to a a version number for * a fixed agent version. *

* * @return The agent version. This parameter is set to INHERIT * if the instance inherits the default stack setting or to a a * version number for a fixed agent version. */ public String getAgentVersion() { return this.agentVersion; } /** *

* The agent version. This parameter is set to INHERIT if the * instance inherits the default stack setting or to a a version number for * a fixed agent version. *

* * @param agentVersion * The agent version. This parameter is set to INHERIT * if the instance inherits the default stack setting or to a a * version number for a fixed agent version. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withAgentVersion(String agentVersion) { setAgentVersion(agentVersion); return this; } /** *

* A custom AMI ID to be used to create the instance. For more information, * see Instances *

* * @param amiId * A custom AMI ID to be used to create the instance. For more * information, see Instances */ public void setAmiId(String amiId) { this.amiId = amiId; } /** *

* A custom AMI ID to be used to create the instance. For more information, * see Instances *

* * @return A custom AMI ID to be used to create the instance. For more * information, see Instances */ public String getAmiId() { return this.amiId; } /** *

* A custom AMI ID to be used to create the instance. For more information, * see Instances *

* * @param amiId * A custom AMI ID to be used to create the instance. For more * information, see Instances * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withAmiId(String amiId) { setAmiId(amiId); return this; } /** *

* The instance architecture: "i386" or "x86_64". *

* * @param architecture * The instance architecture: "i386" or "x86_64". * @see Architecture */ public void setArchitecture(String architecture) { this.architecture = architecture; } /** *

* The instance architecture: "i386" or "x86_64". *

* * @return The instance architecture: "i386" or "x86_64". * @see Architecture */ public String getArchitecture() { return this.architecture; } /** *

* The instance architecture: "i386" or "x86_64". *

* * @param architecture * The instance architecture: "i386" or "x86_64". * @return Returns a reference to this object so that method calls can be * chained together. * @see Architecture */ public Instance withArchitecture(String architecture) { setArchitecture(architecture); return this; } /** *

* The instance architecture: "i386" or "x86_64". *

* * @param architecture * The instance architecture: "i386" or "x86_64". * @see Architecture */ public void setArchitecture(Architecture architecture) { this.architecture = architecture.toString(); } /** *

* The instance architecture: "i386" or "x86_64". *

* * @param architecture * The instance architecture: "i386" or "x86_64". * @return Returns a reference to this object so that method calls can be * chained together. * @see Architecture */ public Instance withArchitecture(Architecture architecture) { setArchitecture(architecture); return this; } /** *

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

* * @param autoScalingType * For load-based or time-based instances, the type. * @see AutoScalingType */ public void setAutoScalingType(String autoScalingType) { this.autoScalingType = autoScalingType; } /** *

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

* * @return For load-based or time-based instances, the type. * @see AutoScalingType */ public String getAutoScalingType() { return this.autoScalingType; } /** *

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

* * @param autoScalingType * For load-based or time-based instances, the type. * @return Returns a reference to this object so that method calls can be * chained together. * @see AutoScalingType */ public Instance withAutoScalingType(String autoScalingType) { setAutoScalingType(autoScalingType); return this; } /** *

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

* * @param autoScalingType * For load-based or time-based instances, the type. * @see AutoScalingType */ public void setAutoScalingType(AutoScalingType autoScalingType) { this.autoScalingType = autoScalingType.toString(); } /** *

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

* * @param autoScalingType * For load-based or time-based instances, the type. * @return Returns a reference to this object so that method calls can be * chained together. * @see AutoScalingType */ public Instance withAutoScalingType(AutoScalingType autoScalingType) { setAutoScalingType(autoScalingType); return this; } /** *

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

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

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

* * @return The instance Availability Zone. For more information, see * Regions and Endpoints. */ public String getAvailabilityZone() { return this.availabilityZone; } /** *

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

* * @param availabilityZone * The instance Availability Zone. For more information, see Regions and Endpoints. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** *

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

* * @return An array of BlockDeviceMapping objects that specify * the instance's block device mappings. */ public java.util.List getBlockDeviceMappings() { if (blockDeviceMappings == null) { blockDeviceMappings = new com.amazonaws.internal.SdkInternalList(); } return blockDeviceMappings; } /** *

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

* * @param blockDeviceMappings * An array of BlockDeviceMapping objects that specify * the instance's block device mappings. */ public void setBlockDeviceMappings( java.util.Collection blockDeviceMappings) { if (blockDeviceMappings == null) { this.blockDeviceMappings = null; return; } this.blockDeviceMappings = new com.amazonaws.internal.SdkInternalList( blockDeviceMappings); } /** *

* 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 {@link #setBlockDeviceMappings(java.util.Collection)} or * {@link #withBlockDeviceMappings(java.util.Collection)} if you want to * override the existing values. *

* * @param blockDeviceMappings * An array of BlockDeviceMapping objects that specify * the instance's block device mappings. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withBlockDeviceMappings( BlockDeviceMapping... blockDeviceMappings) { if (this.blockDeviceMappings == null) { setBlockDeviceMappings(new com.amazonaws.internal.SdkInternalList( blockDeviceMappings.length)); } for (BlockDeviceMapping ele : blockDeviceMappings) { this.blockDeviceMappings.add(ele); } return this; } /** *

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

* * @param blockDeviceMappings * An array of BlockDeviceMapping objects that specify * the instance's block device mappings. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withBlockDeviceMappings( java.util.Collection blockDeviceMappings) { setBlockDeviceMappings(blockDeviceMappings); return this; } /** *

* The time that the instance was created. *

* * @param createdAt * The time that the instance was created. */ public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } /** *

* The time that the instance was created. *

* * @return The time that the instance was created. */ public String getCreatedAt() { return this.createdAt; } /** *

* The time that the instance was created. *

* * @param createdAt * The time that the instance was created. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withCreatedAt(String createdAt) { setCreatedAt(createdAt); return this; } /** *

* Whether this is an Amazon EBS-optimized instance. *

* * @param ebsOptimized * Whether this is an Amazon EBS-optimized instance. */ public void setEbsOptimized(Boolean ebsOptimized) { this.ebsOptimized = ebsOptimized; } /** *

* Whether this is an Amazon EBS-optimized instance. *

* * @return Whether this is an Amazon EBS-optimized instance. */ public Boolean getEbsOptimized() { return this.ebsOptimized; } /** *

* Whether this is an Amazon EBS-optimized instance. *

* * @param ebsOptimized * Whether this is an Amazon EBS-optimized instance. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withEbsOptimized(Boolean ebsOptimized) { setEbsOptimized(ebsOptimized); return this; } /** *

* Whether this is an Amazon EBS-optimized instance. *

* * @return Whether this is an Amazon EBS-optimized instance. */ public Boolean isEbsOptimized() { return this.ebsOptimized; } /** *

* The ID of the associated Amazon EC2 instance. *

* * @param ec2InstanceId * The ID of the associated Amazon EC2 instance. */ public void setEc2InstanceId(String ec2InstanceId) { this.ec2InstanceId = ec2InstanceId; } /** *

* The ID of the associated Amazon EC2 instance. *

* * @return The ID of the associated Amazon EC2 instance. */ public String getEc2InstanceId() { return this.ec2InstanceId; } /** *

* The ID of the associated Amazon EC2 instance. *

* * @param ec2InstanceId * The ID of the associated Amazon EC2 instance. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withEc2InstanceId(String ec2InstanceId) { setEc2InstanceId(ec2InstanceId); return this; } /** *

* For container instances, the Amazon ECS cluster's ARN. *

* * @param ecsClusterArn * For container instances, the Amazon ECS cluster's ARN. */ public void setEcsClusterArn(String ecsClusterArn) { this.ecsClusterArn = ecsClusterArn; } /** *

* For container instances, the Amazon ECS cluster's ARN. *

* * @return For container instances, the Amazon ECS cluster's ARN. */ public String getEcsClusterArn() { return this.ecsClusterArn; } /** *

* For container instances, the Amazon ECS cluster's ARN. *

* * @param ecsClusterArn * For container instances, the Amazon ECS cluster's ARN. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withEcsClusterArn(String ecsClusterArn) { setEcsClusterArn(ecsClusterArn); return this; } /** *

* For container instances, the instance's ARN. *

* * @param ecsContainerInstanceArn * For container instances, the instance's ARN. */ public void setEcsContainerInstanceArn(String ecsContainerInstanceArn) { this.ecsContainerInstanceArn = ecsContainerInstanceArn; } /** *

* For container instances, the instance's ARN. *

* * @return For container instances, the instance's ARN. */ public String getEcsContainerInstanceArn() { return this.ecsContainerInstanceArn; } /** *

* For container instances, the instance's ARN. *

* * @param ecsContainerInstanceArn * For container instances, the instance's ARN. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withEcsContainerInstanceArn(String ecsContainerInstanceArn) { setEcsContainerInstanceArn(ecsContainerInstanceArn); return this; } /** *

* The instance Elastic IP address . *

* * @param elasticIp * The instance Elastic IP address . */ public void setElasticIp(String elasticIp) { this.elasticIp = elasticIp; } /** *

* The instance Elastic IP address . *

* * @return The instance Elastic IP address . */ public String getElasticIp() { return this.elasticIp; } /** *

* The instance Elastic IP address . *

* * @param elasticIp * The instance Elastic IP address . * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withElasticIp(String elasticIp) { setElasticIp(elasticIp); return this; } /** *

* The instance host name. *

* * @param hostname * The instance host name. */ public void setHostname(String hostname) { this.hostname = hostname; } /** *

* The instance host name. *

* * @return The instance host name. */ public String getHostname() { return this.hostname; } /** *

* The instance host name. *

* * @param hostname * The instance host name. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withHostname(String hostname) { setHostname(hostname); return this; } /** *

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

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

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

* * @return For registered instances, the infrastructure class: * ec2 or on-premises. */ public String getInfrastructureClass() { return this.infrastructureClass; } /** *

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

* * @param infrastructureClass * For registered instances, the infrastructure class: * ec2 or on-premises. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withInfrastructureClass(String infrastructureClass) { setInfrastructureClass(infrastructureClass); 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 by manually running yum (Amazon Linux) or * apt-get (Ubuntu) on the instances. *

* *

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

*
* * @param 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 by manually * running yum (Amazon Linux) or apt-get * (Ubuntu) on the instances.

*

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

*/ public void setInstallUpdatesOnBoot(Boolean installUpdatesOnBoot) { this.installUpdatesOnBoot = 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 by manually running yum (Amazon Linux) or * apt-get (Ubuntu) on the instances. *

* *

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

*
* * @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 by manually * running yum (Amazon Linux) or apt-get * (Ubuntu) on the instances.

*

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

*/ public Boolean getInstallUpdatesOnBoot() { return 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 by manually running yum (Amazon Linux) or * apt-get (Ubuntu) on the instances. *

* *

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

*
* * @param 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 by manually * running yum (Amazon Linux) or apt-get * (Ubuntu) on the instances.

*

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

* @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withInstallUpdatesOnBoot(Boolean installUpdatesOnBoot) { setInstallUpdatesOnBoot(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 by manually running yum (Amazon Linux) or * apt-get (Ubuntu) on the instances. *

* *

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

*
* * @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 by manually * running yum (Amazon Linux) or apt-get * (Ubuntu) on the instances.

*

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

*/ public Boolean isInstallUpdatesOnBoot() { return this.installUpdatesOnBoot; } /** *

* The instance ID. *

* * @param instanceId * The instance ID. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** *

* The instance ID. *

* * @return The instance ID. */ public String getInstanceId() { return this.instanceId; } /** *

* The instance ID. *

* * @param instanceId * The instance ID. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** *

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

* * @param 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 = instanceProfileArn; } /** *

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

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

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

* * @param instanceProfileArn * The ARN of the instance's IAM profile. For more information about * IAM ARNs, see Using Identifiers. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withInstanceProfileArn(String instanceProfileArn) { setInstanceProfileArn(instanceProfileArn); return this; } /** *

* The instance type, such as t2.micro. *

* * @param instanceType * The instance type, such as t2.micro. */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** *

* The instance type, such as t2.micro. *

* * @return The instance type, such as t2.micro. */ public String getInstanceType() { return this.instanceType; } /** *

* The instance type, such as t2.micro. *

* * @param instanceType * The instance type, such as t2.micro. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *

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

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

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

* * @return The ID of the last service error. For more information, call * DescribeServiceErrors. */ public String getLastServiceErrorId() { return this.lastServiceErrorId; } /** *

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

* * @param lastServiceErrorId * The ID of the last service error. For more information, call * DescribeServiceErrors. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withLastServiceErrorId(String lastServiceErrorId) { setLastServiceErrorId(lastServiceErrorId); return this; } /** *

* An array containing the instance layer IDs. *

* * @return An array containing the instance layer IDs. */ public java.util.List getLayerIds() { if (layerIds == null) { layerIds = new com.amazonaws.internal.SdkInternalList(); } return layerIds; } /** *

* An array containing the instance layer IDs. *

* * @param layerIds * An array containing the instance layer IDs. */ public void setLayerIds(java.util.Collection layerIds) { if (layerIds == null) { this.layerIds = null; return; } this.layerIds = new com.amazonaws.internal.SdkInternalList( layerIds); } /** *

* An array containing the instance layer IDs. *

*

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

* * @param layerIds * An array containing the instance layer IDs. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withLayerIds(String... layerIds) { if (this.layerIds == null) { setLayerIds(new com.amazonaws.internal.SdkInternalList( layerIds.length)); } for (String ele : layerIds) { this.layerIds.add(ele); } return this; } /** *

* An array containing the instance layer IDs. *

* * @param layerIds * An array containing the instance layer IDs. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withLayerIds(java.util.Collection layerIds) { setLayerIds(layerIds); return this; } /** *

* The instance's operating system. *

* * @param os * The instance's operating system. */ public void setOs(String os) { this.os = os; } /** *

* The instance's operating system. *

* * @return The instance's operating system. */ public String getOs() { return this.os; } /** *

* The instance's operating system. *

* * @param os * The instance's operating system. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withOs(String os) { setOs(os); return this; } /** *

* The instance's platform. *

* * @param platform * The instance's platform. */ public void setPlatform(String platform) { this.platform = platform; } /** *

* The instance's platform. *

* * @return The instance's platform. */ public String getPlatform() { return this.platform; } /** *

* The instance's platform. *

* * @param platform * The instance's platform. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withPlatform(String platform) { setPlatform(platform); return this; } /** *

* The The instance's private DNS name. *

* * @param privateDns * The The instance's private DNS name. */ public void setPrivateDns(String privateDns) { this.privateDns = privateDns; } /** *

* The The instance's private DNS name. *

* * @return The The instance's private DNS name. */ public String getPrivateDns() { return this.privateDns; } /** *

* The The instance's private DNS name. *

* * @param privateDns * The The instance's private DNS name. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withPrivateDns(String privateDns) { setPrivateDns(privateDns); return this; } /** *

* The instance's private IP address. *

* * @param privateIp * The instance's private IP address. */ public void setPrivateIp(String privateIp) { this.privateIp = privateIp; } /** *

* The instance's private IP address. *

* * @return The instance's private IP address. */ public String getPrivateIp() { return this.privateIp; } /** *

* The instance's private IP address. *

* * @param privateIp * The instance's private IP address. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withPrivateIp(String privateIp) { setPrivateIp(privateIp); return this; } /** *

* The instance public DNS name. *

* * @param publicDns * The instance public DNS name. */ public void setPublicDns(String publicDns) { this.publicDns = publicDns; } /** *

* The instance public DNS name. *

* * @return The instance public DNS name. */ public String getPublicDns() { return this.publicDns; } /** *

* The instance public DNS name. *

* * @param publicDns * The instance public DNS name. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withPublicDns(String publicDns) { setPublicDns(publicDns); return this; } /** *

* The instance public IP address. *

* * @param publicIp * The instance public IP address. */ public void setPublicIp(String publicIp) { this.publicIp = publicIp; } /** *

* The instance public IP address. *

* * @return The instance public IP address. */ public String getPublicIp() { return this.publicIp; } /** *

* The instance public IP address. *

* * @param publicIp * The instance public IP address. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withPublicIp(String publicIp) { setPublicIp(publicIp); return this; } /** *

* For registered instances, who performed the registration. *

* * @param registeredBy * For registered instances, who performed the registration. */ public void setRegisteredBy(String registeredBy) { this.registeredBy = registeredBy; } /** *

* For registered instances, who performed the registration. *

* * @return For registered instances, who performed the registration. */ public String getRegisteredBy() { return this.registeredBy; } /** *

* For registered instances, who performed the registration. *

* * @param registeredBy * For registered instances, who performed the registration. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withRegisteredBy(String registeredBy) { setRegisteredBy(registeredBy); return this; } /** *

* The instance's reported AWS OpsWorks agent version. *

* * @param reportedAgentVersion * The instance's reported AWS OpsWorks agent version. */ public void setReportedAgentVersion(String reportedAgentVersion) { this.reportedAgentVersion = reportedAgentVersion; } /** *

* The instance's reported AWS OpsWorks agent version. *

* * @return The instance's reported AWS OpsWorks agent version. */ public String getReportedAgentVersion() { return this.reportedAgentVersion; } /** *

* The instance's reported AWS OpsWorks agent version. *

* * @param reportedAgentVersion * The instance's reported AWS OpsWorks agent version. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withReportedAgentVersion(String reportedAgentVersion) { setReportedAgentVersion(reportedAgentVersion); return this; } /** *

* For registered instances, the reported operating system. *

* * @param reportedOs * For registered instances, the reported operating system. */ public void setReportedOs(ReportedOs reportedOs) { this.reportedOs = reportedOs; } /** *

* For registered instances, the reported operating system. *

* * @return For registered instances, the reported operating system. */ public ReportedOs getReportedOs() { return this.reportedOs; } /** *

* For registered instances, the reported operating system. *

* * @param reportedOs * For registered instances, the reported operating system. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withReportedOs(ReportedOs reportedOs) { setReportedOs(reportedOs); return this; } /** *

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

* * @param rootDeviceType * The instance's root device type. For more information, see Storage for the Root Device. * @see RootDeviceType */ public void setRootDeviceType(String rootDeviceType) { this.rootDeviceType = rootDeviceType; } /** *

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

* * @return The instance's root device type. For more information, see Storage for the Root Device. * @see RootDeviceType */ public String getRootDeviceType() { return this.rootDeviceType; } /** *

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

* * @param rootDeviceType * The instance's root device type. For more information, see Storage for the Root Device. * @return Returns a reference to this object so that method calls can be * chained together. * @see RootDeviceType */ public Instance withRootDeviceType(String rootDeviceType) { setRootDeviceType(rootDeviceType); return this; } /** *

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

* * @param rootDeviceType * The instance's root device type. For more information, see Storage for the Root Device. * @see RootDeviceType */ public void setRootDeviceType(RootDeviceType rootDeviceType) { this.rootDeviceType = rootDeviceType.toString(); } /** *

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

* * @param rootDeviceType * The instance's root device type. For more information, see Storage for the Root Device. * @return Returns a reference to this object so that method calls can be * chained together. * @see RootDeviceType */ public Instance withRootDeviceType(RootDeviceType rootDeviceType) { setRootDeviceType(rootDeviceType); return this; } /** *

* The root device volume ID. *

* * @param rootDeviceVolumeId * The root device volume ID. */ public void setRootDeviceVolumeId(String rootDeviceVolumeId) { this.rootDeviceVolumeId = rootDeviceVolumeId; } /** *

* The root device volume ID. *

* * @return The root device volume ID. */ public String getRootDeviceVolumeId() { return this.rootDeviceVolumeId; } /** *

* The root device volume ID. *

* * @param rootDeviceVolumeId * The root device volume ID. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withRootDeviceVolumeId(String rootDeviceVolumeId) { setRootDeviceVolumeId(rootDeviceVolumeId); return this; } /** *

* An array containing the instance security group IDs. *

* * @return An array containing the instance security group IDs. */ public java.util.List getSecurityGroupIds() { if (securityGroupIds == null) { securityGroupIds = new com.amazonaws.internal.SdkInternalList(); } return securityGroupIds; } /** *

* An array containing the instance security group IDs. *

* * @param securityGroupIds * An array containing the instance security group IDs. */ public void setSecurityGroupIds( java.util.Collection securityGroupIds) { if (securityGroupIds == null) { this.securityGroupIds = null; return; } this.securityGroupIds = new com.amazonaws.internal.SdkInternalList( securityGroupIds); } /** *

* An array containing the instance security group IDs. *

*

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

* * @param securityGroupIds * An array containing the instance security group IDs. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withSecurityGroupIds(String... securityGroupIds) { if (this.securityGroupIds == null) { setSecurityGroupIds(new com.amazonaws.internal.SdkInternalList( securityGroupIds.length)); } for (String ele : securityGroupIds) { this.securityGroupIds.add(ele); } return this; } /** *

* An array containing the instance security group IDs. *

* * @param securityGroupIds * An array containing the instance security group IDs. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withSecurityGroupIds( java.util.Collection securityGroupIds) { setSecurityGroupIds(securityGroupIds); return this; } /** *

* The SSH key's Deep Security Agent (DSA) fingerprint. *

* * @param sshHostDsaKeyFingerprint * The SSH key's Deep Security Agent (DSA) fingerprint. */ public void setSshHostDsaKeyFingerprint(String sshHostDsaKeyFingerprint) { this.sshHostDsaKeyFingerprint = sshHostDsaKeyFingerprint; } /** *

* The SSH key's Deep Security Agent (DSA) fingerprint. *

* * @return The SSH key's Deep Security Agent (DSA) fingerprint. */ public String getSshHostDsaKeyFingerprint() { return this.sshHostDsaKeyFingerprint; } /** *

* The SSH key's Deep Security Agent (DSA) fingerprint. *

* * @param sshHostDsaKeyFingerprint * The SSH key's Deep Security Agent (DSA) fingerprint. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withSshHostDsaKeyFingerprint(String sshHostDsaKeyFingerprint) { setSshHostDsaKeyFingerprint(sshHostDsaKeyFingerprint); return this; } /** *

* The SSH key's RSA fingerprint. *

* * @param sshHostRsaKeyFingerprint * The SSH key's RSA fingerprint. */ public void setSshHostRsaKeyFingerprint(String sshHostRsaKeyFingerprint) { this.sshHostRsaKeyFingerprint = sshHostRsaKeyFingerprint; } /** *

* The SSH key's RSA fingerprint. *

* * @return The SSH key's RSA fingerprint. */ public String getSshHostRsaKeyFingerprint() { return this.sshHostRsaKeyFingerprint; } /** *

* The SSH key's RSA fingerprint. *

* * @param sshHostRsaKeyFingerprint * The SSH key's RSA fingerprint. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withSshHostRsaKeyFingerprint(String sshHostRsaKeyFingerprint) { setSshHostRsaKeyFingerprint(sshHostRsaKeyFingerprint); return this; } /** *

* The instance's Amazon EC2 key-pair name. *

* * @param sshKeyName * The instance's Amazon EC2 key-pair name. */ public void setSshKeyName(String sshKeyName) { this.sshKeyName = sshKeyName; } /** *

* The instance's Amazon EC2 key-pair name. *

* * @return The instance's Amazon EC2 key-pair name. */ public String getSshKeyName() { return this.sshKeyName; } /** *

* The instance's Amazon EC2 key-pair name. *

* * @param sshKeyName * The instance's Amazon EC2 key-pair name. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withSshKeyName(String sshKeyName) { setSshKeyName(sshKeyName); return this; } /** *

* The stack ID. *

* * @param stackId * The stack ID. */ public void setStackId(String stackId) { this.stackId = stackId; } /** *

* The stack ID. *

* * @return The stack ID. */ public String getStackId() { return this.stackId; } /** *

* The stack ID. *

* * @param stackId * The stack ID. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withStackId(String stackId) { setStackId(stackId); return this; } /** *

* The instance status: *

*
    *
  • *

    * booting *

    *
  • *
  • *

    * connection_lost *

    *
  • *
  • *

    * online *

    *
  • *
  • *

    * pending *

    *
  • *
  • *

    * rebooting *

    *
  • *
  • *

    * requested *

    *
  • *
  • *

    * running_setup *

    *
  • *
  • *

    * setup_failed *

    *
  • *
  • *

    * shutting_down *

    *
  • *
  • *

    * start_failed *

    *
  • *
  • *

    * stop_failed *

    *
  • *
  • *

    * stopped *

    *
  • *
  • *

    * stopping *

    *
  • *
  • *

    * terminated *

    *
  • *
  • *

    * terminating *

    *
  • *
* * @param status * The instance status:

*
    *
  • *

    * booting *

    *
  • *
  • *

    * connection_lost *

    *
  • *
  • *

    * online *

    *
  • *
  • *

    * pending *

    *
  • *
  • *

    * rebooting *

    *
  • *
  • *

    * requested *

    *
  • *
  • *

    * running_setup *

    *
  • *
  • *

    * setup_failed *

    *
  • *
  • *

    * shutting_down *

    *
  • *
  • *

    * start_failed *

    *
  • *
  • *

    * stop_failed *

    *
  • *
  • *

    * stopped *

    *
  • *
  • *

    * stopping *

    *
  • *
  • *

    * terminated *

    *
  • *
  • *

    * terminating *

    *
  • */ public void setStatus(String status) { this.status = status; } /** *

    * The instance status: *

    *
      *
    • *

      * booting *

      *
    • *
    • *

      * connection_lost *

      *
    • *
    • *

      * online *

      *
    • *
    • *

      * pending *

      *
    • *
    • *

      * rebooting *

      *
    • *
    • *

      * requested *

      *
    • *
    • *

      * running_setup *

      *
    • *
    • *

      * setup_failed *

      *
    • *
    • *

      * shutting_down *

      *
    • *
    • *

      * start_failed *

      *
    • *
    • *

      * stop_failed *

      *
    • *
    • *

      * stopped *

      *
    • *
    • *

      * stopping *

      *
    • *
    • *

      * terminated *

      *
    • *
    • *

      * terminating *

      *
    • *
    * * @return The instance status:

    *
      *
    • *

      * booting *

      *
    • *
    • *

      * connection_lost *

      *
    • *
    • *

      * online *

      *
    • *
    • *

      * pending *

      *
    • *
    • *

      * rebooting *

      *
    • *
    • *

      * requested *

      *
    • *
    • *

      * running_setup *

      *
    • *
    • *

      * setup_failed *

      *
    • *
    • *

      * shutting_down *

      *
    • *
    • *

      * start_failed *

      *
    • *
    • *

      * stop_failed *

      *
    • *
    • *

      * stopped *

      *
    • *
    • *

      * stopping *

      *
    • *
    • *

      * terminated *

      *
    • *
    • *

      * terminating *

      *
    • */ public String getStatus() { return this.status; } /** *

      * The instance status: *

      *
        *
      • *

        * booting *

        *
      • *
      • *

        * connection_lost *

        *
      • *
      • *

        * online *

        *
      • *
      • *

        * pending *

        *
      • *
      • *

        * rebooting *

        *
      • *
      • *

        * requested *

        *
      • *
      • *

        * running_setup *

        *
      • *
      • *

        * setup_failed *

        *
      • *
      • *

        * shutting_down *

        *
      • *
      • *

        * start_failed *

        *
      • *
      • *

        * stop_failed *

        *
      • *
      • *

        * stopped *

        *
      • *
      • *

        * stopping *

        *
      • *
      • *

        * terminated *

        *
      • *
      • *

        * terminating *

        *
      • *
      * * @param status * The instance status:

      *
        *
      • *

        * booting *

        *
      • *
      • *

        * connection_lost *

        *
      • *
      • *

        * online *

        *
      • *
      • *

        * pending *

        *
      • *
      • *

        * rebooting *

        *
      • *
      • *

        * requested *

        *
      • *
      • *

        * running_setup *

        *
      • *
      • *

        * setup_failed *

        *
      • *
      • *

        * shutting_down *

        *
      • *
      • *

        * start_failed *

        *
      • *
      • *

        * stop_failed *

        *
      • *
      • *

        * stopped *

        *
      • *
      • *

        * stopping *

        *
      • *
      • *

        * terminated *

        *
      • *
      • *

        * terminating *

        *
      • * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withStatus(String status) { setStatus(status); return this; } /** *

        * The instance's subnet ID; applicable only if the stack is running in a * VPC. *

        * * @param subnetId * The instance's subnet ID; applicable only if the stack is running * in a VPC. */ public void setSubnetId(String subnetId) { this.subnetId = subnetId; } /** *

        * The instance's subnet ID; applicable only if the stack is running in a * VPC. *

        * * @return The instance's subnet ID; applicable only if the stack is running * in a VPC. */ public String getSubnetId() { return this.subnetId; } /** *

        * The instance's subnet ID; applicable only if the stack is running in a * VPC. *

        * * @param subnetId * The instance's subnet ID; applicable only if the stack is running * in a VPC. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withSubnetId(String subnetId) { setSubnetId(subnetId); return this; } /** *

        * The instance's tenancy option, such as dedicated or * host. *

        * * @param tenancy * The instance's tenancy option, such as dedicated or * host. */ public void setTenancy(String tenancy) { this.tenancy = tenancy; } /** *

        * The instance's tenancy option, such as dedicated or * host. *

        * * @return The instance's tenancy option, such as dedicated or * host. */ public String getTenancy() { return this.tenancy; } /** *

        * The instance's tenancy option, such as dedicated or * host. *

        * * @param tenancy * The instance's tenancy option, such as dedicated or * host. * @return Returns a reference to this object so that method calls can be * chained together. */ public Instance withTenancy(String tenancy) { setTenancy(tenancy); return this; } /** *

        * The instance's virtualization type: paravirtual or * hvm. *

        * * @param virtualizationType * The instance's virtualization type: paravirtual or * hvm. * @see VirtualizationType */ public void setVirtualizationType(String virtualizationType) { this.virtualizationType = virtualizationType; } /** *

        * The instance's virtualization type: paravirtual or * hvm. *

        * * @return The instance's virtualization type: paravirtual or * hvm. * @see VirtualizationType */ public String getVirtualizationType() { return this.virtualizationType; } /** *

        * The instance's virtualization type: paravirtual or * hvm. *

        * * @param virtualizationType * The instance's virtualization type: paravirtual or * hvm. * @return Returns a reference to this object so that method calls can be * chained together. * @see VirtualizationType */ public Instance withVirtualizationType(String virtualizationType) { setVirtualizationType(virtualizationType); return this; } /** *

        * The instance's virtualization type: paravirtual or * hvm. *

        * * @param virtualizationType * The instance's virtualization type: paravirtual or * hvm. * @see VirtualizationType */ public void setVirtualizationType(VirtualizationType virtualizationType) { this.virtualizationType = virtualizationType.toString(); } /** *

        * The instance's virtualization type: paravirtual or * hvm. *

        * * @param virtualizationType * The instance's virtualization type: paravirtual or * hvm. * @return Returns a reference to this object so that method calls can be * chained together. * @see VirtualizationType */ public Instance withVirtualizationType(VirtualizationType virtualizationType) { setVirtualizationType(virtualizationType); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAgentVersion() != null) sb.append("AgentVersion: " + getAgentVersion() + ","); if (getAmiId() != null) sb.append("AmiId: " + getAmiId() + ","); if (getArchitecture() != null) sb.append("Architecture: " + getArchitecture() + ","); if (getAutoScalingType() != null) sb.append("AutoScalingType: " + getAutoScalingType() + ","); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: " + getAvailabilityZone() + ","); if (getBlockDeviceMappings() != null) sb.append("BlockDeviceMappings: " + getBlockDeviceMappings() + ","); if (getCreatedAt() != null) sb.append("CreatedAt: " + getCreatedAt() + ","); if (getEbsOptimized() != null) sb.append("EbsOptimized: " + getEbsOptimized() + ","); if (getEc2InstanceId() != null) sb.append("Ec2InstanceId: " + getEc2InstanceId() + ","); if (getEcsClusterArn() != null) sb.append("EcsClusterArn: " + getEcsClusterArn() + ","); if (getEcsContainerInstanceArn() != null) sb.append("EcsContainerInstanceArn: " + getEcsContainerInstanceArn() + ","); if (getElasticIp() != null) sb.append("ElasticIp: " + getElasticIp() + ","); if (getHostname() != null) sb.append("Hostname: " + getHostname() + ","); if (getInfrastructureClass() != null) sb.append("InfrastructureClass: " + getInfrastructureClass() + ","); if (getInstallUpdatesOnBoot() != null) sb.append("InstallUpdatesOnBoot: " + getInstallUpdatesOnBoot() + ","); if (getInstanceId() != null) sb.append("InstanceId: " + getInstanceId() + ","); if (getInstanceProfileArn() != null) sb.append("InstanceProfileArn: " + getInstanceProfileArn() + ","); if (getInstanceType() != null) sb.append("InstanceType: " + getInstanceType() + ","); if (getLastServiceErrorId() != null) sb.append("LastServiceErrorId: " + getLastServiceErrorId() + ","); if (getLayerIds() != null) sb.append("LayerIds: " + getLayerIds() + ","); if (getOs() != null) sb.append("Os: " + getOs() + ","); if (getPlatform() != null) sb.append("Platform: " + getPlatform() + ","); if (getPrivateDns() != null) sb.append("PrivateDns: " + getPrivateDns() + ","); if (getPrivateIp() != null) sb.append("PrivateIp: " + getPrivateIp() + ","); if (getPublicDns() != null) sb.append("PublicDns: " + getPublicDns() + ","); if (getPublicIp() != null) sb.append("PublicIp: " + getPublicIp() + ","); if (getRegisteredBy() != null) sb.append("RegisteredBy: " + getRegisteredBy() + ","); if (getReportedAgentVersion() != null) sb.append("ReportedAgentVersion: " + getReportedAgentVersion() + ","); if (getReportedOs() != null) sb.append("ReportedOs: " + getReportedOs() + ","); if (getRootDeviceType() != null) sb.append("RootDeviceType: " + getRootDeviceType() + ","); if (getRootDeviceVolumeId() != null) sb.append("RootDeviceVolumeId: " + getRootDeviceVolumeId() + ","); if (getSecurityGroupIds() != null) sb.append("SecurityGroupIds: " + getSecurityGroupIds() + ","); if (getSshHostDsaKeyFingerprint() != null) sb.append("SshHostDsaKeyFingerprint: " + getSshHostDsaKeyFingerprint() + ","); if (getSshHostRsaKeyFingerprint() != null) sb.append("SshHostRsaKeyFingerprint: " + getSshHostRsaKeyFingerprint() + ","); if (getSshKeyName() != null) sb.append("SshKeyName: " + getSshKeyName() + ","); if (getStackId() != null) sb.append("StackId: " + getStackId() + ","); if (getStatus() != null) sb.append("Status: " + getStatus() + ","); if (getSubnetId() != null) sb.append("SubnetId: " + getSubnetId() + ","); if (getTenancy() != null) sb.append("Tenancy: " + getTenancy() + ","); if (getVirtualizationType() != null) sb.append("VirtualizationType: " + getVirtualizationType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Instance == false) return false; Instance other = (Instance) obj; if (other.getAgentVersion() == null ^ this.getAgentVersion() == null) return false; if (other.getAgentVersion() != null && other.getAgentVersion().equals(this.getAgentVersion()) == false) return false; if (other.getAmiId() == null ^ this.getAmiId() == null) return false; if (other.getAmiId() != null && other.getAmiId().equals(this.getAmiId()) == false) return false; if (other.getArchitecture() == null ^ this.getArchitecture() == null) return false; if (other.getArchitecture() != null && other.getArchitecture().equals(this.getArchitecture()) == false) return false; if (other.getAutoScalingType() == null ^ this.getAutoScalingType() == null) return false; if (other.getAutoScalingType() != null && other.getAutoScalingType().equals(this.getAutoScalingType()) == false) return false; if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null) return false; if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals( this.getAvailabilityZone()) == false) return false; if (other.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == null) return false; if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals( this.getBlockDeviceMappings()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getEbsOptimized() == null ^ this.getEbsOptimized() == null) return false; if (other.getEbsOptimized() != null && other.getEbsOptimized().equals(this.getEbsOptimized()) == false) return false; if (other.getEc2InstanceId() == null ^ this.getEc2InstanceId() == null) return false; if (other.getEc2InstanceId() != null && other.getEc2InstanceId().equals(this.getEc2InstanceId()) == false) return false; if (other.getEcsClusterArn() == null ^ this.getEcsClusterArn() == null) return false; if (other.getEcsClusterArn() != null && other.getEcsClusterArn().equals(this.getEcsClusterArn()) == false) return false; if (other.getEcsContainerInstanceArn() == null ^ this.getEcsContainerInstanceArn() == null) return false; if (other.getEcsContainerInstanceArn() != null && other.getEcsContainerInstanceArn().equals( this.getEcsContainerInstanceArn()) == false) return false; if (other.getElasticIp() == null ^ this.getElasticIp() == null) return false; if (other.getElasticIp() != null && other.getElasticIp().equals(this.getElasticIp()) == false) return false; if (other.getHostname() == null ^ this.getHostname() == null) return false; if (other.getHostname() != null && other.getHostname().equals(this.getHostname()) == false) return false; if (other.getInfrastructureClass() == null ^ this.getInfrastructureClass() == null) return false; if (other.getInfrastructureClass() != null && other.getInfrastructureClass().equals( this.getInfrastructureClass()) == false) return false; if (other.getInstallUpdatesOnBoot() == null ^ this.getInstallUpdatesOnBoot() == null) return false; if (other.getInstallUpdatesOnBoot() != null && other.getInstallUpdatesOnBoot().equals( this.getInstallUpdatesOnBoot()) == false) return false; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; if (other.getInstanceProfileArn() == null ^ this.getInstanceProfileArn() == null) return false; if (other.getInstanceProfileArn() != null && other.getInstanceProfileArn().equals( this.getInstanceProfileArn()) == false) return false; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getLastServiceErrorId() == null ^ this.getLastServiceErrorId() == null) return false; if (other.getLastServiceErrorId() != null && other.getLastServiceErrorId().equals( this.getLastServiceErrorId()) == false) return false; if (other.getLayerIds() == null ^ this.getLayerIds() == null) return false; if (other.getLayerIds() != null && other.getLayerIds().equals(this.getLayerIds()) == false) return false; if (other.getOs() == null ^ this.getOs() == null) return false; if (other.getOs() != null && other.getOs().equals(this.getOs()) == false) return false; if (other.getPlatform() == null ^ this.getPlatform() == null) return false; if (other.getPlatform() != null && other.getPlatform().equals(this.getPlatform()) == false) return false; if (other.getPrivateDns() == null ^ this.getPrivateDns() == null) return false; if (other.getPrivateDns() != null && other.getPrivateDns().equals(this.getPrivateDns()) == false) return false; if (other.getPrivateIp() == null ^ this.getPrivateIp() == null) return false; if (other.getPrivateIp() != null && other.getPrivateIp().equals(this.getPrivateIp()) == false) return false; if (other.getPublicDns() == null ^ this.getPublicDns() == null) return false; if (other.getPublicDns() != null && other.getPublicDns().equals(this.getPublicDns()) == false) return false; if (other.getPublicIp() == null ^ this.getPublicIp() == null) return false; if (other.getPublicIp() != null && other.getPublicIp().equals(this.getPublicIp()) == false) return false; if (other.getRegisteredBy() == null ^ this.getRegisteredBy() == null) return false; if (other.getRegisteredBy() != null && other.getRegisteredBy().equals(this.getRegisteredBy()) == false) return false; if (other.getReportedAgentVersion() == null ^ this.getReportedAgentVersion() == null) return false; if (other.getReportedAgentVersion() != null && other.getReportedAgentVersion().equals( this.getReportedAgentVersion()) == false) return false; if (other.getReportedOs() == null ^ this.getReportedOs() == null) return false; if (other.getReportedOs() != null && other.getReportedOs().equals(this.getReportedOs()) == false) return false; if (other.getRootDeviceType() == null ^ this.getRootDeviceType() == null) return false; if (other.getRootDeviceType() != null && other.getRootDeviceType().equals(this.getRootDeviceType()) == false) return false; if (other.getRootDeviceVolumeId() == null ^ this.getRootDeviceVolumeId() == null) return false; if (other.getRootDeviceVolumeId() != null && other.getRootDeviceVolumeId().equals( this.getRootDeviceVolumeId()) == false) return false; if (other.getSecurityGroupIds() == null ^ this.getSecurityGroupIds() == null) return false; if (other.getSecurityGroupIds() != null && other.getSecurityGroupIds().equals( this.getSecurityGroupIds()) == false) return false; if (other.getSshHostDsaKeyFingerprint() == null ^ this.getSshHostDsaKeyFingerprint() == null) return false; if (other.getSshHostDsaKeyFingerprint() != null && other.getSshHostDsaKeyFingerprint().equals( this.getSshHostDsaKeyFingerprint()) == false) return false; if (other.getSshHostRsaKeyFingerprint() == null ^ this.getSshHostRsaKeyFingerprint() == null) return false; if (other.getSshHostRsaKeyFingerprint() != null && other.getSshHostRsaKeyFingerprint().equals( this.getSshHostRsaKeyFingerprint()) == false) return false; if (other.getSshKeyName() == null ^ this.getSshKeyName() == null) return false; if (other.getSshKeyName() != null && other.getSshKeyName().equals(this.getSshKeyName()) == false) return false; if (other.getStackId() == null ^ this.getStackId() == null) return false; if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getSubnetId() == null ^ this.getSubnetId() == null) return false; if (other.getSubnetId() != null && other.getSubnetId().equals(this.getSubnetId()) == false) return false; if (other.getTenancy() == null ^ this.getTenancy() == null) return false; if (other.getTenancy() != null && other.getTenancy().equals(this.getTenancy()) == false) return false; if (other.getVirtualizationType() == null ^ this.getVirtualizationType() == null) return false; if (other.getVirtualizationType() != null && other.getVirtualizationType().equals( this.getVirtualizationType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAgentVersion() == null) ? 0 : getAgentVersion() .hashCode()); hashCode = prime * hashCode + ((getAmiId() == null) ? 0 : getAmiId().hashCode()); hashCode = prime * hashCode + ((getArchitecture() == null) ? 0 : getArchitecture() .hashCode()); hashCode = prime * hashCode + ((getAutoScalingType() == null) ? 0 : getAutoScalingType() .hashCode()); hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone() .hashCode()); hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized() .hashCode()); hashCode = prime * hashCode + ((getEc2InstanceId() == null) ? 0 : getEc2InstanceId() .hashCode()); hashCode = prime * hashCode + ((getEcsClusterArn() == null) ? 0 : getEcsClusterArn() .hashCode()); hashCode = prime * hashCode + ((getEcsContainerInstanceArn() == null) ? 0 : getEcsContainerInstanceArn().hashCode()); hashCode = prime * hashCode + ((getElasticIp() == null) ? 0 : getElasticIp().hashCode()); hashCode = prime * hashCode + ((getHostname() == null) ? 0 : getHostname().hashCode()); hashCode = prime * hashCode + ((getInfrastructureClass() == null) ? 0 : getInfrastructureClass().hashCode()); hashCode = prime * hashCode + ((getInstallUpdatesOnBoot() == null) ? 0 : getInstallUpdatesOnBoot().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getInstanceProfileArn() == null) ? 0 : getInstanceProfileArn().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType() .hashCode()); hashCode = prime * hashCode + ((getLastServiceErrorId() == null) ? 0 : getLastServiceErrorId().hashCode()); hashCode = prime * hashCode + ((getLayerIds() == null) ? 0 : getLayerIds().hashCode()); hashCode = prime * hashCode + ((getOs() == null) ? 0 : getOs().hashCode()); hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); hashCode = prime * hashCode + ((getPrivateDns() == null) ? 0 : getPrivateDns().hashCode()); hashCode = prime * hashCode + ((getPrivateIp() == null) ? 0 : getPrivateIp().hashCode()); hashCode = prime * hashCode + ((getPublicDns() == null) ? 0 : getPublicDns().hashCode()); hashCode = prime * hashCode + ((getPublicIp() == null) ? 0 : getPublicIp().hashCode()); hashCode = prime * hashCode + ((getRegisteredBy() == null) ? 0 : getRegisteredBy() .hashCode()); hashCode = prime * hashCode + ((getReportedAgentVersion() == null) ? 0 : getReportedAgentVersion().hashCode()); hashCode = prime * hashCode + ((getReportedOs() == null) ? 0 : getReportedOs().hashCode()); hashCode = prime * hashCode + ((getRootDeviceType() == null) ? 0 : getRootDeviceType() .hashCode()); hashCode = prime * hashCode + ((getRootDeviceVolumeId() == null) ? 0 : getRootDeviceVolumeId().hashCode()); hashCode = prime * hashCode + ((getSecurityGroupIds() == null) ? 0 : getSecurityGroupIds() .hashCode()); hashCode = prime * hashCode + ((getSshHostDsaKeyFingerprint() == null) ? 0 : getSshHostDsaKeyFingerprint().hashCode()); hashCode = prime * hashCode + ((getSshHostRsaKeyFingerprint() == null) ? 0 : getSshHostRsaKeyFingerprint().hashCode()); hashCode = prime * hashCode + ((getSshKeyName() == null) ? 0 : getSshKeyName().hashCode()); hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); hashCode = prime * hashCode + ((getTenancy() == null) ? 0 : getTenancy().hashCode()); hashCode = prime * hashCode + ((getVirtualizationType() == null) ? 0 : getVirtualizationType().hashCode()); return hashCode; } @Override public Instance clone() { try { return (Instance) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy