/* * 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.autoscaling.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes the state of a traffic source. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TrafficSourceState implements Serializable, Cloneable { /** *
* This is replaced by Identifier
.
*
* Describes the current state of a traffic source. *
** The state values are as follows: *
*
* Adding
- The Auto Scaling instances are being registered with the load balancer or target group.
*
* Added
- All Auto Scaling instances are registered with the load balancer or target group.
*
* InService
- For an Elastic Load Balancing load balancer or target group, at least one Auto Scaling
* instance passed an ELB
health check. For VPC Lattice, at least one Auto Scaling instance passed an
* VPC_LATTICE
health check.
*
* Removing
- The Auto Scaling instances are being deregistered from the load balancer or target group.
* If connection draining (deregistration delay) is enabled, Elastic Load Balancing or VPC Lattice waits for
* in-flight requests to complete before deregistering the instances.
*
* Removed
- All Auto Scaling instances are deregistered from the load balancer or target group.
*
* The unique identifier of the traffic source. *
*/ private String identifier; /** *
* Provides additional context for the value of Identifier
.
*
* The following lists the valid values: *
*
* elb
if Identifier
is the name of a Classic Load Balancer.
*
* elbv2
if Identifier
is the ARN of an Application Load Balancer, Gateway Load Balancer,
* or Network Load Balancer target group.
*
* vpc-lattice
if Identifier
is the ARN of a VPC Lattice target group.
*
* Required if the identifier is the name of a Classic Load Balancer. *
*/ private String type; /** *
* This is replaced by Identifier
.
*
Identifier
.
*/
@Deprecated
public void setTrafficSource(String trafficSource) {
this.trafficSource = trafficSource;
}
/**
*
* This is replaced by Identifier
.
*
Identifier
.
*/
@Deprecated
public String getTrafficSource() {
return this.trafficSource;
}
/**
*
* This is replaced by Identifier
.
*
Identifier
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
@Deprecated
public TrafficSourceState withTrafficSource(String trafficSource) {
setTrafficSource(trafficSource);
return this;
}
/**
* * Describes the current state of a traffic source. *
** The state values are as follows: *
*
* Adding
- The Auto Scaling instances are being registered with the load balancer or target group.
*
* Added
- All Auto Scaling instances are registered with the load balancer or target group.
*
* InService
- For an Elastic Load Balancing load balancer or target group, at least one Auto Scaling
* instance passed an ELB
health check. For VPC Lattice, at least one Auto Scaling instance passed an
* VPC_LATTICE
health check.
*
* Removing
- The Auto Scaling instances are being deregistered from the load balancer or target group.
* If connection draining (deregistration delay) is enabled, Elastic Load Balancing or VPC Lattice waits for
* in-flight requests to complete before deregistering the instances.
*
* Removed
- All Auto Scaling instances are deregistered from the load balancer or target group.
*
* The state values are as follows: *
*
* Adding
- The Auto Scaling instances are being registered with the load balancer or target
* group.
*
* Added
- All Auto Scaling instances are registered with the load balancer or target group.
*
* InService
- For an Elastic Load Balancing load balancer or target group, at least one Auto
* Scaling instance passed an ELB
health check. For VPC Lattice, at least one Auto Scaling
* instance passed an VPC_LATTICE
health check.
*
* Removing
- The Auto Scaling instances are being deregistered from the load balancer or target
* group. If connection draining (deregistration delay) is enabled, Elastic Load Balancing or VPC Lattice
* waits for in-flight requests to complete before deregistering the instances.
*
* Removed
- All Auto Scaling instances are deregistered from the load balancer or target group.
*
* Describes the current state of a traffic source. *
** The state values are as follows: *
*
* Adding
- The Auto Scaling instances are being registered with the load balancer or target group.
*
* Added
- All Auto Scaling instances are registered with the load balancer or target group.
*
* InService
- For an Elastic Load Balancing load balancer or target group, at least one Auto Scaling
* instance passed an ELB
health check. For VPC Lattice, at least one Auto Scaling instance passed an
* VPC_LATTICE
health check.
*
* Removing
- The Auto Scaling instances are being deregistered from the load balancer or target group.
* If connection draining (deregistration delay) is enabled, Elastic Load Balancing or VPC Lattice waits for
* in-flight requests to complete before deregistering the instances.
*
* Removed
- All Auto Scaling instances are deregistered from the load balancer or target group.
*
* The state values are as follows: *
*
* Adding
- The Auto Scaling instances are being registered with the load balancer or target
* group.
*
* Added
- All Auto Scaling instances are registered with the load balancer or target group.
*
* InService
- For an Elastic Load Balancing load balancer or target group, at least one Auto
* Scaling instance passed an ELB
health check. For VPC Lattice, at least one Auto Scaling
* instance passed an VPC_LATTICE
health check.
*
* Removing
- The Auto Scaling instances are being deregistered from the load balancer or
* target group. If connection draining (deregistration delay) is enabled, Elastic Load Balancing or VPC
* Lattice waits for in-flight requests to complete before deregistering the instances.
*
* Removed
- All Auto Scaling instances are deregistered from the load balancer or target
* group.
*
* Describes the current state of a traffic source. *
** The state values are as follows: *
*
* Adding
- The Auto Scaling instances are being registered with the load balancer or target group.
*
* Added
- All Auto Scaling instances are registered with the load balancer or target group.
*
* InService
- For an Elastic Load Balancing load balancer or target group, at least one Auto Scaling
* instance passed an ELB
health check. For VPC Lattice, at least one Auto Scaling instance passed an
* VPC_LATTICE
health check.
*
* Removing
- The Auto Scaling instances are being deregistered from the load balancer or target group.
* If connection draining (deregistration delay) is enabled, Elastic Load Balancing or VPC Lattice waits for
* in-flight requests to complete before deregistering the instances.
*
* Removed
- All Auto Scaling instances are deregistered from the load balancer or target group.
*
* The state values are as follows: *
*
* Adding
- The Auto Scaling instances are being registered with the load balancer or target
* group.
*
* Added
- All Auto Scaling instances are registered with the load balancer or target group.
*
* InService
- For an Elastic Load Balancing load balancer or target group, at least one Auto
* Scaling instance passed an ELB
health check. For VPC Lattice, at least one Auto Scaling
* instance passed an VPC_LATTICE
health check.
*
* Removing
- The Auto Scaling instances are being deregistered from the load balancer or target
* group. If connection draining (deregistration delay) is enabled, Elastic Load Balancing or VPC Lattice
* waits for in-flight requests to complete before deregistering the instances.
*
* Removed
- All Auto Scaling instances are deregistered from the load balancer or target group.
*
* The unique identifier of the traffic source. *
* * @param identifier * The unique identifier of the traffic source. */ public void setIdentifier(String identifier) { this.identifier = identifier; } /** ** The unique identifier of the traffic source. *
* * @return The unique identifier of the traffic source. */ public String getIdentifier() { return this.identifier; } /** ** The unique identifier of the traffic source. *
* * @param identifier * The unique identifier of the traffic source. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficSourceState withIdentifier(String identifier) { setIdentifier(identifier); return this; } /** *
* Provides additional context for the value of Identifier
.
*
* The following lists the valid values: *
*
* elb
if Identifier
is the name of a Classic Load Balancer.
*
* elbv2
if Identifier
is the ARN of an Application Load Balancer, Gateway Load Balancer,
* or Network Load Balancer target group.
*
* vpc-lattice
if Identifier
is the ARN of a VPC Lattice target group.
*
* Required if the identifier is the name of a Classic Load Balancer. *
* * @param type * Provides additional context for the value ofIdentifier
.
* * The following lists the valid values: *
*
* elb
if Identifier
is the name of a Classic Load Balancer.
*
* elbv2
if Identifier
is the ARN of an Application Load Balancer, Gateway Load
* Balancer, or Network Load Balancer target group.
*
* vpc-lattice
if Identifier
is the ARN of a VPC Lattice target group.
*
* Required if the identifier is the name of a Classic Load Balancer. */ public void setType(String type) { this.type = type; } /** *
* Provides additional context for the value of Identifier
.
*
* The following lists the valid values: *
*
* elb
if Identifier
is the name of a Classic Load Balancer.
*
* elbv2
if Identifier
is the ARN of an Application Load Balancer, Gateway Load Balancer,
* or Network Load Balancer target group.
*
* vpc-lattice
if Identifier
is the ARN of a VPC Lattice target group.
*
* Required if the identifier is the name of a Classic Load Balancer. *
* * @return Provides additional context for the value ofIdentifier
.
* * The following lists the valid values: *
*
* elb
if Identifier
is the name of a Classic Load Balancer.
*
* elbv2
if Identifier
is the ARN of an Application Load Balancer, Gateway Load
* Balancer, or Network Load Balancer target group.
*
* vpc-lattice
if Identifier
is the ARN of a VPC Lattice target group.
*
* Required if the identifier is the name of a Classic Load Balancer. */ public String getType() { return this.type; } /** *
* Provides additional context for the value of Identifier
.
*
* The following lists the valid values: *
*
* elb
if Identifier
is the name of a Classic Load Balancer.
*
* elbv2
if Identifier
is the ARN of an Application Load Balancer, Gateway Load Balancer,
* or Network Load Balancer target group.
*
* vpc-lattice
if Identifier
is the ARN of a VPC Lattice target group.
*
* Required if the identifier is the name of a Classic Load Balancer. *
* * @param type * Provides additional context for the value ofIdentifier
.
* * The following lists the valid values: *
*
* elb
if Identifier
is the name of a Classic Load Balancer.
*
* elbv2
if Identifier
is the ARN of an Application Load Balancer, Gateway Load
* Balancer, or Network Load Balancer target group.
*
* vpc-lattice
if Identifier
is the ARN of a VPC Lattice target group.
*
* Required if the identifier is the name of a Classic Load Balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficSourceState withType(String type) { setType(type); 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 (getTrafficSource() != null) sb.append("TrafficSource: ").append(getTrafficSource()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getIdentifier() != null) sb.append("Identifier: ").append(getIdentifier()).append(","); if (getType() != null) sb.append("Type: ").append(getType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TrafficSourceState == false) return false; TrafficSourceState other = (TrafficSourceState) obj; if (other.getTrafficSource() == null ^ this.getTrafficSource() == null) return false; if (other.getTrafficSource() != null && other.getTrafficSource().equals(this.getTrafficSource()) == 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.getIdentifier() == null ^ this.getIdentifier() == null) return false; if (other.getIdentifier() != null && other.getIdentifier().equals(this.getIdentifier()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTrafficSource() == null) ? 0 : getTrafficSource().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getIdentifier() == null) ? 0 : getIdentifier().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); return hashCode; } @Override public TrafficSourceState clone() { try { return (TrafficSourceState) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }