All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.globalaccelerator.model.EndpointDescription Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Global Accelerator module holds the client classes that are used for communicating with AWS Global Accelerator Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2017-2022 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.globalaccelerator.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A complex type for an endpoint. Each endpoint group can include one or more endpoints, such as load balancers. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EndpointDescription implements Serializable, Cloneable, StructuredPojo { /** *

* An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the * Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP * address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. *

*

* An Application Load Balancer can be either internal or internet-facing. *

*/ private String endpointId; /** *

* The weight associated with the endpoint. When you add weights to endpoints, you configure Global Accelerator to * route traffic based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, * and 6 (sum=20). The result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is * routed both to the second and third endpoints, and 6/20 is routed to the last endpoint. For more information, see * Endpoint * weights in the Global Accelerator Developer Guide. *

*/ private Integer weight; /** *

* The health status of the endpoint. *

*/ private String healthState; /** *

* Returns a null result. *

*/ private String healthReason; /** *

* Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false. The * default value is true for new accelerators. *

*

* If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request * header as traffic travels to applications on the endpoint fronted by the accelerator. *

*

* Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are * Application Load Balancers and Amazon EC2 instances. *

*

* For more information, see Preserve client * IP addresses in Global Accelerator in the Global Accelerator Developer Guide. *

*/ private Boolean clientIPPreservationEnabled; /** *

* An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the * Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP * address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. *

*

* An Application Load Balancer can be either internal or internet-facing. *

* * @param endpointId * An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is * the Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the * Elastic IP address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID.

*

* An Application Load Balancer can be either internal or internet-facing. */ public void setEndpointId(String endpointId) { this.endpointId = endpointId; } /** *

* An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the * Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP * address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. *

*

* An Application Load Balancer can be either internal or internet-facing. *

* * @return An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is * the Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the * Elastic IP address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID.

*

* An Application Load Balancer can be either internal or internet-facing. */ public String getEndpointId() { return this.endpointId; } /** *

* An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the * Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP * address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. *

*

* An Application Load Balancer can be either internal or internet-facing. *

* * @param endpointId * An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is * the Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the * Elastic IP address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID.

*

* An Application Load Balancer can be either internal or internet-facing. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDescription withEndpointId(String endpointId) { setEndpointId(endpointId); return this; } /** *

* The weight associated with the endpoint. When you add weights to endpoints, you configure Global Accelerator to * route traffic based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, * and 6 (sum=20). The result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is * routed both to the second and third endpoints, and 6/20 is routed to the last endpoint. For more information, see * Endpoint * weights in the Global Accelerator Developer Guide. *

* * @param weight * The weight associated with the endpoint. When you add weights to endpoints, you configure Global * Accelerator to route traffic based on proportions that you specify. For example, you might specify * endpoint weights of 4, 5, 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is * routed to the first endpoint, 5/20 is routed both to the second and third endpoints, and 6/20 is routed to * the last endpoint. For more information, see Endpoint weights in the Global Accelerator Developer Guide. */ public void setWeight(Integer weight) { this.weight = weight; } /** *

* The weight associated with the endpoint. When you add weights to endpoints, you configure Global Accelerator to * route traffic based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, * and 6 (sum=20). The result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is * routed both to the second and third endpoints, and 6/20 is routed to the last endpoint. For more information, see * Endpoint * weights in the Global Accelerator Developer Guide. *

* * @return The weight associated with the endpoint. When you add weights to endpoints, you configure Global * Accelerator to route traffic based on proportions that you specify. For example, you might specify * endpoint weights of 4, 5, 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is * routed to the first endpoint, 5/20 is routed both to the second and third endpoints, and 6/20 is routed * to the last endpoint. For more information, see Endpoint weights in the Global Accelerator Developer Guide. */ public Integer getWeight() { return this.weight; } /** *

* The weight associated with the endpoint. When you add weights to endpoints, you configure Global Accelerator to * route traffic based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, * and 6 (sum=20). The result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is * routed both to the second and third endpoints, and 6/20 is routed to the last endpoint. For more information, see * Endpoint * weights in the Global Accelerator Developer Guide. *

* * @param weight * The weight associated with the endpoint. When you add weights to endpoints, you configure Global * Accelerator to route traffic based on proportions that you specify. For example, you might specify * endpoint weights of 4, 5, 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is * routed to the first endpoint, 5/20 is routed both to the second and third endpoints, and 6/20 is routed to * the last endpoint. For more information, see Endpoint weights in the Global Accelerator Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDescription withWeight(Integer weight) { setWeight(weight); return this; } /** *

* The health status of the endpoint. *

* * @param healthState * The health status of the endpoint. * @see HealthState */ public void setHealthState(String healthState) { this.healthState = healthState; } /** *

* The health status of the endpoint. *

* * @return The health status of the endpoint. * @see HealthState */ public String getHealthState() { return this.healthState; } /** *

* The health status of the endpoint. *

* * @param healthState * The health status of the endpoint. * @return Returns a reference to this object so that method calls can be chained together. * @see HealthState */ public EndpointDescription withHealthState(String healthState) { setHealthState(healthState); return this; } /** *

* The health status of the endpoint. *

* * @param healthState * The health status of the endpoint. * @return Returns a reference to this object so that method calls can be chained together. * @see HealthState */ public EndpointDescription withHealthState(HealthState healthState) { this.healthState = healthState.toString(); return this; } /** *

* Returns a null result. *

* * @param healthReason * Returns a null result. */ public void setHealthReason(String healthReason) { this.healthReason = healthReason; } /** *

* Returns a null result. *

* * @return Returns a null result. */ public String getHealthReason() { return this.healthReason; } /** *

* Returns a null result. *

* * @param healthReason * Returns a null result. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDescription withHealthReason(String healthReason) { setHealthReason(healthReason); return this; } /** *

* Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false. The * default value is true for new accelerators. *

*

* If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request * header as traffic travels to applications on the endpoint fronted by the accelerator. *

*

* Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are * Application Load Balancers and Amazon EC2 instances. *

*

* For more information, see Preserve client * IP addresses in Global Accelerator in the Global Accelerator Developer Guide. *

* * @param clientIPPreservationEnabled * Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false. * The default value is true for new accelerators.

*

* If the value is set to true, the client's IP address is preserved in the X-Forwarded-For * request header as traffic travels to applications on the endpoint fronted by the accelerator. *

*

* Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that * are Application Load Balancers and Amazon EC2 instances. *

*

* For more information, see Preserve * client IP addresses in Global Accelerator in the Global Accelerator Developer Guide. */ public void setClientIPPreservationEnabled(Boolean clientIPPreservationEnabled) { this.clientIPPreservationEnabled = clientIPPreservationEnabled; } /** *

* Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false. The * default value is true for new accelerators. *

*

* If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request * header as traffic travels to applications on the endpoint fronted by the accelerator. *

*

* Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are * Application Load Balancers and Amazon EC2 instances. *

*

* For more information, see Preserve client * IP addresses in Global Accelerator in the Global Accelerator Developer Guide. *

* * @return Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false. * The default value is true for new accelerators.

*

* If the value is set to true, the client's IP address is preserved in the X-Forwarded-For * request header as traffic travels to applications on the endpoint fronted by the accelerator. *

*

* Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that * are Application Load Balancers and Amazon EC2 instances. *

*

* For more information, see Preserve * client IP addresses in Global Accelerator in the Global Accelerator Developer Guide. */ public Boolean getClientIPPreservationEnabled() { return this.clientIPPreservationEnabled; } /** *

* Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false. The * default value is true for new accelerators. *

*

* If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request * header as traffic travels to applications on the endpoint fronted by the accelerator. *

*

* Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are * Application Load Balancers and Amazon EC2 instances. *

*

* For more information, see Preserve client * IP addresses in Global Accelerator in the Global Accelerator Developer Guide. *

* * @param clientIPPreservationEnabled * Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false. * The default value is true for new accelerators.

*

* If the value is set to true, the client's IP address is preserved in the X-Forwarded-For * request header as traffic travels to applications on the endpoint fronted by the accelerator. *

*

* Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that * are Application Load Balancers and Amazon EC2 instances. *

*

* For more information, see Preserve * client IP addresses in Global Accelerator in the Global Accelerator Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDescription withClientIPPreservationEnabled(Boolean clientIPPreservationEnabled) { setClientIPPreservationEnabled(clientIPPreservationEnabled); return this; } /** *

* Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false. The * default value is true for new accelerators. *

*

* If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request * header as traffic travels to applications on the endpoint fronted by the accelerator. *

*

* Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are * Application Load Balancers and Amazon EC2 instances. *

*

* For more information, see Preserve client * IP addresses in Global Accelerator in the Global Accelerator Developer Guide. *

* * @return Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false. * The default value is true for new accelerators.

*

* If the value is set to true, the client's IP address is preserved in the X-Forwarded-For * request header as traffic travels to applications on the endpoint fronted by the accelerator. *

*

* Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that * are Application Load Balancers and Amazon EC2 instances. *

*

* For more information, see Preserve * client IP addresses in Global Accelerator in the Global Accelerator Developer Guide. */ public Boolean isClientIPPreservationEnabled() { return this.clientIPPreservationEnabled; } /** * 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 (getEndpointId() != null) sb.append("EndpointId: ").append(getEndpointId()).append(","); if (getWeight() != null) sb.append("Weight: ").append(getWeight()).append(","); if (getHealthState() != null) sb.append("HealthState: ").append(getHealthState()).append(","); if (getHealthReason() != null) sb.append("HealthReason: ").append(getHealthReason()).append(","); if (getClientIPPreservationEnabled() != null) sb.append("ClientIPPreservationEnabled: ").append(getClientIPPreservationEnabled()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EndpointDescription == false) return false; EndpointDescription other = (EndpointDescription) obj; if (other.getEndpointId() == null ^ this.getEndpointId() == null) return false; if (other.getEndpointId() != null && other.getEndpointId().equals(this.getEndpointId()) == false) return false; if (other.getWeight() == null ^ this.getWeight() == null) return false; if (other.getWeight() != null && other.getWeight().equals(this.getWeight()) == false) return false; if (other.getHealthState() == null ^ this.getHealthState() == null) return false; if (other.getHealthState() != null && other.getHealthState().equals(this.getHealthState()) == false) return false; if (other.getHealthReason() == null ^ this.getHealthReason() == null) return false; if (other.getHealthReason() != null && other.getHealthReason().equals(this.getHealthReason()) == false) return false; if (other.getClientIPPreservationEnabled() == null ^ this.getClientIPPreservationEnabled() == null) return false; if (other.getClientIPPreservationEnabled() != null && other.getClientIPPreservationEnabled().equals(this.getClientIPPreservationEnabled()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEndpointId() == null) ? 0 : getEndpointId().hashCode()); hashCode = prime * hashCode + ((getWeight() == null) ? 0 : getWeight().hashCode()); hashCode = prime * hashCode + ((getHealthState() == null) ? 0 : getHealthState().hashCode()); hashCode = prime * hashCode + ((getHealthReason() == null) ? 0 : getHealthReason().hashCode()); hashCode = prime * hashCode + ((getClientIPPreservationEnabled() == null) ? 0 : getClientIPPreservationEnabled().hashCode()); return hashCode; } @Override public EndpointDescription clone() { try { return (EndpointDescription) 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.globalaccelerator.model.transform.EndpointDescriptionMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy