Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.route53.model;
 

A complex type that contains the health check configuration.

 
 public class HealthCheckConfig implements SerializableCloneable {

    
IP Address of the instance being checked.

Constraints:
Length: 0 - 15
Pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

 
     private String iPAddress;

    
Port on which connection will be opened to the instance to health check. For HTTP and HTTP_STR_MATCH this defaults to 80 if the port is not specified. For HTTPS and HTTPS_STR_MATCH this defaults to 443 if the port is not specified.

Constraints:
Range: 1 - 65535

 
     private Integer port;

    
The type of health check to be performed. Currently supported types are TCP, HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH.

Constraints:
Allowed Values: HTTP, HTTPS, HTTP_STR_MATCH, HTTPS_STR_MATCH, TCP

 
     private String type;

    
Path to ping on the instance to check the health. Required for HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH health checks, HTTP request is issued to the instance on the given port and path.

Constraints:
Length: 0 - 255

 
     private String resourcePath;

    
Fully qualified domain name of the instance to be health checked.

Constraints:
Length: 0 - 255

 
     private String fullyQualifiedDomainName;

    
A string to search for in the body of a health check response. Required for HTTP_STR_MATCH and HTTPS_STR_MATCH health checks.

Constraints:
Length: 0 - 255

 
     private String searchString;

    
The number of seconds between the time that Route 53 gets a response from your endpoint and the time that it sends the next health-check request.

Each Route 53 health checker makes requests at this interval. Valid values are 10 and 30. The default value is 30.

Constraints:
Range: 10 - 30

 
     private Integer requestInterval;

    
The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Constraints:
Range: 1 - 10

    private Integer failureThreshold;

    
IP Address of the instance being checked.

Constraints:
Length: 0 - 15
Pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

Returns:
IP Address of the instance being checked.
    public String getIPAddress() {
        return ;
    }
    
    
IP Address of the instance being checked.

Constraints:
Length: 0 - 15
Pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

Parameters:
iPAddress IP Address of the instance being checked.
    public void setIPAddress(String iPAddress) {
        this. = iPAddress;
    }
    
    
IP Address of the instance being checked.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 15
Pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

Parameters:
iPAddress IP Address of the instance being checked.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HealthCheckConfig withIPAddress(String iPAddress) {
        this. = iPAddress;
        return this;
    }

    
Port on which connection will be opened to the instance to health check. For HTTP and HTTP_STR_MATCH this defaults to 80 if the port is not specified. For HTTPS and HTTPS_STR_MATCH this defaults to 443 if the port is not specified.

Constraints:
Range: 1 - 65535

Returns:
Port on which connection will be opened to the instance to health check. For HTTP and HTTP_STR_MATCH this defaults to 80 if the port is not specified. For HTTPS and HTTPS_STR_MATCH this defaults to 443 if the port is not specified.
    public Integer getPort() {
        return ;
    }
    
    
Port on which connection will be opened to the instance to health check. For HTTP and HTTP_STR_MATCH this defaults to 80 if the port is not specified. For HTTPS and HTTPS_STR_MATCH this defaults to 443 if the port is not specified.

Constraints:
Range: 1 - 65535

Parameters:
port Port on which connection will be opened to the instance to health check. For HTTP and HTTP_STR_MATCH this defaults to 80 if the port is not specified. For HTTPS and HTTPS_STR_MATCH this defaults to 443 if the port is not specified.
    public void setPort(Integer port) {
        this. = port;
    }
    
    
Port on which connection will be opened to the instance to health check. For HTTP and HTTP_STR_MATCH this defaults to 80 if the port is not specified. For HTTPS and HTTPS_STR_MATCH this defaults to 443 if the port is not specified.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 - 65535

Parameters:
port Port on which connection will be opened to the instance to health check. For HTTP and HTTP_STR_MATCH this defaults to 80 if the port is not specified. For HTTPS and HTTPS_STR_MATCH this defaults to 443 if the port is not specified.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HealthCheckConfig withPort(Integer port) {
        this. = port;
        return this;
    }

    
The type of health check to be performed. Currently supported types are TCP, HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH.

Constraints:
Allowed Values: HTTP, HTTPS, HTTP_STR_MATCH, HTTPS_STR_MATCH, TCP

Returns:
The type of health check to be performed. Currently supported types are TCP, HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH.
See also:
HealthCheckType
    public String getType() {
        return ;
    }
    
    
The type of health check to be performed. Currently supported types are TCP, HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH.

Constraints:
Allowed Values: HTTP, HTTPS, HTTP_STR_MATCH, HTTPS_STR_MATCH, TCP

Parameters:
type The type of health check to be performed. Currently supported types are TCP, HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH.
See also:
HealthCheckType
    public void setType(String type) {
        this. = type;
    }
    
    
The type of health check to be performed. Currently supported types are TCP, HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: HTTP, HTTPS, HTTP_STR_MATCH, HTTPS_STR_MATCH, TCP

Parameters:
type The type of health check to be performed. Currently supported types are TCP, HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
HealthCheckType
    public HealthCheckConfig withType(String type) {
        this. = type;
        return this;
    }

    
The type of health check to be performed. Currently supported types are TCP, HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH.

Constraints:
Allowed Values: HTTP, HTTPS, HTTP_STR_MATCH, HTTPS_STR_MATCH, TCP

Parameters:
type The type of health check to be performed. Currently supported types are TCP, HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH.
See also:
HealthCheckType
    public void setType(HealthCheckType type) {
        this. = type.toString();
    }
    
    
The type of health check to be performed. Currently supported types are TCP, HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: HTTP, HTTPS, HTTP_STR_MATCH, HTTPS_STR_MATCH, TCP

Parameters:
type The type of health check to be performed. Currently supported types are TCP, HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
HealthCheckType
    public HealthCheckConfig withType(HealthCheckType type) {
        this. = type.toString();
        return this;
    }

    
Path to ping on the instance to check the health. Required for HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH health checks, HTTP request is issued to the instance on the given port and path.

Constraints:
Length: 0 - 255

Returns:
Path to ping on the instance to check the health. Required for HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH health checks, HTTP request is issued to the instance on the given port and path.
    public String getResourcePath() {
        return ;
    }
    
    
Path to ping on the instance to check the health. Required for HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH health checks, HTTP request is issued to the instance on the given port and path.

Constraints:
Length: 0 - 255

Parameters:
resourcePath Path to ping on the instance to check the health. Required for HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH health checks, HTTP request is issued to the instance on the given port and path.
    public void setResourcePath(String resourcePath) {
        this. = resourcePath;
    }
    
    
Path to ping on the instance to check the health. Required for HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH health checks, HTTP request is issued to the instance on the given port and path.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 255

Parameters:
resourcePath Path to ping on the instance to check the health. Required for HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH health checks, HTTP request is issued to the instance on the given port and path.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HealthCheckConfig withResourcePath(String resourcePath) {
        this. = resourcePath;
        return this;
    }

    
Fully qualified domain name of the instance to be health checked.

Constraints:
Length: 0 - 255

Returns:
Fully qualified domain name of the instance to be health checked.
        return ;
    }
    
    
