com.amazonaws.services.elasticloadbalancingv2.model.LoadBalancer Maven / Gradle / Ivy
Show all versions of aws-java-sdk-elasticloadbalancingv2 Show documentation
/*
* Copyright 2019-2024 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 load balancer.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class LoadBalancer implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the load balancer.
*
*/
private String loadBalancerArn;
/**
*
* The public DNS name of the load balancer.
*
*/
private String dNSName;
/**
*
* The ID of the Amazon Route 53 hosted zone associated with the load balancer.
*
*/
private String canonicalHostedZoneId;
/**
*
* The date and time the load balancer was created.
*
*/
private java.util.Date createdTime;
/**
*
* The name of the load balancer.
*
*/
private String loadBalancerName;
/**
*
* The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load
* balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load
* balancers can route requests from clients over the internet.
*
*
* The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer
* is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can route
* requests only from clients with access to the VPC for the load balancer.
*
*/
private String scheme;
/**
*
* The ID of the VPC for the load balancer.
*
*/
private String vpcId;
/**
*
* The state of the load balancer.
*
*/
private LoadBalancerState state;
/**
*
* The type of load balancer.
*
*/
private String type;
/**
*
* The subnets for the load balancer.
*
*/
private java.util.List availabilityZones;
/**
*
* The IDs of the security groups for the load balancer.
*
*/
private java.util.List securityGroups;
/**
*
* [Application Load Balancers] The type of IP addresses used for public or private connections by the subnets
* attached to your load balancer. The possible values are ipv4
(for only IPv4 addresses),
* dualstack
(for IPv4 and IPv6 addresses), and dualstack-without-public-ipv4
(for IPv6
* only public addresses, with private IPv4 and IPv6 addresses).
*
*
* [Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private
* connections by the subnets attached to your load balancer. The possible values are ipv4
(for only
* IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*
*/
private String ipAddressType;
/**
*
* [Application Load Balancers on Outposts] The ID of the customer-owned address pool.
*
*/
private String customerOwnedIpv4Pool;
/**
*
* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through
* Amazon Web Services PrivateLink.
*
*/
private String enforceSecurityGroupInboundRulesOnPrivateLinkTraffic;
/**
*
* The Amazon Resource Name (ARN) of the load balancer.
*
*
* @param loadBalancerArn
* The Amazon Resource Name (ARN) of the load balancer.
*/
public void setLoadBalancerArn(String loadBalancerArn) {
this.loadBalancerArn = loadBalancerArn;
}
/**
*
* The Amazon Resource Name (ARN) of the load balancer.
*
*
* @return The Amazon Resource Name (ARN) of the load balancer.
*/
public String getLoadBalancerArn() {
return this.loadBalancerArn;
}
/**
*
* The Amazon Resource Name (ARN) of the load balancer.
*
*
* @param loadBalancerArn
* 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 withLoadBalancerArn(String loadBalancerArn) {
setLoadBalancerArn(loadBalancerArn);
return this;
}
/**
*
* The public DNS name of the load balancer.
*
*
* @param dNSName
* The public DNS name of the load balancer.
*/
public void setDNSName(String dNSName) {
this.dNSName = dNSName;
}
/**
*
* The public DNS name of the load balancer.
*
*
* @return The public DNS name of the load balancer.
*/
public String getDNSName() {
return this.dNSName;
}
/**
*
* The public DNS name of the load balancer.
*
*
* @param dNSName
* The public DNS name of the 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 ID of the Amazon Route 53 hosted zone associated with the load balancer.
*
*
* @param canonicalHostedZoneId
* The ID of the Amazon Route 53 hosted zone associated with the load balancer.
*/
public void setCanonicalHostedZoneId(String canonicalHostedZoneId) {
this.canonicalHostedZoneId = canonicalHostedZoneId;
}
/**
*
* The ID of the Amazon Route 53 hosted zone associated with the load balancer.
*
*
* @return The ID of the Amazon Route 53 hosted zone associated with the load balancer.
*/
public String getCanonicalHostedZoneId() {
return this.canonicalHostedZoneId;
}
/**
*
* The ID of the Amazon Route 53 hosted zone associated with the load balancer.
*
*
* @param canonicalHostedZoneId
* The ID of the Amazon Route 53 hosted zone associated with the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withCanonicalHostedZoneId(String canonicalHostedZoneId) {
setCanonicalHostedZoneId(canonicalHostedZoneId);
return this;
}
/**
*
* The date and time the load balancer was created.
*
*
* @param createdTime
* The date and time the load balancer was created.
*/
public void setCreatedTime(java.util.Date createdTime) {
this.createdTime = createdTime;
}
/**
*
* The date and time the load balancer was created.
*
*
* @return The date and time the load balancer was created.
*/
public java.util.Date getCreatedTime() {
return this.createdTime;
}
/**
*
* The date and time the load balancer was created.
*
*
* @param createdTime
* The date and time the load balancer was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withCreatedTime(java.util.Date createdTime) {
setCreatedTime(createdTime);
return this;
}
/**
*
* The name of the load balancer.
*
*
* @param loadBalancerName
* The name of the load balancer.
*/
public void setLoadBalancerName(String loadBalancerName) {
this.loadBalancerName = loadBalancerName;
}
/**
*
* The name of the load balancer.
*
*
* @return The name of the load balancer.
*/
public String getLoadBalancerName() {
return this.loadBalancerName;
}
/**
*
* The name of the load balancer.
*
*
* @param loadBalancerName
* The name of the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withLoadBalancerName(String loadBalancerName) {
setLoadBalancerName(loadBalancerName);
return this;
}
/**
*
* The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load
* balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load
* balancers can route requests from clients over the internet.
*
*
* The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer
* is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can route
* requests only from clients with access to the VPC for the load balancer.
*
*
* @param scheme
* The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing
* load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing
* load balancers can route requests from clients over the internet.
*
* The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load
* balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load
* balancers can route requests only from clients with access to the VPC for the load balancer.
* @see LoadBalancerSchemeEnum
*/
public void setScheme(String scheme) {
this.scheme = scheme;
}
/**
*
* The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load
* balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load
* balancers can route requests from clients over the internet.
*
*
* The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer
* is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can route
* requests only from clients with access to the VPC for the load balancer.
*
*
* @return The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an
* Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore,
* Internet-facing load balancers can route requests from clients over the internet.
*
* The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load
* balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load
* balancers can route requests only from clients with access to the VPC for the load balancer.
* @see LoadBalancerSchemeEnum
*/
public String getScheme() {
return this.scheme;
}
/**
*
* The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load
* balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load
* balancers can route requests from clients over the internet.
*
*
* The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer
* is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can route
* requests only from clients with access to the VPC for the load balancer.
*
*
* @param scheme
* The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing
* load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing
* load balancers can route requests from clients over the internet.
*
* The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load
* balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load
* balancers can route requests only from clients with access to the VPC for the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LoadBalancerSchemeEnum
*/
public LoadBalancer withScheme(String scheme) {
setScheme(scheme);
return this;
}
/**
*
* The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load
* balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load
* balancers can route requests from clients over the internet.
*
*
* The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer
* is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can route
* requests only from clients with access to the VPC for the load balancer.
*
*
* @param scheme
* The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing
* load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing
* load balancers can route requests from clients over the internet.
*
* The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load
* balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load
* balancers can route requests only from clients with access to the VPC for the load balancer.
* @see LoadBalancerSchemeEnum
*/
public void setScheme(LoadBalancerSchemeEnum scheme) {
withScheme(scheme);
}
/**
*
* The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load
* balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load
* balancers can route requests from clients over the internet.
*
*
* The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer
* is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can route
* requests only from clients with access to the VPC for the load balancer.
*
*
* @param scheme
* The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing
* load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing
* load balancers can route requests from clients over the internet.
*
* The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load
* balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load
* balancers can route requests only from clients with access to the VPC for the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LoadBalancerSchemeEnum
*/
public LoadBalancer withScheme(LoadBalancerSchemeEnum scheme) {
this.scheme = scheme.toString();
return this;
}
/**
*
* The ID of the VPC for the load balancer.
*
*
* @param vpcId
* The ID of the VPC for the load balancer.
*/
public void setVpcId(String vpcId) {
this.vpcId = vpcId;
}
/**
*
* The ID of the VPC for the load balancer.
*
*
* @return The ID of the VPC for the load balancer.
*/
public String getVpcId() {
return this.vpcId;
}
/**
*
* The ID of the VPC for the load balancer.
*
*
* @param vpcId
* The ID of the VPC for the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withVpcId(String vpcId) {
setVpcId(vpcId);
return this;
}
/**
*
* The state of the load balancer.
*
*
* @param state
* The state of the load balancer.
*/
public void setState(LoadBalancerState state) {
this.state = state;
}
/**
*
* The state of the load balancer.
*
*
* @return The state of the load balancer.
*/
public LoadBalancerState getState() {
return this.state;
}
/**
*
* The state of the load balancer.
*
*
* @param state
* The state of the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withState(LoadBalancerState state) {
setState(state);
return this;
}
/**
*
* The type of load balancer.
*
*
* @param type
* The type of load balancer.
* @see LoadBalancerTypeEnum
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of load balancer.
*
*
* @return The type of load balancer.
* @see LoadBalancerTypeEnum
*/
public String getType() {
return this.type;
}
/**
*
* The type of load balancer.
*
*
* @param type
* The type of load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LoadBalancerTypeEnum
*/
public LoadBalancer withType(String type) {
setType(type);
return this;
}
/**
*
* The type of load balancer.
*
*
* @param type
* The type of load balancer.
* @see LoadBalancerTypeEnum
*/
public void setType(LoadBalancerTypeEnum type) {
withType(type);
}
/**
*
* The type of load balancer.
*
*
* @param type
* The type of load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LoadBalancerTypeEnum
*/
public LoadBalancer withType(LoadBalancerTypeEnum type) {
this.type = type.toString();
return this;
}
/**
*
* The subnets for the load balancer.
*
*
* @return The subnets for the load balancer.
*/
public java.util.List getAvailabilityZones() {
return availabilityZones;
}
/**
*
* The subnets for the load balancer.
*
*
* @param availabilityZones
* The subnets for the load balancer.
*/
public void setAvailabilityZones(java.util.Collection availabilityZones) {
if (availabilityZones == null) {
this.availabilityZones = null;
return;
}
this.availabilityZones = new java.util.ArrayList(availabilityZones);
}
/**
*
* The subnets for the load balancer.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAvailabilityZones(java.util.Collection)} or {@link #withAvailabilityZones(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param availabilityZones
* The subnets for the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withAvailabilityZones(AvailabilityZone... availabilityZones) {
if (this.availabilityZones == null) {
setAvailabilityZones(new java.util.ArrayList(availabilityZones.length));
}
for (AvailabilityZone ele : availabilityZones) {
this.availabilityZones.add(ele);
}
return this;
}
/**
*
* The subnets for the load balancer.
*
*
* @param availabilityZones
* The subnets for the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withAvailabilityZones(java.util.Collection availabilityZones) {
setAvailabilityZones(availabilityZones);
return this;
}
/**
*
* The IDs of the security groups for the load balancer.
*
*
* @return The IDs of the security groups for the load balancer.
*/
public java.util.List getSecurityGroups() {
return securityGroups;
}
/**
*
* The IDs of the security groups for the load balancer.
*
*
* @param securityGroups
* The IDs of the security groups for the load balancer.
*/
public void setSecurityGroups(java.util.Collection securityGroups) {
if (securityGroups == null) {
this.securityGroups = null;
return;
}
this.securityGroups = new java.util.ArrayList(securityGroups);
}
/**
*
* The IDs of the security groups for the load balancer.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSecurityGroups(java.util.Collection)} or {@link #withSecurityGroups(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param securityGroups
* The IDs of the security groups for the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withSecurityGroups(String... securityGroups) {
if (this.securityGroups == null) {
setSecurityGroups(new java.util.ArrayList(securityGroups.length));
}
for (String ele : securityGroups) {
this.securityGroups.add(ele);
}
return this;
}
/**
*
* The IDs of the security groups for the load balancer.
*
*
* @param securityGroups
* The IDs of the security groups for the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withSecurityGroups(java.util.Collection securityGroups) {
setSecurityGroups(securityGroups);
return this;
}
/**
*
* [Application Load Balancers] The type of IP addresses used for public or private connections by the subnets
* attached to your load balancer. The possible values are ipv4
(for only IPv4 addresses),
* dualstack
(for IPv4 and IPv6 addresses), and dualstack-without-public-ipv4
(for IPv6
* only public addresses, with private IPv4 and IPv6 addresses).
*
*
* [Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private
* connections by the subnets attached to your load balancer. The possible values are ipv4
(for only
* IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*
*
* @param ipAddressType
* [Application Load Balancers] The type of IP addresses used for public or private connections by the
* subnets attached to your load balancer. The possible values are ipv4
(for only IPv4
* addresses), dualstack
(for IPv4 and IPv6 addresses), and
* dualstack-without-public-ipv4
(for IPv6 only public addresses, with private IPv4 and IPv6
* addresses).
*
* [Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private
* connections by the subnets attached to your load balancer. The possible values are ipv4
(for
* only IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
* @see IpAddressType
*/
public void setIpAddressType(String ipAddressType) {
this.ipAddressType = ipAddressType;
}
/**
*
* [Application Load Balancers] The type of IP addresses used for public or private connections by the subnets
* attached to your load balancer. The possible values are ipv4
(for only IPv4 addresses),
* dualstack
(for IPv4 and IPv6 addresses), and dualstack-without-public-ipv4
(for IPv6
* only public addresses, with private IPv4 and IPv6 addresses).
*
*
* [Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private
* connections by the subnets attached to your load balancer. The possible values are ipv4
(for only
* IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*
*
* @return [Application Load Balancers] The type of IP addresses used for public or private connections by the
* subnets attached to your load balancer. The possible values are ipv4
(for only IPv4
* addresses), dualstack
(for IPv4 and IPv6 addresses), and
* dualstack-without-public-ipv4
(for IPv6 only public addresses, with private IPv4 and IPv6
* addresses).
*
* [Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private
* connections by the subnets attached to your load balancer. The possible values are ipv4
(for
* only IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
* @see IpAddressType
*/
public String getIpAddressType() {
return this.ipAddressType;
}
/**
*
* [Application Load Balancers] The type of IP addresses used for public or private connections by the subnets
* attached to your load balancer. The possible values are ipv4
(for only IPv4 addresses),
* dualstack
(for IPv4 and IPv6 addresses), and dualstack-without-public-ipv4
(for IPv6
* only public addresses, with private IPv4 and IPv6 addresses).
*
*
* [Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private
* connections by the subnets attached to your load balancer. The possible values are ipv4
(for only
* IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*
*
* @param ipAddressType
* [Application Load Balancers] The type of IP addresses used for public or private connections by the
* subnets attached to your load balancer. The possible values are ipv4
(for only IPv4
* addresses), dualstack
(for IPv4 and IPv6 addresses), and
* dualstack-without-public-ipv4
(for IPv6 only public addresses, with private IPv4 and IPv6
* addresses).
*
* [Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private
* connections by the subnets attached to your load balancer. The possible values are ipv4
(for
* only IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
* @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;
}
/**
*
* [Application Load Balancers] The type of IP addresses used for public or private connections by the subnets
* attached to your load balancer. The possible values are ipv4
(for only IPv4 addresses),
* dualstack
(for IPv4 and IPv6 addresses), and dualstack-without-public-ipv4
(for IPv6
* only public addresses, with private IPv4 and IPv6 addresses).
*
*
* [Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private
* connections by the subnets attached to your load balancer. The possible values are ipv4
(for only
* IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*
*
* @param ipAddressType
* [Application Load Balancers] The type of IP addresses used for public or private connections by the
* subnets attached to your load balancer. The possible values are ipv4
(for only IPv4
* addresses), dualstack
(for IPv4 and IPv6 addresses), and
* dualstack-without-public-ipv4
(for IPv6 only public addresses, with private IPv4 and IPv6
* addresses).
*
* [Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private
* connections by the subnets attached to your load balancer. The possible values are ipv4
(for
* only IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
* @see IpAddressType
*/
public void setIpAddressType(IpAddressType ipAddressType) {
withIpAddressType(ipAddressType);
}
/**
*
* [Application Load Balancers] The type of IP addresses used for public or private connections by the subnets
* attached to your load balancer. The possible values are ipv4
(for only IPv4 addresses),
* dualstack
(for IPv4 and IPv6 addresses), and dualstack-without-public-ipv4
(for IPv6
* only public addresses, with private IPv4 and IPv6 addresses).
*
*
* [Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private
* connections by the subnets attached to your load balancer. The possible values are ipv4
(for only
* IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*
*
* @param ipAddressType
* [Application Load Balancers] The type of IP addresses used for public or private connections by the
* subnets attached to your load balancer. The possible values are ipv4
(for only IPv4
* addresses), dualstack
(for IPv4 and IPv6 addresses), and
* dualstack-without-public-ipv4
(for IPv6 only public addresses, with private IPv4 and IPv6
* addresses).
*
* [Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private
* connections by the subnets attached to your load balancer. The possible values are ipv4
(for
* only IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
* @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;
}
/**
*
* [Application Load Balancers on Outposts] The ID of the customer-owned address pool.
*
*
* @param customerOwnedIpv4Pool
* [Application Load Balancers on Outposts] The ID of the customer-owned address pool.
*/
public void setCustomerOwnedIpv4Pool(String customerOwnedIpv4Pool) {
this.customerOwnedIpv4Pool = customerOwnedIpv4Pool;
}
/**
*
* [Application Load Balancers on Outposts] The ID of the customer-owned address pool.
*
*
* @return [Application Load Balancers on Outposts] The ID of the customer-owned address pool.
*/
public String getCustomerOwnedIpv4Pool() {
return this.customerOwnedIpv4Pool;
}
/**
*
* [Application Load Balancers on Outposts] The ID of the customer-owned address pool.
*
*
* @param customerOwnedIpv4Pool
* [Application Load Balancers on Outposts] The ID of the customer-owned address pool.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withCustomerOwnedIpv4Pool(String customerOwnedIpv4Pool) {
setCustomerOwnedIpv4Pool(customerOwnedIpv4Pool);
return this;
}
/**
*
* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through
* Amazon Web Services PrivateLink.
*
*
* @param enforceSecurityGroupInboundRulesOnPrivateLinkTraffic
* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer
* through Amazon Web Services PrivateLink.
*/
public void setEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(String enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) {
this.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = enforceSecurityGroupInboundRulesOnPrivateLinkTraffic;
}
/**
*
* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through
* Amazon Web Services PrivateLink.
*
*
* @return Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer
* through Amazon Web Services PrivateLink.
*/
public String getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() {
return this.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic;
}
/**
*
* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through
* Amazon Web Services PrivateLink.
*
*
* @param enforceSecurityGroupInboundRulesOnPrivateLinkTraffic
* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer
* through Amazon Web Services PrivateLink.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LoadBalancer withEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(String enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) {
setEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(enforceSecurityGroupInboundRulesOnPrivateLinkTraffic);
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 (getLoadBalancerArn() != null)
sb.append("LoadBalancerArn: ").append(getLoadBalancerArn()).append(",");
if (getDNSName() != null)
sb.append("DNSName: ").append(getDNSName()).append(",");
if (getCanonicalHostedZoneId() != null)
sb.append("CanonicalHostedZoneId: ").append(getCanonicalHostedZoneId()).append(",");
if (getCreatedTime() != null)
sb.append("CreatedTime: ").append(getCreatedTime()).append(",");
if (getLoadBalancerName() != null)
sb.append("LoadBalancerName: ").append(getLoadBalancerName()).append(",");
if (getScheme() != null)
sb.append("Scheme: ").append(getScheme()).append(",");
if (getVpcId() != null)
sb.append("VpcId: ").append(getVpcId()).append(",");
if (getState() != null)
sb.append("State: ").append(getState()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getAvailabilityZones() != null)
sb.append("AvailabilityZones: ").append(getAvailabilityZones()).append(",");
if (getSecurityGroups() != null)
sb.append("SecurityGroups: ").append(getSecurityGroups()).append(",");
if (getIpAddressType() != null)
sb.append("IpAddressType: ").append(getIpAddressType()).append(",");
if (getCustomerOwnedIpv4Pool() != null)
sb.append("CustomerOwnedIpv4Pool: ").append(getCustomerOwnedIpv4Pool()).append(",");
if (getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() != null)
sb.append("EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic: ").append(getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic());
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.getLoadBalancerArn() == null ^ this.getLoadBalancerArn() == null)
return false;
if (other.getLoadBalancerArn() != null && other.getLoadBalancerArn().equals(this.getLoadBalancerArn()) == 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.getCanonicalHostedZoneId() == null ^ this.getCanonicalHostedZoneId() == null)
return false;
if (other.getCanonicalHostedZoneId() != null && other.getCanonicalHostedZoneId().equals(this.getCanonicalHostedZoneId()) == false)
return false;
if (other.getCreatedTime() == null ^ this.getCreatedTime() == null)
return false;
if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false)
return false;
if (other.getLoadBalancerName() == null ^ this.getLoadBalancerName() == null)
return false;
if (other.getLoadBalancerName() != null && other.getLoadBalancerName().equals(this.getLoadBalancerName()) == false)
return false;
if (other.getScheme() == null ^ this.getScheme() == null)
return false;
if (other.getScheme() != null && other.getScheme().equals(this.getScheme()) == 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.getState() == null ^ this.getState() == null)
return false;
if (other.getState() != null && other.getState().equals(this.getState()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getAvailabilityZones() == null ^ this.getAvailabilityZones() == null)
return false;
if (other.getAvailabilityZones() != null && other.getAvailabilityZones().equals(this.getAvailabilityZones()) == false)
return false;
if (other.getSecurityGroups() == null ^ this.getSecurityGroups() == null)
return false;
if (other.getSecurityGroups() != null && other.getSecurityGroups().equals(this.getSecurityGroups()) == 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.getCustomerOwnedIpv4Pool() == null ^ this.getCustomerOwnedIpv4Pool() == null)
return false;
if (other.getCustomerOwnedIpv4Pool() != null && other.getCustomerOwnedIpv4Pool().equals(this.getCustomerOwnedIpv4Pool()) == false)
return false;
if (other.getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() == null ^ this.getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() == null)
return false;
if (other.getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() != null
&& other.getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic().equals(this.getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getLoadBalancerArn() == null) ? 0 : getLoadBalancerArn().hashCode());
hashCode = prime * hashCode + ((getDNSName() == null) ? 0 : getDNSName().hashCode());
hashCode = prime * hashCode + ((getCanonicalHostedZoneId() == null) ? 0 : getCanonicalHostedZoneId().hashCode());
hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
hashCode = prime * hashCode + ((getLoadBalancerName() == null) ? 0 : getLoadBalancerName().hashCode());
hashCode = prime * hashCode + ((getScheme() == null) ? 0 : getScheme().hashCode());
hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode());
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode());
hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode());
hashCode = prime * hashCode + ((getIpAddressType() == null) ? 0 : getIpAddressType().hashCode());
hashCode = prime * hashCode + ((getCustomerOwnedIpv4Pool() == null) ? 0 : getCustomerOwnedIpv4Pool().hashCode());
hashCode = prime
* hashCode
+ ((getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() == null) ? 0 : getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic()
.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);
}
}
}