/* * 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.elasticloadbalancingv2.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Information about a target group. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TargetGroup implements Serializable, Cloneable { /** ** The Amazon Resource Name (ARN) of the target group. *
*/ private String targetGroupArn; /** ** The name of the target group. *
*/ private String targetGroupName; /** ** The protocol to use for routing traffic to the targets. *
*/ private String protocol; /** ** The port on which the targets are listening. Not used if the target is a Lambda function. *
*/ private Integer port; /** ** The ID of the VPC for the targets. *
*/ private String vpcId; /** ** The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for * health checks. *
*/ private String healthCheckProtocol; /** ** The port to use to connect with the target. *
*/ private String healthCheckPort; /** ** Indicates whether health checks are enabled. *
*/ private Boolean healthCheckEnabled; /** ** The approximate amount of time, in seconds, between health checks of an individual target. *
*/ private Integer healthCheckIntervalSeconds; /** ** The amount of time, in seconds, during which no response means a failed health check. *
*/ private Integer healthCheckTimeoutSeconds; /** ** The number of consecutive health checks successes required before considering an unhealthy target healthy. *
*/ private Integer healthyThresholdCount; /** ** The number of consecutive health check failures required before considering the target unhealthy. *
*/ private Integer unhealthyThresholdCount; /** ** The destination for health checks on the targets. *
*/ private String healthCheckPath; /** ** The HTTP or gRPC codes to use when checking for a successful response from a target. *
*/ private Matcher matcher; /** ** The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group. *
*/ private java.util.List
* The type of target that you must specify when registering targets with this target group. The possible values are
* instance
(register targets by instance ID), ip
(register targets by IP address),
* lambda
(register a single Lambda function as a target), or alb
(register a single
* Application Load Balancer as a target).
*
* [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC
, HTTP1
, and
* HTTP2
.
*
* The type of IP address used for this target group. The possible values are ipv4
and
* ipv6
. This is an optional parameter. If not specified, the IP address type defaults to
* ipv4
.
*
* The Amazon Resource Name (ARN) of the target group. *
* * @param targetGroupArn * The Amazon Resource Name (ARN) of the target group. */ public void setTargetGroupArn(String targetGroupArn) { this.targetGroupArn = targetGroupArn; } /** ** The Amazon Resource Name (ARN) of the target group. *
* * @return The Amazon Resource Name (ARN) of the target group. */ public String getTargetGroupArn() { return this.targetGroupArn; } /** ** The Amazon Resource Name (ARN) of the target group. *
* * @param targetGroupArn * The Amazon Resource Name (ARN) of the target group. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withTargetGroupArn(String targetGroupArn) { setTargetGroupArn(targetGroupArn); return this; } /** ** The name of the target group. *
* * @param targetGroupName * The name of the target group. */ public void setTargetGroupName(String targetGroupName) { this.targetGroupName = targetGroupName; } /** ** The name of the target group. *
* * @return The name of the target group. */ public String getTargetGroupName() { return this.targetGroupName; } /** ** The name of the target group. *
* * @param targetGroupName * The name of the target group. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withTargetGroupName(String targetGroupName) { setTargetGroupName(targetGroupName); return this; } /** ** The protocol to use for routing traffic to the targets. *
* * @param protocol * The protocol to use for routing traffic to the targets. * @see ProtocolEnum */ public void setProtocol(String protocol) { this.protocol = protocol; } /** ** The protocol to use for routing traffic to the targets. *
* * @return The protocol to use for routing traffic to the targets. * @see ProtocolEnum */ public String getProtocol() { return this.protocol; } /** ** The protocol to use for routing traffic to the targets. *
* * @param protocol * The protocol to use for routing traffic to the targets. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtocolEnum */ public TargetGroup withProtocol(String protocol) { setProtocol(protocol); return this; } /** ** The protocol to use for routing traffic to the targets. *
* * @param protocol * The protocol to use for routing traffic to the targets. * @see ProtocolEnum */ public void setProtocol(ProtocolEnum protocol) { withProtocol(protocol); } /** ** The protocol to use for routing traffic to the targets. *
* * @param protocol * The protocol to use for routing traffic to the targets. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtocolEnum */ public TargetGroup withProtocol(ProtocolEnum protocol) { this.protocol = protocol.toString(); return this; } /** ** The port on which the targets are listening. Not used if the target is a Lambda function. *
* * @param port * The port on which the targets are listening. Not used if the target is a Lambda function. */ public void setPort(Integer port) { this.port = port; } /** ** The port on which the targets are listening. Not used if the target is a Lambda function. *
* * @return The port on which the targets are listening. Not used if the target is a Lambda function. */ public Integer getPort() { return this.port; } /** ** The port on which the targets are listening. Not used if the target is a Lambda function. *
* * @param port * The port on which the targets are listening. Not used if the target is a Lambda function. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withPort(Integer port) { setPort(port); return this; } /** ** The ID of the VPC for the targets. *
* * @param vpcId * The ID of the VPC for the targets. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** ** The ID of the VPC for the targets. *
* * @return The ID of the VPC for the targets. */ public String getVpcId() { return this.vpcId; } /** ** The ID of the VPC for the targets. *
* * @param vpcId * The ID of the VPC for the targets. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** ** The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for * health checks. *
* * @param healthCheckProtocol * The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not * supported for health checks. * @see ProtocolEnum */ public void setHealthCheckProtocol(String healthCheckProtocol) { this.healthCheckProtocol = healthCheckProtocol; } /** ** The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for * health checks. *
* * @return The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not * supported for health checks. * @see ProtocolEnum */ public String getHealthCheckProtocol() { return this.healthCheckProtocol; } /** ** The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for * health checks. *
* * @param healthCheckProtocol * The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not * supported for health checks. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtocolEnum */ public TargetGroup withHealthCheckProtocol(String healthCheckProtocol) { setHealthCheckProtocol(healthCheckProtocol); return this; } /** ** The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for * health checks. *
* * @param healthCheckProtocol * The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not * supported for health checks. * @see ProtocolEnum */ public void setHealthCheckProtocol(ProtocolEnum healthCheckProtocol) { withHealthCheckProtocol(healthCheckProtocol); } /** ** The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for * health checks. *
* * @param healthCheckProtocol * The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not * supported for health checks. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtocolEnum */ public TargetGroup withHealthCheckProtocol(ProtocolEnum healthCheckProtocol) { this.healthCheckProtocol = healthCheckProtocol.toString(); return this; } /** ** The port to use to connect with the target. *
* * @param healthCheckPort * The port to use to connect with the target. */ public void setHealthCheckPort(String healthCheckPort) { this.healthCheckPort = healthCheckPort; } /** ** The port to use to connect with the target. *
* * @return The port to use to connect with the target. */ public String getHealthCheckPort() { return this.healthCheckPort; } /** ** The port to use to connect with the target. *
* * @param healthCheckPort * The port to use to connect with the target. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withHealthCheckPort(String healthCheckPort) { setHealthCheckPort(healthCheckPort); return this; } /** ** Indicates whether health checks are enabled. *
* * @param healthCheckEnabled * Indicates whether health checks are enabled. */ public void setHealthCheckEnabled(Boolean healthCheckEnabled) { this.healthCheckEnabled = healthCheckEnabled; } /** ** Indicates whether health checks are enabled. *
* * @return Indicates whether health checks are enabled. */ public Boolean getHealthCheckEnabled() { return this.healthCheckEnabled; } /** ** Indicates whether health checks are enabled. *
* * @param healthCheckEnabled * Indicates whether health checks are enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withHealthCheckEnabled(Boolean healthCheckEnabled) { setHealthCheckEnabled(healthCheckEnabled); return this; } /** ** Indicates whether health checks are enabled. *
* * @return Indicates whether health checks are enabled. */ public Boolean isHealthCheckEnabled() { return this.healthCheckEnabled; } /** ** The approximate amount of time, in seconds, between health checks of an individual target. *
* * @param healthCheckIntervalSeconds * The approximate amount of time, in seconds, between health checks of an individual target. */ public void setHealthCheckIntervalSeconds(Integer healthCheckIntervalSeconds) { this.healthCheckIntervalSeconds = healthCheckIntervalSeconds; } /** ** The approximate amount of time, in seconds, between health checks of an individual target. *
* * @return The approximate amount of time, in seconds, between health checks of an individual target. */ public Integer getHealthCheckIntervalSeconds() { return this.healthCheckIntervalSeconds; } /** ** The approximate amount of time, in seconds, between health checks of an individual target. *
* * @param healthCheckIntervalSeconds * The approximate amount of time, in seconds, between health checks of an individual target. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withHealthCheckIntervalSeconds(Integer healthCheckIntervalSeconds) { setHealthCheckIntervalSeconds(healthCheckIntervalSeconds); return this; } /** ** The amount of time, in seconds, during which no response means a failed health check. *
* * @param healthCheckTimeoutSeconds * The amount of time, in seconds, during which no response means a failed health check. */ public void setHealthCheckTimeoutSeconds(Integer healthCheckTimeoutSeconds) { this.healthCheckTimeoutSeconds = healthCheckTimeoutSeconds; } /** ** The amount of time, in seconds, during which no response means a failed health check. *
* * @return The amount of time, in seconds, during which no response means a failed health check. */ public Integer getHealthCheckTimeoutSeconds() { return this.healthCheckTimeoutSeconds; } /** ** The amount of time, in seconds, during which no response means a failed health check. *
* * @param healthCheckTimeoutSeconds * The amount of time, in seconds, during which no response means a failed health check. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withHealthCheckTimeoutSeconds(Integer healthCheckTimeoutSeconds) { setHealthCheckTimeoutSeconds(healthCheckTimeoutSeconds); return this; } /** ** The number of consecutive health checks successes required before considering an unhealthy target healthy. *
* * @param healthyThresholdCount * The number of consecutive health checks successes required before considering an unhealthy target healthy. */ public void setHealthyThresholdCount(Integer healthyThresholdCount) { this.healthyThresholdCount = healthyThresholdCount; } /** ** The number of consecutive health checks successes required before considering an unhealthy target healthy. *
* * @return The number of consecutive health checks successes required before considering an unhealthy target * healthy. */ public Integer getHealthyThresholdCount() { return this.healthyThresholdCount; } /** ** The number of consecutive health checks successes required before considering an unhealthy target healthy. *
* * @param healthyThresholdCount * The number of consecutive health checks successes required before considering an unhealthy target healthy. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withHealthyThresholdCount(Integer healthyThresholdCount) { setHealthyThresholdCount(healthyThresholdCount); return this; } /** ** The number of consecutive health check failures required before considering the target unhealthy. *
* * @param unhealthyThresholdCount * The number of consecutive health check failures required before considering the target unhealthy. */ public void setUnhealthyThresholdCount(Integer unhealthyThresholdCount) { this.unhealthyThresholdCount = unhealthyThresholdCount; } /** ** The number of consecutive health check failures required before considering the target unhealthy. *
* * @return The number of consecutive health check failures required before considering the target unhealthy. */ public Integer getUnhealthyThresholdCount() { return this.unhealthyThresholdCount; } /** ** The number of consecutive health check failures required before considering the target unhealthy. *
* * @param unhealthyThresholdCount * The number of consecutive health check failures required before considering the target unhealthy. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withUnhealthyThresholdCount(Integer unhealthyThresholdCount) { setUnhealthyThresholdCount(unhealthyThresholdCount); return this; } /** ** The destination for health checks on the targets. *
* * @param healthCheckPath * The destination for health checks on the targets. */ public void setHealthCheckPath(String healthCheckPath) { this.healthCheckPath = healthCheckPath; } /** ** The destination for health checks on the targets. *
* * @return The destination for health checks on the targets. */ public String getHealthCheckPath() { return this.healthCheckPath; } /** ** The destination for health checks on the targets. *
* * @param healthCheckPath * The destination for health checks on the targets. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withHealthCheckPath(String healthCheckPath) { setHealthCheckPath(healthCheckPath); return this; } /** ** The HTTP or gRPC codes to use when checking for a successful response from a target. *
* * @param matcher * The HTTP or gRPC codes to use when checking for a successful response from a target. */ public void setMatcher(Matcher matcher) { this.matcher = matcher; } /** ** The HTTP or gRPC codes to use when checking for a successful response from a target. *
* * @return The HTTP or gRPC codes to use when checking for a successful response from a target. */ public Matcher getMatcher() { return this.matcher; } /** ** The HTTP or gRPC codes to use when checking for a successful response from a target. *
* * @param matcher * The HTTP or gRPC codes to use when checking for a successful response from a target. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withMatcher(Matcher matcher) { setMatcher(matcher); return this; } /** ** The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group. *
* * @return The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group. */ public java.util.List* The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group. *
* * @param loadBalancerArns * The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group. */ public void setLoadBalancerArns(java.util.Collection* The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setLoadBalancerArns(java.util.Collection)} or {@link #withLoadBalancerArns(java.util.Collection)} if you * want to override the existing values. *
* * @param loadBalancerArns * The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withLoadBalancerArns(String... loadBalancerArns) { if (this.loadBalancerArns == null) { setLoadBalancerArns(new java.util.ArrayList* The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group. *
* * @param loadBalancerArns * The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetGroup withLoadBalancerArns(java.util.Collection
* The type of target that you must specify when registering targets with this target group. The possible values are
* instance
(register targets by instance ID), ip
(register targets by IP address),
* lambda
(register a single Lambda function as a target), or alb
(register a single
* Application Load Balancer as a target).
*
instance
(register targets by instance ID), ip
(register targets by
* IP address), lambda
(register a single Lambda function as a target), or alb
* (register a single Application Load Balancer as a target).
* @see TargetTypeEnum
*/
public void setTargetType(String targetType) {
this.targetType = targetType;
}
/**
*
* The type of target that you must specify when registering targets with this target group. The possible values are
* instance
(register targets by instance ID), ip
(register targets by IP address),
* lambda
(register a single Lambda function as a target), or alb
(register a single
* Application Load Balancer as a target).
*
instance
(register targets by instance ID), ip
(register targets by
* IP address), lambda
(register a single Lambda function as a target), or alb
* (register a single Application Load Balancer as a target).
* @see TargetTypeEnum
*/
public String getTargetType() {
return this.targetType;
}
/**
*
* The type of target that you must specify when registering targets with this target group. The possible values are
* instance
(register targets by instance ID), ip
(register targets by IP address),
* lambda
(register a single Lambda function as a target), or alb
(register a single
* Application Load Balancer as a target).
*
instance
(register targets by instance ID), ip
(register targets by
* IP address), lambda
(register a single Lambda function as a target), or alb
* (register a single Application Load Balancer as a target).
* @return Returns a reference to this object so that method calls can be chained together.
* @see TargetTypeEnum
*/
public TargetGroup withTargetType(String targetType) {
setTargetType(targetType);
return this;
}
/**
*
* The type of target that you must specify when registering targets with this target group. The possible values are
* instance
(register targets by instance ID), ip
(register targets by IP address),
* lambda
(register a single Lambda function as a target), or alb
(register a single
* Application Load Balancer as a target).
*
instance
(register targets by instance ID), ip
(register targets by
* IP address), lambda
(register a single Lambda function as a target), or alb
* (register a single Application Load Balancer as a target).
* @see TargetTypeEnum
*/
public void setTargetType(TargetTypeEnum targetType) {
withTargetType(targetType);
}
/**
*
* The type of target that you must specify when registering targets with this target group. The possible values are
* instance
(register targets by instance ID), ip
(register targets by IP address),
* lambda
(register a single Lambda function as a target), or alb
(register a single
* Application Load Balancer as a target).
*
instance
(register targets by instance ID), ip
(register targets by
* IP address), lambda
(register a single Lambda function as a target), or alb
* (register a single Application Load Balancer as a target).
* @return Returns a reference to this object so that method calls can be chained together.
* @see TargetTypeEnum
*/
public TargetGroup withTargetType(TargetTypeEnum targetType) {
this.targetType = targetType.toString();
return this;
}
/**
*
* [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC
, HTTP1
, and
* HTTP2
.
*
GRPC
, HTTP1
,
* and HTTP2
.
*/
public void setProtocolVersion(String protocolVersion) {
this.protocolVersion = protocolVersion;
}
/**
*
* [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC
, HTTP1
, and
* HTTP2
.
*
GRPC
, HTTP1
* , and HTTP2
.
*/
public String getProtocolVersion() {
return this.protocolVersion;
}
/**
*
* [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC
, HTTP1
, and
* HTTP2
.
*
GRPC
, HTTP1
,
* and HTTP2
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TargetGroup withProtocolVersion(String protocolVersion) {
setProtocolVersion(protocolVersion);
return this;
}
/**
*
* The type of IP address used for this target group. The possible values are ipv4
and
* ipv6
. This is an optional parameter. If not specified, the IP address type defaults to
* ipv4
.
*
ipv4
and
* ipv6
. This is an optional parameter. If not specified, the IP address type defaults to
* ipv4
.
* @see TargetGroupIpAddressTypeEnum
*/
public void setIpAddressType(String ipAddressType) {
this.ipAddressType = ipAddressType;
}
/**
*
* The type of IP address used for this target group. The possible values are ipv4
and
* ipv6
. This is an optional parameter. If not specified, the IP address type defaults to
* ipv4
.
*
ipv4
and
* ipv6
. This is an optional parameter. If not specified, the IP address type defaults to
* ipv4
.
* @see TargetGroupIpAddressTypeEnum
*/
public String getIpAddressType() {
return this.ipAddressType;
}
/**
*
* The type of IP address used for this target group. The possible values are ipv4
and
* ipv6
. This is an optional parameter. If not specified, the IP address type defaults to
* ipv4
.
*
ipv4
and
* ipv6
. This is an optional parameter. If not specified, the IP address type defaults to
* ipv4
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TargetGroupIpAddressTypeEnum
*/
public TargetGroup withIpAddressType(String ipAddressType) {
setIpAddressType(ipAddressType);
return this;
}
/**
*
* The type of IP address used for this target group. The possible values are ipv4
and
* ipv6
. This is an optional parameter. If not specified, the IP address type defaults to
* ipv4
.
*
ipv4
and
* ipv6
. This is an optional parameter. If not specified, the IP address type defaults to
* ipv4
.
* @see TargetGroupIpAddressTypeEnum
*/
public void setIpAddressType(TargetGroupIpAddressTypeEnum ipAddressType) {
withIpAddressType(ipAddressType);
}
/**
*
* The type of IP address used for this target group. The possible values are ipv4
and
* ipv6
. This is an optional parameter. If not specified, the IP address type defaults to
* ipv4
.
*
ipv4
and
* ipv6
. This is an optional parameter. If not specified, the IP address type defaults to
* ipv4
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TargetGroupIpAddressTypeEnum
*/
public TargetGroup withIpAddressType(TargetGroupIpAddressTypeEnum ipAddressType) {
this.ipAddressType = ipAddressType.toString();
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 (getTargetGroupArn() != null)
sb.append("TargetGroupArn: ").append(getTargetGroupArn()).append(",");
if (getTargetGroupName() != null)
sb.append("TargetGroupName: ").append(getTargetGroupName()).append(",");
if (getProtocol() != null)
sb.append("Protocol: ").append(getProtocol()).append(",");
if (getPort() != null)
sb.append("Port: ").append(getPort()).append(",");
if (getVpcId() != null)
sb.append("VpcId: ").append(getVpcId()).append(",");
if (getHealthCheckProtocol() != null)
sb.append("HealthCheckProtocol: ").append(getHealthCheckProtocol()).append(",");
if (getHealthCheckPort() != null)
sb.append("HealthCheckPort: ").append(getHealthCheckPort()).append(",");
if (getHealthCheckEnabled() != null)
sb.append("HealthCheckEnabled: ").append(getHealthCheckEnabled()).append(",");
if (getHealthCheckIntervalSeconds() != null)
sb.append("HealthCheckIntervalSeconds: ").append(getHealthCheckIntervalSeconds()).append(",");
if (getHealthCheckTimeoutSeconds() != null)
sb.append("HealthCheckTimeoutSeconds: ").append(getHealthCheckTimeoutSeconds()).append(",");
if (getHealthyThresholdCount() != null)
sb.append("HealthyThresholdCount: ").append(getHealthyThresholdCount()).append(",");
if (getUnhealthyThresholdCount() != null)
sb.append("UnhealthyThresholdCount: ").append(getUnhealthyThresholdCount()).append(",");
if (getHealthCheckPath() != null)
sb.append("HealthCheckPath: ").append(getHealthCheckPath()).append(",");
if (getMatcher() != null)
sb.append("Matcher: ").append(getMatcher()).append(",");
if (getLoadBalancerArns() != null)
sb.append("LoadBalancerArns: ").append(getLoadBalancerArns()).append(",");
if (getTargetType() != null)
sb.append("TargetType: ").append(getTargetType()).append(",");
if (getProtocolVersion() != null)
sb.append("ProtocolVersion: ").append(getProtocolVersion()).append(",");
if (getIpAddressType() != null)
sb.append("IpAddressType: ").append(getIpAddressType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof TargetGroup == false)
return false;
TargetGroup other = (TargetGroup) obj;
if (other.getTargetGroupArn() == null ^ this.getTargetGroupArn() == null)
return false;
if (other.getTargetGroupArn() != null && other.getTargetGroupArn().equals(this.getTargetGroupArn()) == false)
return false;
if (other.getTargetGroupName() == null ^ this.getTargetGroupName() == null)
return false;
if (other.getTargetGroupName() != null && other.getTargetGroupName().equals(this.getTargetGroupName()) == 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.getPort() == null ^ this.getPort() == null)
return false;
if (other.getPort() != null && other.getPort().equals(this.getPort()) == false)
return false;
if (other.getVpcId() == null ^ this.getVpcId() == null)
return false;
if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == false)
return false;
if (other.getHealthCheckProtocol() == null ^ this.getHealthCheckProtocol() == null)
return false;
if (other.getHealthCheckProtocol() != null && other.getHealthCheckProtocol().equals(this.getHealthCheckProtocol()) == false)
return false;
if (other.getHealthCheckPort() == null ^ this.getHealthCheckPort() == null)
return false;
if (other.getHealthCheckPort() != null && other.getHealthCheckPort().equals(this.getHealthCheckPort()) == false)
return false;
if (other.getHealthCheckEnabled() == null ^ this.getHealthCheckEnabled() == null)
return false;
if (other.getHealthCheckEnabled() != null && other.getHealthCheckEnabled().equals(this.getHealthCheckEnabled()) == false)
return false;
if (other.getHealthCheckIntervalSeconds() == null ^ this.getHealthCheckIntervalSeconds() == null)
return false;
if (other.getHealthCheckIntervalSeconds() != null && other.getHealthCheckIntervalSeconds().equals(this.getHealthCheckIntervalSeconds()) == false)
return false;
if (other.getHealthCheckTimeoutSeconds() == null ^ this.getHealthCheckTimeoutSeconds() == null)
return false;
if (other.getHealthCheckTimeoutSeconds() != null && other.getHealthCheckTimeoutSeconds().equals(this.getHealthCheckTimeoutSeconds()) == false)
return false;
if (other.getHealthyThresholdCount() == null ^ this.getHealthyThresholdCount() == null)
return false;
if (other.getHealthyThresholdCount() != null && other.getHealthyThresholdCount().equals(this.getHealthyThresholdCount()) == false)
return false;
if (other.getUnhealthyThresholdCount() == null ^ this.getUnhealthyThresholdCount() == null)
return false;
if (other.getUnhealthyThresholdCount() != null && other.getUnhealthyThresholdCount().equals(this.getUnhealthyThresholdCount()) == 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.getMatcher() == null ^ this.getMatcher() == null)
return false;
if (other.getMatcher() != null && other.getMatcher().equals(this.getMatcher()) == false)
return false;
if (other.getLoadBalancerArns() == null ^ this.getLoadBalancerArns() == null)
return false;
if (other.getLoadBalancerArns() != null && other.getLoadBalancerArns().equals(this.getLoadBalancerArns()) == false)
return false;
if (other.getTargetType() == null ^ this.getTargetType() == null)
return false;
if (other.getTargetType() != null && other.getTargetType().equals(this.getTargetType()) == false)
return false;
if (other.getProtocolVersion() == null ^ this.getProtocolVersion() == null)
return false;
if (other.getProtocolVersion() != null && other.getProtocolVersion().equals(this.getProtocolVersion()) == false)
return false;
if (other.getIpAddressType() == null ^ this.getIpAddressType() == null)
return false;
if (other.getIpAddressType() != null && other.getIpAddressType().equals(this.getIpAddressType()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTargetGroupArn() == null) ? 0 : getTargetGroupArn().hashCode());
hashCode = prime * hashCode + ((getTargetGroupName() == null) ? 0 : getTargetGroupName().hashCode());
hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode());
hashCode = prime * hashCode + ((getPort() == null) ? 0 : getPort().hashCode());
hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode());
hashCode = prime * hashCode + ((getHealthCheckProtocol() == null) ? 0 : getHealthCheckProtocol().hashCode());
hashCode = prime * hashCode + ((getHealthCheckPort() == null) ? 0 : getHealthCheckPort().hashCode());
hashCode = prime * hashCode + ((getHealthCheckEnabled() == null) ? 0 : getHealthCheckEnabled().hashCode());
hashCode = prime * hashCode + ((getHealthCheckIntervalSeconds() == null) ? 0 : getHealthCheckIntervalSeconds().hashCode());
hashCode = prime * hashCode + ((getHealthCheckTimeoutSeconds() == null) ? 0 : getHealthCheckTimeoutSeconds().hashCode());
hashCode = prime * hashCode + ((getHealthyThresholdCount() == null) ? 0 : getHealthyThresholdCount().hashCode());
hashCode = prime * hashCode + ((getUnhealthyThresholdCount() == null) ? 0 : getUnhealthyThresholdCount().hashCode());
hashCode = prime * hashCode + ((getHealthCheckPath() == null) ? 0 : getHealthCheckPath().hashCode());
hashCode = prime * hashCode + ((getMatcher() == null) ? 0 : getMatcher().hashCode());
hashCode = prime * hashCode + ((getLoadBalancerArns() == null) ? 0 : getLoadBalancerArns().hashCode());
hashCode = prime * hashCode + ((getTargetType() == null) ? 0 : getTargetType().hashCode());
hashCode = prime * hashCode + ((getProtocolVersion() == null) ? 0 : getProtocolVersion().hashCode());
hashCode = prime * hashCode + ((getIpAddressType() == null) ? 0 : getIpAddressType().hashCode());
return hashCode;
}
@Override
public TargetGroup clone() {
try {
return (TargetGroup) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}