Fully qualified domain name of the instance to be health checked.

Constraints:
Length: 0 - 255

Parameters:
fullyQualifiedDomainName Fully qualified domain name of the instance to be health checked.
    public void setFullyQualifiedDomainName(String fullyQualifiedDomainName) {
        this. = fullyQualifiedDomainName;
    }
    
    
Fully qualified domain name of the instance to be health checked.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 255

Parameters:
fullyQualifiedDomainName Fully qualified domain name of the instance to be health checked.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HealthCheckConfig withFullyQualifiedDomainName(String fullyQualifiedDomainName) {
        this. = fullyQualifiedDomainName;
        return this;
    }

    
A string to search for in the body of a health check response. Required for HTTP_STR_MATCH and HTTPS_STR_MATCH health checks.

Constraints:
Length: 0 - 255

Returns:
A string to search for in the body of a health check response. Required for HTTP_STR_MATCH and HTTPS_STR_MATCH health checks.
    public String getSearchString() {
        return ;
    }
    
    
A string to search for in the body of a health check response. Required for HTTP_STR_MATCH and HTTPS_STR_MATCH health checks.

Constraints:
Length: 0 - 255

Parameters:
searchString A string to search for in the body of a health check response. Required for HTTP_STR_MATCH and HTTPS_STR_MATCH health checks.
    public void setSearchString(String searchString) {
        this. = searchString;
    }
    
    
A string to search for in the body of a health check response. Required for HTTP_STR_MATCH and HTTPS_STR_MATCH health checks.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 255

Parameters:
searchString A string to search for in the body of a health check response. Required for HTTP_STR_MATCH and HTTPS_STR_MATCH health checks.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HealthCheckConfig withSearchString(String searchString) {
        this. = searchString;
        return this;
    }

    
The number of seconds between the time that Route 53 gets a response from your endpoint and the time that it sends the next health-check request.

Each Route 53 health checker makes requests at this interval. Valid values are 10 and 30. The default value is 30.

Constraints:
Range: 10 - 30

Returns:
The number of seconds between the time that Route 53 gets a response from your endpoint and the time that it sends the next health-check request.

Each Route 53 health checker makes requests at this interval. Valid values are 10 and 30. The default value is 30.

    public Integer getRequestInterval() {
        return ;
    }
    
    
The number of seconds between the time that Route 53 gets a response from your endpoint and the time that it sends the next health-check request.

Each Route 53 health checker makes requests at this interval. Valid values are 10 and 30. The default value is 30.

Constraints:
Range: 10 - 30

Parameters:
requestInterval The number of seconds between the time that Route 53 gets a response from your endpoint and the time that it sends the next health-check request.

