/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.lightsail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Describes an instance (a virtual private server). *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Instance implements Serializable, Cloneable, StructuredPojo { /** *
* The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1
).
*
* The Amazon Resource Name (ARN) of the instance (e.g.,
* arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).
*
* The support code. Include this code in your email to support when you have questions about an instance or another * resource in Lightsail. This code enables our support team to look up your Lightsail information more easily. *
*/ private String supportCode; /** *
* The timestamp when the instance was created (e.g., 1479734909.17
) in Unix time format.
*
* The region name and Availability Zone where the instance is located. *
*/ private ResourceLocation location; /** *
* The type of resource (usually Instance
).
*
* The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer * Guide. *
*/ private java.util.List
* The blueprint ID (e.g., os_amlinux_2016_03
).
*
* The friendly name of the blueprint (e.g., Amazon Linux
).
*
* The bundle for the instance (e.g., micro_1_0
).
*
* An array of objects representing the add-ons enabled on the instance. *
*/ private java.util.List* A Boolean value indicating whether this instance has a static IP assigned to it. *
*/ private Boolean isStaticIp; /** ** The private IP address of the instance. *
*/ private String privateIpAddress; /** ** The public IP address of the instance. *
*/ private String publicIpAddress; /** ** The IPv6 addresses of the instance. *
*/ private java.util.List* The IP address type of the instance. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The size of the vCPU and the amount of RAM for the instance. *
*/ private InstanceHardware hardware; /** ** Information about the public ports and monthly data transfer rates for the instance. *
*/ private InstanceNetworking networking; /** *
* The status code and the state (e.g., running
) for the instance.
*
* The user name for connecting to the instance (e.g., ec2-user
).
*
* The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair
).
*
* The metadata options for the Amazon Lightsail instance. *
*/ private InstanceMetadataOptions metadataOptions; /** *
* The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1
).
*
Amazon_Linux-1GB-Ohio-1
).
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1
).
*
Amazon_Linux-1GB-Ohio-1
).
*/
public String getName() {
return this.name;
}
/**
*
* The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1
).
*
Amazon_Linux-1GB-Ohio-1
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Instance withName(String name) {
setName(name);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the instance (e.g.,
* arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).
*
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The Amazon Resource Name (ARN) of the instance (e.g.,
* arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).
*
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).
*/
public String getArn() {
return this.arn;
}
/**
*
* The Amazon Resource Name (ARN) of the instance (e.g.,
* arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).
*
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Instance withArn(String arn) {
setArn(arn);
return this;
}
/**
* * The support code. Include this code in your email to support when you have questions about an instance or another * resource in Lightsail. This code enables our support team to look up your Lightsail information more easily. *
* * @param supportCode * The support code. Include this code in your email to support when you have questions about an instance or * another resource in Lightsail. This code enables our support team to look up your Lightsail information * more easily. */ public void setSupportCode(String supportCode) { this.supportCode = supportCode; } /** ** The support code. Include this code in your email to support when you have questions about an instance or another * resource in Lightsail. This code enables our support team to look up your Lightsail information more easily. *
* * @return The support code. Include this code in your email to support when you have questions about an instance or * another resource in Lightsail. This code enables our support team to look up your Lightsail information * more easily. */ public String getSupportCode() { return this.supportCode; } /** ** The support code. Include this code in your email to support when you have questions about an instance or another * resource in Lightsail. This code enables our support team to look up your Lightsail information more easily. *
* * @param supportCode * The support code. Include this code in your email to support when you have questions about an instance or * another resource in Lightsail. This code enables our support team to look up your Lightsail information * more easily. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withSupportCode(String supportCode) { setSupportCode(supportCode); return this; } /** *
* The timestamp when the instance was created (e.g., 1479734909.17
) in Unix time format.
*
1479734909.17
) in Unix time format.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The timestamp when the instance was created (e.g., 1479734909.17
) in Unix time format.
*
1479734909.17
) in Unix time format.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The timestamp when the instance was created (e.g., 1479734909.17
) in Unix time format.
*
1479734909.17
) in Unix time format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Instance withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
* * The region name and Availability Zone where the instance is located. *
* * @param location * The region name and Availability Zone where the instance is located. */ public void setLocation(ResourceLocation location) { this.location = location; } /** ** The region name and Availability Zone where the instance is located. *
* * @return The region name and Availability Zone where the instance is located. */ public ResourceLocation getLocation() { return this.location; } /** ** The region name and Availability Zone where the instance is located. *
* * @param location * The region name and Availability Zone where the instance is located. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withLocation(ResourceLocation location) { setLocation(location); return this; } /** *
* The type of resource (usually Instance
).
*
Instance
).
* @see ResourceType
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
*
* The type of resource (usually Instance
).
*
Instance
).
* @see ResourceType
*/
public String getResourceType() {
return this.resourceType;
}
/**
*
* The type of resource (usually Instance
).
*
Instance
).
* @return Returns a reference to this object so that method calls can be chained together.
* @see ResourceType
*/
public Instance withResourceType(String resourceType) {
setResourceType(resourceType);
return this;
}
/**
*
* The type of resource (usually Instance
).
*
Instance
).
* @see ResourceType
*/
public void setResourceType(ResourceType resourceType) {
withResourceType(resourceType);
}
/**
*
* The type of resource (usually Instance
).
*
Instance
).
* @return Returns a reference to this object so that method calls can be chained together.
* @see ResourceType
*/
public Instance withResourceType(ResourceType resourceType) {
this.resourceType = resourceType.toString();
return this;
}
/**
* * The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer * Guide. *
* * @return The tag keys and optional values for the resource. For more information about tags in Lightsail, see the * Amazon Lightsail * Developer Guide. */ public java.util.List* The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer * Guide. *
* * @param tags * The tag keys and optional values for the resource. For more information about tags in Lightsail, see the * Amazon Lightsail * Developer Guide. */ public void setTags(java.util.Collection* The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer * Guide. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * The tag keys and optional values for the resource. For more information about tags in Lightsail, see the * Amazon Lightsail * Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer * Guide. *
* * @param tags * The tag keys and optional values for the resource. For more information about tags in Lightsail, see the * Amazon Lightsail * Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withTags(java.util.Collection
* The blueprint ID (e.g., os_amlinux_2016_03
).
*
os_amlinux_2016_03
).
*/
public void setBlueprintId(String blueprintId) {
this.blueprintId = blueprintId;
}
/**
*
* The blueprint ID (e.g., os_amlinux_2016_03
).
*
os_amlinux_2016_03
).
*/
public String getBlueprintId() {
return this.blueprintId;
}
/**
*
* The blueprint ID (e.g., os_amlinux_2016_03
).
*
os_amlinux_2016_03
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Instance withBlueprintId(String blueprintId) {
setBlueprintId(blueprintId);
return this;
}
/**
*
* The friendly name of the blueprint (e.g., Amazon Linux
).
*
Amazon Linux
).
*/
public void setBlueprintName(String blueprintName) {
this.blueprintName = blueprintName;
}
/**
*
* The friendly name of the blueprint (e.g., Amazon Linux
).
*
Amazon Linux
).
*/
public String getBlueprintName() {
return this.blueprintName;
}
/**
*
* The friendly name of the blueprint (e.g., Amazon Linux
).
*
Amazon Linux
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Instance withBlueprintName(String blueprintName) {
setBlueprintName(blueprintName);
return this;
}
/**
*
* The bundle for the instance (e.g., micro_1_0
).
*
micro_1_0
).
*/
public void setBundleId(String bundleId) {
this.bundleId = bundleId;
}
/**
*
* The bundle for the instance (e.g., micro_1_0
).
*
micro_1_0
).
*/
public String getBundleId() {
return this.bundleId;
}
/**
*
* The bundle for the instance (e.g., micro_1_0
).
*
micro_1_0
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Instance withBundleId(String bundleId) {
setBundleId(bundleId);
return this;
}
/**
* * An array of objects representing the add-ons enabled on the instance. *
* * @return An array of objects representing the add-ons enabled on the instance. */ public java.util.List* An array of objects representing the add-ons enabled on the instance. *
* * @param addOns * An array of objects representing the add-ons enabled on the instance. */ public void setAddOns(java.util.Collection* An array of objects representing the add-ons enabled on the instance. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAddOns(java.util.Collection)} or {@link #withAddOns(java.util.Collection)} if you want to override the * existing values. *
* * @param addOns * An array of objects representing the add-ons enabled on the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withAddOns(AddOn... addOns) { if (this.addOns == null) { setAddOns(new java.util.ArrayList* An array of objects representing the add-ons enabled on the instance. *
* * @param addOns * An array of objects representing the add-ons enabled on the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withAddOns(java.util.Collection* A Boolean value indicating whether this instance has a static IP assigned to it. *
* * @param isStaticIp * A Boolean value indicating whether this instance has a static IP assigned to it. */ public void setIsStaticIp(Boolean isStaticIp) { this.isStaticIp = isStaticIp; } /** ** A Boolean value indicating whether this instance has a static IP assigned to it. *
* * @return A Boolean value indicating whether this instance has a static IP assigned to it. */ public Boolean getIsStaticIp() { return this.isStaticIp; } /** ** A Boolean value indicating whether this instance has a static IP assigned to it. *
* * @param isStaticIp * A Boolean value indicating whether this instance has a static IP assigned to it. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withIsStaticIp(Boolean isStaticIp) { setIsStaticIp(isStaticIp); return this; } /** ** A Boolean value indicating whether this instance has a static IP assigned to it. *
* * @return A Boolean value indicating whether this instance has a static IP assigned to it. */ public Boolean isStaticIp() { return this.isStaticIp; } /** ** The private IP address of the instance. *
* * @param privateIpAddress * The private IP address of the instance. */ public void setPrivateIpAddress(String privateIpAddress) { this.privateIpAddress = privateIpAddress; } /** ** The private IP address of the instance. *
* * @return The private IP address of the instance. */ public String getPrivateIpAddress() { return this.privateIpAddress; } /** ** The private IP address of the instance. *
* * @param privateIpAddress * The private IP address of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withPrivateIpAddress(String privateIpAddress) { setPrivateIpAddress(privateIpAddress); return this; } /** ** The public IP address of the instance. *
* * @param publicIpAddress * The public IP address of the instance. */ public void setPublicIpAddress(String publicIpAddress) { this.publicIpAddress = publicIpAddress; } /** ** The public IP address of the instance. *
* * @return The public IP address of the instance. */ public String getPublicIpAddress() { return this.publicIpAddress; } /** ** The public IP address of the instance. *
* * @param publicIpAddress * The public IP address of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withPublicIpAddress(String publicIpAddress) { setPublicIpAddress(publicIpAddress); return this; } /** ** The IPv6 addresses of the instance. *
* * @return The IPv6 addresses of the instance. */ public java.util.List* The IPv6 addresses of the instance. *
* * @param ipv6Addresses * The IPv6 addresses of the instance. */ public void setIpv6Addresses(java.util.Collection* The IPv6 addresses of the instance. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setIpv6Addresses(java.util.Collection)} or {@link #withIpv6Addresses(java.util.Collection)} if you want * to override the existing values. *
* * @param ipv6Addresses * The IPv6 addresses of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withIpv6Addresses(String... ipv6Addresses) { if (this.ipv6Addresses == null) { setIpv6Addresses(new java.util.ArrayList* The IPv6 addresses of the instance. *
* * @param ipv6Addresses * The IPv6 addresses of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withIpv6Addresses(java.util.Collection* The IP address type of the instance. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
* @see IpAddressType
*/
public void setIpAddressType(String ipAddressType) {
this.ipAddressType = ipAddressType;
}
/**
*
* The IP address type of the instance. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
* @see IpAddressType
*/
public String getIpAddressType() {
return this.ipAddressType;
}
/**
*
* The IP address type of the instance. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public Instance withIpAddressType(String ipAddressType) {
setIpAddressType(ipAddressType);
return this;
}
/**
*
* The IP address type of the instance. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
* @see IpAddressType
*/
public void setIpAddressType(IpAddressType ipAddressType) {
withIpAddressType(ipAddressType);
}
/**
*
* The IP address type of the instance. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public Instance withIpAddressType(IpAddressType ipAddressType) {
this.ipAddressType = ipAddressType.toString();
return this;
}
/**
*
* The size of the vCPU and the amount of RAM for the instance. *
* * @param hardware * The size of the vCPU and the amount of RAM for the instance. */ public void setHardware(InstanceHardware hardware) { this.hardware = hardware; } /** ** The size of the vCPU and the amount of RAM for the instance. *
* * @return The size of the vCPU and the amount of RAM for the instance. */ public InstanceHardware getHardware() { return this.hardware; } /** ** The size of the vCPU and the amount of RAM for the instance. *
* * @param hardware * The size of the vCPU and the amount of RAM for the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withHardware(InstanceHardware hardware) { setHardware(hardware); return this; } /** ** Information about the public ports and monthly data transfer rates for the instance. *
* * @param networking * Information about the public ports and monthly data transfer rates for the instance. */ public void setNetworking(InstanceNetworking networking) { this.networking = networking; } /** ** Information about the public ports and monthly data transfer rates for the instance. *
* * @return Information about the public ports and monthly data transfer rates for the instance. */ public InstanceNetworking getNetworking() { return this.networking; } /** ** Information about the public ports and monthly data transfer rates for the instance. *
* * @param networking * Information about the public ports and monthly data transfer rates for the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withNetworking(InstanceNetworking networking) { setNetworking(networking); return this; } /** *
* The status code and the state (e.g., running
) for the instance.
*
running
) for the instance.
*/
public void setState(InstanceState state) {
this.state = state;
}
/**
*
* The status code and the state (e.g., running
) for the instance.
*
running
) for the instance.
*/
public InstanceState getState() {
return this.state;
}
/**
*
* The status code and the state (e.g., running
) for the instance.
*
running
) for the instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Instance withState(InstanceState state) {
setState(state);
return this;
}
/**
*
* The user name for connecting to the instance (e.g., ec2-user
).
*
ec2-user
).
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
* The user name for connecting to the instance (e.g., ec2-user
).
*
ec2-user
).
*/
public String getUsername() {
return this.username;
}
/**
*
* The user name for connecting to the instance (e.g., ec2-user
).
*
ec2-user
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Instance withUsername(String username) {
setUsername(username);
return this;
}
/**
*
* The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair
).
*
LightsailDefaultKeyPair
* ).
*/
public void setSshKeyName(String sshKeyName) {
this.sshKeyName = sshKeyName;
}
/**
*
* The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair
).
*
LightsailDefaultKeyPair
* ).
*/
public String getSshKeyName() {
return this.sshKeyName;
}
/**
*
* The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair
).
*
LightsailDefaultKeyPair
* ).
* @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 metadata options for the Amazon Lightsail instance. *
* * @param metadataOptions * The metadata options for the Amazon Lightsail instance. */ public void setMetadataOptions(InstanceMetadataOptions metadataOptions) { this.metadataOptions = metadataOptions; } /** ** The metadata options for the Amazon Lightsail instance. *
* * @return The metadata options for the Amazon Lightsail instance. */ public InstanceMetadataOptions getMetadataOptions() { return this.metadataOptions; } /** ** The metadata options for the Amazon Lightsail instance. *
* * @param metadataOptions * The metadata options for the Amazon Lightsail instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withMetadataOptions(InstanceMetadataOptions metadataOptions) { setMetadataOptions(metadataOptions); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getSupportCode() != null) sb.append("SupportCode: ").append(getSupportCode()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getLocation() != null) sb.append("Location: ").append(getLocation()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getBlueprintId() != null) sb.append("BlueprintId: ").append(getBlueprintId()).append(","); if (getBlueprintName() != null) sb.append("BlueprintName: ").append(getBlueprintName()).append(","); if (getBundleId() != null) sb.append("BundleId: ").append(getBundleId()).append(","); if (getAddOns() != null) sb.append("AddOns: ").append(getAddOns()).append(","); if (getIsStaticIp() != null) sb.append("IsStaticIp: ").append(getIsStaticIp()).append(","); if (getPrivateIpAddress() != null) sb.append("PrivateIpAddress: ").append(getPrivateIpAddress()).append(","); if (getPublicIpAddress() != null) sb.append("PublicIpAddress: ").append(getPublicIpAddress()).append(","); if (getIpv6Addresses() != null) sb.append("Ipv6Addresses: ").append(getIpv6Addresses()).append(","); if (getIpAddressType() != null) sb.append("IpAddressType: ").append(getIpAddressType()).append(","); if (getHardware() != null) sb.append("Hardware: ").append(getHardware()).append(","); if (getNetworking() != null) sb.append("Networking: ").append(getNetworking()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getUsername() != null) sb.append("Username: ").append(getUsername()).append(","); if (getSshKeyName() != null) sb.append("SshKeyName: ").append(getSshKeyName()).append(","); if (getMetadataOptions() != null) sb.append("MetadataOptions: ").append(getMetadataOptions()); 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.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getSupportCode() == null ^ this.getSupportCode() == null) return false; if (other.getSupportCode() != null && other.getSupportCode().equals(this.getSupportCode()) == 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.getLocation() == null ^ this.getLocation() == null) return false; if (other.getLocation() != null && other.getLocation().equals(this.getLocation()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getBlueprintId() == null ^ this.getBlueprintId() == null) return false; if (other.getBlueprintId() != null && other.getBlueprintId().equals(this.getBlueprintId()) == false) return false; if (other.getBlueprintName() == null ^ this.getBlueprintName() == null) return false; if (other.getBlueprintName() != null && other.getBlueprintName().equals(this.getBlueprintName()) == false) return false; if (other.getBundleId() == null ^ this.getBundleId() == null) return false; if (other.getBundleId() != null && other.getBundleId().equals(this.getBundleId()) == false) return false; if (other.getAddOns() == null ^ this.getAddOns() == null) return false; if (other.getAddOns() != null && other.getAddOns().equals(this.getAddOns()) == false) return false; if (other.getIsStaticIp() == null ^ this.getIsStaticIp() == null) return false; if (other.getIsStaticIp() != null && other.getIsStaticIp().equals(this.getIsStaticIp()) == false) return false; if (other.getPrivateIpAddress() == null ^ this.getPrivateIpAddress() == null) return false; if (other.getPrivateIpAddress() != null && other.getPrivateIpAddress().equals(this.getPrivateIpAddress()) == false) return false; if (other.getPublicIpAddress() == null ^ this.getPublicIpAddress() == null) return false; if (other.getPublicIpAddress() != null && other.getPublicIpAddress().equals(this.getPublicIpAddress()) == false) return false; if (other.getIpv6Addresses() == null ^ this.getIpv6Addresses() == null) return false; if (other.getIpv6Addresses() != null && other.getIpv6Addresses().equals(this.getIpv6Addresses()) == false) return false; if (other.getIpAddressType() == null ^ this.getIpAddressType() == null) return false; if (other.getIpAddressType() != null && other.getIpAddressType().equals(this.getIpAddressType()) == false) return false; if (other.getHardware() == null ^ this.getHardware() == null) return false; if (other.getHardware() != null && other.getHardware().equals(this.getHardware()) == false) return false; if (other.getNetworking() == null ^ this.getNetworking() == null) return false; if (other.getNetworking() != null && other.getNetworking().equals(this.getNetworking()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getUsername() == null ^ this.getUsername() == null) return false; if (other.getUsername() != null && other.getUsername().equals(this.getUsername()) == 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.getMetadataOptions() == null ^ this.getMetadataOptions() == null) return false; if (other.getMetadataOptions() != null && other.getMetadataOptions().equals(this.getMetadataOptions()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getSupportCode() == null) ? 0 : getSupportCode().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getLocation() == null) ? 0 : getLocation().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getBlueprintId() == null) ? 0 : getBlueprintId().hashCode()); hashCode = prime * hashCode + ((getBlueprintName() == null) ? 0 : getBlueprintName().hashCode()); hashCode = prime * hashCode + ((getBundleId() == null) ? 0 : getBundleId().hashCode()); hashCode = prime * hashCode + ((getAddOns() == null) ? 0 : getAddOns().hashCode()); hashCode = prime * hashCode + ((getIsStaticIp() == null) ? 0 : getIsStaticIp().hashCode()); hashCode = prime * hashCode + ((getPrivateIpAddress() == null) ? 0 : getPrivateIpAddress().hashCode()); hashCode = prime * hashCode + ((getPublicIpAddress() == null) ? 0 : getPublicIpAddress().hashCode()); hashCode = prime * hashCode + ((getIpv6Addresses() == null) ? 0 : getIpv6Addresses().hashCode()); hashCode = prime * hashCode + ((getIpAddressType() == null) ? 0 : getIpAddressType().hashCode()); hashCode = prime * hashCode + ((getHardware() == null) ? 0 : getHardware().hashCode()); hashCode = prime * hashCode + ((getNetworking() == null) ? 0 : getNetworking().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getUsername() == null) ? 0 : getUsername().hashCode()); hashCode = prime * hashCode + ((getSshKeyName() == null) ? 0 : getSshKeyName().hashCode()); hashCode = prime * hashCode + ((getMetadataOptions() == null) ? 0 : getMetadataOptions().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); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.lightsail.model.transform.InstanceMarshaller.getInstance().marshall(this, protocolMarshaller); } }