/* * 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 a load balancer. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class LoadBalancer implements Serializable, Cloneable, StructuredPojo { /** *
* The name of the load balancer (e.g., my-load-balancer
).
*
* The Amazon Resource Name (ARN) of the load balancer. *
*/ private String arn; /** ** The support code. Include this code in your email to support when you have questions about your Lightsail load * balancer. This code enables our support team to look up your Lightsail information more easily. *
*/ private String supportCode; /** ** The date when your load balancer was created. *
*/ private java.util.Date createdAt; /** *
* The AWS Region where your load balancer was created (e.g., us-east-2a
). Lightsail automatically
* creates your load balancer across Availability Zones.
*
* The resource type (e.g., LoadBalancer
.
*
* 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 DNS name of your Lightsail load balancer. *
*/ private String dnsName; /** ** The status of your load balancer. Valid values are below. *
*/ private String state; /** ** The protocol you have enabled for your load balancer. Valid values are below. *
*
* You can't just have HTTP_HTTPS
, but you can have just HTTP
.
*
* An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443. *
*/ private java.util.List* The path you specified to perform your health checks. If no path is specified, the load balancer tries to make a * request to the default (root) page. *
*/ private String healthCheckPath; /** ** The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's port 80. * For HTTPS traffic, it's port 443. *
*/ private Integer instancePort; /** ** An array of InstanceHealthSummary objects describing the health of the load balancer. *
*/ private java.util.List
* An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the SSL/TLS
* certificates. For example, if true
, the certificate is attached to the load balancer.
*
* A string to string map of the configuration options for your load balancer. Valid values are listed below. *
*/ private java.util.Map* The IP address type of the load balancer. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer. *
*/ private Boolean httpsRedirectionEnabled; /** ** The name of the TLS security policy for the load balancer. *
*/ private String tlsPolicyName; /** *
* The name of the load balancer (e.g., my-load-balancer
).
*
my-load-balancer
).
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the load balancer (e.g., my-load-balancer
).
*
my-load-balancer
).
*/
public String getName() {
return this.name;
}
/**
*
* The name of the load balancer (e.g., my-load-balancer
).
*
my-load-balancer
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withName(String name) {
setName(name);
return this;
}
/**
* * The Amazon Resource Name (ARN) of the load balancer. *
* * @param arn * The Amazon Resource Name (ARN) of the load balancer. */ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN) of the load balancer. *
* * @return The Amazon Resource Name (ARN) of the load balancer. */ public String getArn() { return this.arn; } /** ** The Amazon Resource Name (ARN) of the load balancer. *
* * @param arn * The Amazon Resource Name (ARN) of the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withArn(String arn) { setArn(arn); return this; } /** ** The support code. Include this code in your email to support when you have questions about your Lightsail load * balancer. 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 your Lightsail * load balancer. 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 your Lightsail load * balancer. 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 your Lightsail * load balancer. 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 your Lightsail load * balancer. 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 your Lightsail * load balancer. 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 LoadBalancer withSupportCode(String supportCode) { setSupportCode(supportCode); return this; } /** ** The date when your load balancer was created. *
* * @param createdAt * The date when your load balancer was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** ** The date when your load balancer was created. *
* * @return The date when your load balancer was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** ** The date when your load balancer was created. *
* * @param createdAt * The date when your load balancer was created. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** *
* The AWS Region where your load balancer was created (e.g., us-east-2a
). Lightsail automatically
* creates your load balancer across Availability Zones.
*
us-east-2a
). Lightsail
* automatically creates your load balancer across Availability Zones.
*/
public void setLocation(ResourceLocation location) {
this.location = location;
}
/**
*
* The AWS Region where your load balancer was created (e.g., us-east-2a
). Lightsail automatically
* creates your load balancer across Availability Zones.
*
us-east-2a
). Lightsail
* automatically creates your load balancer across Availability Zones.
*/
public ResourceLocation getLocation() {
return this.location;
}
/**
*
* The AWS Region where your load balancer was created (e.g., us-east-2a
). Lightsail automatically
* creates your load balancer across Availability Zones.
*
us-east-2a
). Lightsail
* automatically creates your load balancer across Availability Zones.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withLocation(ResourceLocation location) {
setLocation(location);
return this;
}
/**
*
* The resource type (e.g., LoadBalancer
.
*
LoadBalancer
.
* @see ResourceType
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
*
* The resource type (e.g., LoadBalancer
.
*
LoadBalancer
.
* @see ResourceType
*/
public String getResourceType() {
return this.resourceType;
}
/**
*
* The resource type (e.g., LoadBalancer
.
*
LoadBalancer
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ResourceType
*/
public LoadBalancer withResourceType(String resourceType) {
setResourceType(resourceType);
return this;
}
/**
*
* The resource type (e.g., LoadBalancer
.
*
LoadBalancer
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ResourceType
*/
public LoadBalancer 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 LoadBalancer 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 LoadBalancer withTags(java.util.Collection* The DNS name of your Lightsail load balancer. *
* * @param dnsName * The DNS name of your Lightsail load balancer. */ public void setDnsName(String dnsName) { this.dnsName = dnsName; } /** ** The DNS name of your Lightsail load balancer. *
* * @return The DNS name of your Lightsail load balancer. */ public String getDnsName() { return this.dnsName; } /** ** The DNS name of your Lightsail load balancer. *
* * @param dnsName * The DNS name of your Lightsail load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withDnsName(String dnsName) { setDnsName(dnsName); return this; } /** ** The status of your load balancer. Valid values are below. *
* * @param state * The status of your load balancer. Valid values are below. * @see LoadBalancerState */ public void setState(String state) { this.state = state; } /** ** The status of your load balancer. Valid values are below. *
* * @return The status of your load balancer. Valid values are below. * @see LoadBalancerState */ public String getState() { return this.state; } /** ** The status of your load balancer. Valid values are below. *
* * @param state * The status of your load balancer. Valid values are below. * @return Returns a reference to this object so that method calls can be chained together. * @see LoadBalancerState */ public LoadBalancer withState(String state) { setState(state); return this; } /** ** The status of your load balancer. Valid values are below. *
* * @param state * The status of your load balancer. Valid values are below. * @return Returns a reference to this object so that method calls can be chained together. * @see LoadBalancerState */ public LoadBalancer withState(LoadBalancerState state) { this.state = state.toString(); return this; } /** ** The protocol you have enabled for your load balancer. Valid values are below. *
*
* You can't just have HTTP_HTTPS
, but you can have just HTTP
.
*
* You can't just have HTTP_HTTPS
, but you can have just HTTP
.
* @see LoadBalancerProtocol
*/
public void setProtocol(String protocol) {
this.protocol = protocol;
}
/**
*
* The protocol you have enabled for your load balancer. Valid values are below. *
*
* You can't just have HTTP_HTTPS
, but you can have just HTTP
.
*
* You can't just have HTTP_HTTPS
, but you can have just HTTP
.
* @see LoadBalancerProtocol
*/
public String getProtocol() {
return this.protocol;
}
/**
*
* The protocol you have enabled for your load balancer. Valid values are below. *
*
* You can't just have HTTP_HTTPS
, but you can have just HTTP
.
*
* You can't just have HTTP_HTTPS
, but you can have just HTTP
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LoadBalancerProtocol
*/
public LoadBalancer withProtocol(String protocol) {
setProtocol(protocol);
return this;
}
/**
*
* The protocol you have enabled for your load balancer. Valid values are below. *
*
* You can't just have HTTP_HTTPS
, but you can have just HTTP
.
*
* You can't just have HTTP_HTTPS
, but you can have just HTTP
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LoadBalancerProtocol
*/
public LoadBalancer withProtocol(LoadBalancerProtocol protocol) {
this.protocol = protocol.toString();
return this;
}
/**
*
* An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443. *
* * @return An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443. */ public java.util.List* An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443. *
* * @param publicPorts * An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443. */ public void setPublicPorts(java.util.Collection* An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPublicPorts(java.util.Collection)} or {@link #withPublicPorts(java.util.Collection)} if you want to * override the existing values. *
* * @param publicPorts * An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withPublicPorts(Integer... publicPorts) { if (this.publicPorts == null) { setPublicPorts(new java.util.ArrayList* An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443. *
* * @param publicPorts * An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withPublicPorts(java.util.Collection* The path you specified to perform your health checks. If no path is specified, the load balancer tries to make a * request to the default (root) page. *
* * @param healthCheckPath * The path you specified to perform your health checks. If no path is specified, the load balancer tries to * make a request to the default (root) page. */ public void setHealthCheckPath(String healthCheckPath) { this.healthCheckPath = healthCheckPath; } /** ** The path you specified to perform your health checks. If no path is specified, the load balancer tries to make a * request to the default (root) page. *
* * @return The path you specified to perform your health checks. If no path is specified, the load balancer tries to * make a request to the default (root) page. */ public String getHealthCheckPath() { return this.healthCheckPath; } /** ** The path you specified to perform your health checks. If no path is specified, the load balancer tries to make a * request to the default (root) page. *
* * @param healthCheckPath * The path you specified to perform your health checks. If no path is specified, the load balancer tries to * make a request to the default (root) page. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withHealthCheckPath(String healthCheckPath) { setHealthCheckPath(healthCheckPath); return this; } /** ** The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's port 80. * For HTTPS traffic, it's port 443. *
* * @param instancePort * The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's * port 80. For HTTPS traffic, it's port 443. */ public void setInstancePort(Integer instancePort) { this.instancePort = instancePort; } /** ** The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's port 80. * For HTTPS traffic, it's port 443. *
* * @return The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's * port 80. For HTTPS traffic, it's port 443. */ public Integer getInstancePort() { return this.instancePort; } /** ** The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's port 80. * For HTTPS traffic, it's port 443. *
* * @param instancePort * The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's * port 80. For HTTPS traffic, it's port 443. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withInstancePort(Integer instancePort) { setInstancePort(instancePort); return this; } /** ** An array of InstanceHealthSummary objects describing the health of the load balancer. *
* * @return An array of InstanceHealthSummary objects describing the health of the load balancer. */ public java.util.List* An array of InstanceHealthSummary objects describing the health of the load balancer. *
* * @param instanceHealthSummary * An array of InstanceHealthSummary objects describing the health of the load balancer. */ public void setInstanceHealthSummary(java.util.Collection* An array of InstanceHealthSummary objects describing the health of the load balancer. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setInstanceHealthSummary(java.util.Collection)} or * {@link #withInstanceHealthSummary(java.util.Collection)} if you want to override the existing values. *
* * @param instanceHealthSummary * An array of InstanceHealthSummary objects describing the health of the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withInstanceHealthSummary(InstanceHealthSummary... instanceHealthSummary) { if (this.instanceHealthSummary == null) { setInstanceHealthSummary(new java.util.ArrayList* An array of InstanceHealthSummary objects describing the health of the load balancer. *
* * @param instanceHealthSummary * An array of InstanceHealthSummary objects describing the health of the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withInstanceHealthSummary(java.util.Collection
* An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the SSL/TLS
* certificates. For example, if true
, the certificate is attached to the load balancer.
*
true
, the certificate is attached to the load
* balancer.
*/
public java.util.List
* An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the SSL/TLS
* certificates. For example, if true
, the certificate is attached to the load balancer.
*
true
, the certificate is attached to the load balancer.
*/
public void setTlsCertificateSummaries(java.util.Collection
* An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the SSL/TLS
* certificates. For example, if true
, the certificate is attached to the load balancer.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTlsCertificateSummaries(java.util.Collection)} or * {@link #withTlsCertificateSummaries(java.util.Collection)} if you want to override the existing values. *
* * @param tlsCertificateSummaries * An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the * SSL/TLS certificates. For example, iftrue
, the certificate is attached to the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withTlsCertificateSummaries(LoadBalancerTlsCertificateSummary... tlsCertificateSummaries) {
if (this.tlsCertificateSummaries == null) {
setTlsCertificateSummaries(new java.util.ArrayList
* An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the SSL/TLS
* certificates. For example, if true
, the certificate is attached to the load balancer.
*
true
, the certificate is attached to the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withTlsCertificateSummaries(java.util.Collection* A string to string map of the configuration options for your load balancer. Valid values are listed below. *
* * @return A string to string map of the configuration options for your load balancer. Valid values are listed * below. */ public java.util.Map* A string to string map of the configuration options for your load balancer. Valid values are listed below. *
* * @param configurationOptions * A string to string map of the configuration options for your load balancer. Valid values are listed below. */ public void setConfigurationOptions(java.util.Map* A string to string map of the configuration options for your load balancer. Valid values are listed below. *
* * @param configurationOptions * A string to string map of the configuration options for your load balancer. Valid values are listed below. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withConfigurationOptions(java.util.Map* The IP address type of the load balancer. *
*
* 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 load balancer. *
*
* 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 load balancer. *
*
* 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 LoadBalancer withIpAddressType(String ipAddressType) {
setIpAddressType(ipAddressType);
return this;
}
/**
*
* The IP address type of the load balancer. *
*
* 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 LoadBalancer withIpAddressType(IpAddressType ipAddressType) {
this.ipAddressType = ipAddressType.toString();
return this;
}
/**
*
* A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer. *
* * @param httpsRedirectionEnabled * A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer. */ public void setHttpsRedirectionEnabled(Boolean httpsRedirectionEnabled) { this.httpsRedirectionEnabled = httpsRedirectionEnabled; } /** ** A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer. *
* * @return A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer. */ public Boolean getHttpsRedirectionEnabled() { return this.httpsRedirectionEnabled; } /** ** A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer. *
* * @param httpsRedirectionEnabled * A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withHttpsRedirectionEnabled(Boolean httpsRedirectionEnabled) { setHttpsRedirectionEnabled(httpsRedirectionEnabled); return this; } /** ** A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer. *
* * @return A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer. */ public Boolean isHttpsRedirectionEnabled() { return this.httpsRedirectionEnabled; } /** ** The name of the TLS security policy for the load balancer. *
* * @param tlsPolicyName * The name of the TLS security policy for the load balancer. */ public void setTlsPolicyName(String tlsPolicyName) { this.tlsPolicyName = tlsPolicyName; } /** ** The name of the TLS security policy for the load balancer. *
* * @return The name of the TLS security policy for the load balancer. */ public String getTlsPolicyName() { return this.tlsPolicyName; } /** ** The name of the TLS security policy for the load balancer. *
* * @param tlsPolicyName * The name of the TLS security policy for the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public LoadBalancer withTlsPolicyName(String tlsPolicyName) { setTlsPolicyName(tlsPolicyName); 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 (getDnsName() != null) sb.append("DnsName: ").append(getDnsName()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getProtocol() != null) sb.append("Protocol: ").append(getProtocol()).append(","); if (getPublicPorts() != null) sb.append("PublicPorts: ").append(getPublicPorts()).append(","); if (getHealthCheckPath() != null) sb.append("HealthCheckPath: ").append(getHealthCheckPath()).append(","); if (getInstancePort() != null) sb.append("InstancePort: ").append(getInstancePort()).append(","); if (getInstanceHealthSummary() != null) sb.append("InstanceHealthSummary: ").append(getInstanceHealthSummary()).append(","); if (getTlsCertificateSummaries() != null) sb.append("TlsCertificateSummaries: ").append(getTlsCertificateSummaries()).append(","); if (getConfigurationOptions() != null) sb.append("ConfigurationOptions: ").append(getConfigurationOptions()).append(","); if (getIpAddressType() != null) sb.append("IpAddressType: ").append(getIpAddressType()).append(","); if (getHttpsRedirectionEnabled() != null) sb.append("HttpsRedirectionEnabled: ").append(getHttpsRedirectionEnabled()).append(","); if (getTlsPolicyName() != null) sb.append("TlsPolicyName: ").append(getTlsPolicyName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LoadBalancer == false) return false; LoadBalancer other = (LoadBalancer) 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.getDnsName() == null ^ this.getDnsName() == null) return false; if (other.getDnsName() != null && other.getDnsName().equals(this.getDnsName()) == 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.getProtocol() == null ^ this.getProtocol() == null) return false; if (other.getProtocol() != null && other.getProtocol().equals(this.getProtocol()) == false) return false; if (other.getPublicPorts() == null ^ this.getPublicPorts() == null) return false; if (other.getPublicPorts() != null && other.getPublicPorts().equals(this.getPublicPorts()) == false) return false; if (other.getHealthCheckPath() == null ^ this.getHealthCheckPath() == null) return false; if (other.getHealthCheckPath() != null && other.getHealthCheckPath().equals(this.getHealthCheckPath()) == false) return false; if (other.getInstancePort() == null ^ this.getInstancePort() == null) return false; if (other.getInstancePort() != null && other.getInstancePort().equals(this.getInstancePort()) == false) return false; if (other.getInstanceHealthSummary() == null ^ this.getInstanceHealthSummary() == null) return false; if (other.getInstanceHealthSummary() != null && other.getInstanceHealthSummary().equals(this.getInstanceHealthSummary()) == false) return false; if (other.getTlsCertificateSummaries() == null ^ this.getTlsCertificateSummaries() == null) return false; if (other.getTlsCertificateSummaries() != null && other.getTlsCertificateSummaries().equals(this.getTlsCertificateSummaries()) == false) return false; if (other.getConfigurationOptions() == null ^ this.getConfigurationOptions() == null) return false; if (other.getConfigurationOptions() != null && other.getConfigurationOptions().equals(this.getConfigurationOptions()) == 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.getHttpsRedirectionEnabled() == null ^ this.getHttpsRedirectionEnabled() == null) return false; if (other.getHttpsRedirectionEnabled() != null && other.getHttpsRedirectionEnabled().equals(this.getHttpsRedirectionEnabled()) == false) return false; if (other.getTlsPolicyName() == null ^ this.getTlsPolicyName() == null) return false; if (other.getTlsPolicyName() != null && other.getTlsPolicyName().equals(this.getTlsPolicyName()) == 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 + ((getDnsName() == null) ? 0 : getDnsName().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getPublicPorts() == null) ? 0 : getPublicPorts().hashCode()); hashCode = prime * hashCode + ((getHealthCheckPath() == null) ? 0 : getHealthCheckPath().hashCode()); hashCode = prime * hashCode + ((getInstancePort() == null) ? 0 : getInstancePort().hashCode()); hashCode = prime * hashCode + ((getInstanceHealthSummary() == null) ? 0 : getInstanceHealthSummary().hashCode()); hashCode = prime * hashCode + ((getTlsCertificateSummaries() == null) ? 0 : getTlsCertificateSummaries().hashCode()); hashCode = prime * hashCode + ((getConfigurationOptions() == null) ? 0 : getConfigurationOptions().hashCode()); hashCode = prime * hashCode + ((getIpAddressType() == null) ? 0 : getIpAddressType().hashCode()); hashCode = prime * hashCode + ((getHttpsRedirectionEnabled() == null) ? 0 : getHttpsRedirectionEnabled().hashCode()); hashCode = prime * hashCode + ((getTlsPolicyName() == null) ? 0 : getTlsPolicyName().hashCode()); return hashCode; } @Override public LoadBalancer clone() { try { return (LoadBalancer) 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.LoadBalancerMarshaller.getInstance().marshall(this, protocolMarshaller); } }