Each Route 53 health checker makes requests at this interval. Valid values are 10 and 30. The default value is 30.

    public void setRequestInterval(Integer requestInterval) {
        this. = requestInterval;
    }
    
    
The number of seconds between the time that Route 53 gets a response from your endpoint and the time that it sends the next health-check request.

Each Route 53 health checker makes requests at this interval. Valid values are 10 and 30. The default value is 30.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 10 - 30

Parameters:
requestInterval The number of seconds between the time that Route 53 gets a response from your endpoint and the time that it sends the next health-check request.

Each Route 53 health checker makes requests at this interval. Valid values are 10 and 30. The default value is 30.

Returns:
A reference to this updated object so that method calls can be chained together.
    public HealthCheckConfig withRequestInterval(Integer requestInterval) {
        this. = requestInterval;
        return this;
    }

    
The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Constraints:
Range: 1 - 10

Returns:
The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

    public Integer getFailureThreshold() {
        return ;
    }
    
    
The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Constraints:
Range: 1 - 10

Parameters:
failureThreshold The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

    public void setFailureThreshold(Integer failureThreshold) {
        this. = failureThreshold;
    }
    
    
The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 - 10

Parameters:
failureThreshold The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Returns:
A reference to this updated object so that method calls can be chained together.
    public HealthCheckConfig withFailureThreshold(Integer failureThreshold) {
        this. = failureThreshold;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getIPAddress() != nullsb.append("IPAddress: " + getIPAddress() + ",");
        if (getPort() != nullsb.append("Port: " + getPort() + ",");
        if (getType() != nullsb.append("Type: " + getType() + ",");
        if (getResourcePath() != nullsb.append("ResourcePath: " + getResourcePath() + ",");
        if (getFullyQualifiedDomainName() != nullsb.append("FullyQualifiedDomainName: " + getFullyQualifiedDomainName() + ",");
        if (getSearchString() != nullsb.append("SearchString: " + getSearchString() + ",");
        if (getRequestInterval() != nullsb.append("RequestInterval: " + getRequestInterval() + ",");
        if (getFailureThreshold() != nullsb.append("FailureThreshold: " + getFailureThreshold() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getIPAddress() == null) ? 0 : getIPAddress().hashCode()); 
        hashCode = prime * hashCode + ((getPort() == null) ? 0 : getPort().hashCode()); 
        hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); 
        hashCode = prime * hashCode + ((getResourcePath() == null) ? 0 : getResourcePath().hashCode()); 
        hashCode = prime * hashCode + ((getFullyQualifiedDomainName() == null) ? 0 : getFullyQualifiedDomainName().hashCode()); 
        hashCode = prime * hashCode + ((getSearchString() == null) ? 0 : getSearchString().hashCode()); 
        hashCode = prime * hashCode + ((getRequestInterval() == null) ? 0 : getRequestInterval().hashCode()); 
        hashCode = prime * hashCode + ((getFailureThreshold() == null) ? 0 : getFailureThreshold().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof HealthCheckConfig == falsereturn false;
        HealthCheckConfig other = (HealthCheckConfig)obj;
        
        if (other.getIPAddress() == null ^ this.getIPAddress() == nullreturn false;
        if (other.getIPAddress() != null && other.getIPAddress().equals(this.getIPAddress()) == falsereturn false
        if (other.getPort() == null ^ this.getPort() == nullreturn false;
        if (other.getPort() != null && other.getPort().equals(this.getPort()) == falsereturn false
        if (other.getType() == null ^ this.getType() == nullreturn false;
        if (other.getType() != null && other.getType().equals(this.getType()) == falsereturn false
        if (other.getResourcePath() == null ^ this.getResourcePath() == nullreturn false;
        if (other.getResourcePath() != null && other.getResourcePath().equals(this.getResourcePath()) == falsereturn false
        if (other.getFullyQualifiedDomainName() == null ^ this.getFullyQualifiedDomainName() == nullreturn false;
        if (other.getFullyQualifiedDomainName() != null && other.getFullyQualifiedDomainName().equals(this.getFullyQualifiedDomainName()) == falsereturn false
        if (other.getSearchString() == null ^ this.getSearchString() == nullreturn false;
        if (other.getSearchString() != null && other.getSearchString().equals(this.getSearchString()) == falsereturn false
        if (other.getRequestInterval() == null ^ this.getRequestInterval() == nullreturn false;
        if (other.getRequestInterval() != null && other.getRequestInterval().equals(this.getRequestInterval()) == falsereturn false
        if (other.getFailureThreshold() == null ^ this.getFailureThreshold() == nullreturn false;
        if (other.getFailureThreshold() != null && other.getFailureThreshold().equals(this.getFailureThreshold()) == falsereturn false
        return true;
    }
    
    @Override
    public HealthCheckConfig clone() {
        try {
            return (HealthCheckConfigsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X