com.amazonaws.services.securityhub.model.AwsElbv2LoadBalancerDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub Show documentation
/*
* 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.securityhub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about a load balancer.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AwsElbv2LoadBalancerDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Availability Zones for the load balancer.
*
*/
private java.util.List availabilityZones;
/**
*
* The ID of the Amazon Route 53 hosted zone associated with the load balancer.
*
*/
private String canonicalHostedZoneId;
/**
*
* Indicates when the load balancer was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
*/
private String createdTime;
/**
*
* The public DNS name of the load balancer.
*
*/
private String dNSName;
/**
*
* The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4
* (for IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*
*/
private String ipAddressType;
/**
*
* The nodes of an Internet-facing load balancer have public IP addresses.
*
*/
private String scheme;
/**
*
* The IDs of the security groups for the load balancer.
*
*/
private java.util.List securityGroups;
/**
*
* The state of the load balancer.
*
*/
private LoadBalancerState state;
/**
*
* The type of load balancer.
*
*/
private String type;
/**
*
* The ID of the VPC for the load balancer.
*
*/
private String vpcId;
/**
*
* Attributes of the load balancer.
*
*/
private java.util.List loadBalancerAttributes;
/**
*
* The Availability Zones for the load balancer.
*
*
* @return The Availability Zones for the load balancer.
*/
public java.util.List getAvailabilityZones() {
return availabilityZones;
}
/**
*
* The Availability Zones for the load balancer.
*
*
* @param availabilityZones
* The Availability Zones 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 Availability Zones 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 Availability Zones for the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsElbv2LoadBalancerDetails 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 Availability Zones for the load balancer.
*
*
* @param availabilityZones
* The Availability Zones for the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsElbv2LoadBalancerDetails withAvailabilityZones(java.util.Collection availabilityZones) {
setAvailabilityZones(availabilityZones);
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 AwsElbv2LoadBalancerDetails withCanonicalHostedZoneId(String canonicalHostedZoneId) {
setCanonicalHostedZoneId(canonicalHostedZoneId);
return this;
}
/**
*
* Indicates when the load balancer was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
*
* @param createdTime
* Indicates when the load balancer was created.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
*
* Indicates when the load balancer was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
*
* @return Indicates when the load balancer was created.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
*
* Indicates when the load balancer was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
*
* @param createdTime
* Indicates when the load balancer was created.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsElbv2LoadBalancerDetails withCreatedTime(String createdTime) {
setCreatedTime(createdTime);
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 AwsElbv2LoadBalancerDetails withDNSName(String dNSName) {
setDNSName(dNSName);
return this;
}
/**
*
* The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4
* (for IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*
*
* @param ipAddressType
* The type of IP addresses used by the subnets for your load balancer. The possible values are
* ipv4
(for IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*/
public void setIpAddressType(String ipAddressType) {
this.ipAddressType = ipAddressType;
}
/**
*
* The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4
* (for IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*
*
* @return The type of IP addresses used by the subnets for your load balancer. The possible values are
* ipv4
(for IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*/
public String getIpAddressType() {
return this.ipAddressType;
}
/**
*
* The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4
* (for IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
*
*
* @param ipAddressType
* The type of IP addresses used by the subnets for your load balancer. The possible values are
* ipv4
(for IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsElbv2LoadBalancerDetails withIpAddressType(String ipAddressType) {
setIpAddressType(ipAddressType);
return this;
}
/**
*
* The nodes of an Internet-facing load balancer have public IP addresses.
*
*
* @param scheme
* The nodes of an Internet-facing load balancer have public IP addresses.
*/
public void setScheme(String scheme) {
this.scheme = scheme;
}
/**
*
* The nodes of an Internet-facing load balancer have public IP addresses.
*
*
* @return The nodes of an Internet-facing load balancer have public IP addresses.
*/
public String getScheme() {
return this.scheme;
}
/**
*
* The nodes of an Internet-facing load balancer have public IP addresses.
*
*
* @param scheme
* The nodes of an Internet-facing load balancer have public IP addresses.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsElbv2LoadBalancerDetails withScheme(String scheme) {
setScheme(scheme);
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 AwsElbv2LoadBalancerDetails 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 AwsElbv2LoadBalancerDetails withSecurityGroups(java.util.Collection securityGroups) {
setSecurityGroups(securityGroups);
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 AwsElbv2LoadBalancerDetails withState(LoadBalancerState state) {
setState(state);
return this;
}
/**
*
* The type of load balancer.
*
*
* @param type
* The type of load balancer.
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of load balancer.
*
*
* @return The type of load balancer.
*/
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.
*/
public AwsElbv2LoadBalancerDetails withType(String type) {
setType(type);
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 AwsElbv2LoadBalancerDetails withVpcId(String vpcId) {
setVpcId(vpcId);
return this;
}
/**
*
* Attributes of the load balancer.
*
*
* @return Attributes of the load balancer.
*/
public java.util.List getLoadBalancerAttributes() {
return loadBalancerAttributes;
}
/**
*
* Attributes of the load balancer.
*
*
* @param loadBalancerAttributes
* Attributes of the load balancer.
*/
public void setLoadBalancerAttributes(java.util.Collection loadBalancerAttributes) {
if (loadBalancerAttributes == null) {
this.loadBalancerAttributes = null;
return;
}
this.loadBalancerAttributes = new java.util.ArrayList(loadBalancerAttributes);
}
/**
*
* Attributes of the load balancer.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLoadBalancerAttributes(java.util.Collection)} or
* {@link #withLoadBalancerAttributes(java.util.Collection)} if you want to override the existing values.
*
*
* @param loadBalancerAttributes
* Attributes of the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsElbv2LoadBalancerDetails withLoadBalancerAttributes(AwsElbv2LoadBalancerAttribute... loadBalancerAttributes) {
if (this.loadBalancerAttributes == null) {
setLoadBalancerAttributes(new java.util.ArrayList(loadBalancerAttributes.length));
}
for (AwsElbv2LoadBalancerAttribute ele : loadBalancerAttributes) {
this.loadBalancerAttributes.add(ele);
}
return this;
}
/**
*
* Attributes of the load balancer.
*
*
* @param loadBalancerAttributes
* Attributes of the load balancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsElbv2LoadBalancerDetails withLoadBalancerAttributes(java.util.Collection loadBalancerAttributes) {
setLoadBalancerAttributes(loadBalancerAttributes);
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 (getAvailabilityZones() != null)
sb.append("AvailabilityZones: ").append(getAvailabilityZones()).append(",");
if (getCanonicalHostedZoneId() != null)
sb.append("CanonicalHostedZoneId: ").append(getCanonicalHostedZoneId()).append(",");
if (getCreatedTime() != null)
sb.append("CreatedTime: ").append(getCreatedTime()).append(",");
if (getDNSName() != null)
sb.append("DNSName: ").append(getDNSName()).append(",");
if (getIpAddressType() != null)
sb.append("IpAddressType: ").append(getIpAddressType()).append(",");
if (getScheme() != null)
sb.append("Scheme: ").append(getScheme()).append(",");
if (getSecurityGroups() != null)
sb.append("SecurityGroups: ").append(getSecurityGroups()).append(",");
if (getState() != null)
sb.append("State: ").append(getState()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getVpcId() != null)
sb.append("VpcId: ").append(getVpcId()).append(",");
if (getLoadBalancerAttributes() != null)
sb.append("LoadBalancerAttributes: ").append(getLoadBalancerAttributes());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AwsElbv2LoadBalancerDetails == false)
return false;
AwsElbv2LoadBalancerDetails other = (AwsElbv2LoadBalancerDetails) obj;
if (other.getAvailabilityZones() == null ^ this.getAvailabilityZones() == null)
return false;
if (other.getAvailabilityZones() != null && other.getAvailabilityZones().equals(this.getAvailabilityZones()) == 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.getDNSName() == null ^ this.getDNSName() == null)
return false;
if (other.getDNSName() != null && other.getDNSName().equals(this.getDNSName()) == 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.getScheme() == null ^ this.getScheme() == null)
return false;
if (other.getScheme() != null && other.getScheme().equals(this.getScheme()) == 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.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.getVpcId() == null ^ this.getVpcId() == null)
return false;
if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == false)
return false;
if (other.getLoadBalancerAttributes() == null ^ this.getLoadBalancerAttributes() == null)
return false;
if (other.getLoadBalancerAttributes() != null && other.getLoadBalancerAttributes().equals(this.getLoadBalancerAttributes()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode());
hashCode = prime * hashCode + ((getCanonicalHostedZoneId() == null) ? 0 : getCanonicalHostedZoneId().hashCode());
hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
hashCode = prime * hashCode + ((getDNSName() == null) ? 0 : getDNSName().hashCode());
hashCode = prime * hashCode + ((getIpAddressType() == null) ? 0 : getIpAddressType().hashCode());
hashCode = prime * hashCode + ((getScheme() == null) ? 0 : getScheme().hashCode());
hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode());
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode());
hashCode = prime * hashCode + ((getLoadBalancerAttributes() == null) ? 0 : getLoadBalancerAttributes().hashCode());
return hashCode;
}
@Override
public AwsElbv2LoadBalancerDetails clone() {
try {
return (AwsElbv2LoadBalancerDetails) 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.securityhub.model.transform.AwsElbv2LoadBalancerDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}