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 identifying information about the health check.

 
 public class HealthCheck implements SerializableCloneable {

    
The ID of the specified health check.

Constraints:
Length: 0 - 64

 
     private String id;

    
A unique string that identifies the request to create the health check.

Constraints:
Length: 1 - 64

 
     private String callerReference;

    
A complex type that contains the health check configuration.
 
     private HealthCheckConfig healthCheckConfig;

    
The version of the health check. You can optionally pass this value in a call to UpdateHealthCheck to prevent overwriting another change to the health check.

Constraints:
Range: 1 -

 
     private Long healthCheckVersion;

    
The ID of the specified health check.

Constraints:
Length: 0 - 64

Returns:
The ID of the specified health check.
 
     public String getId() {
         return ;
     }
    
    
The ID of the specified health check.

Constraints:
Length: 0 - 64

Parameters:
id The ID of the specified health check.
 
     public void setId(String id) {
         this. = id;
     }
    
    
The ID of the specified health check.

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

Constraints:
Length: 0 - 64

Parameters:
id The ID of the specified health check.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public HealthCheck withId(String id) {
         this. = id;
         return this;
     }

    
A unique string that identifies the request to create the health check.

Constraints:
Length: 1 - 64

Returns:
A unique string that identifies the request to create the health check.
    public String getCallerReference() {
        return ;
    }
    
    
A unique string that identifies the request to create the health check.

Constraints:
Length: 1 - 64

Parameters:
callerReference A unique string that identifies the request to create the health check.
    public void setCallerReference(String callerReference) {
        this. = callerReference;
    }
    
    
A unique string that identifies the request to create the health check.

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

Constraints:
Length: 1 - 64

Parameters:
callerReference A unique string that identifies the request to create the health check.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HealthCheck withCallerReference(String callerReference) {
        this. = callerReference;
        return this;
    }

    
A complex type that contains the health check configuration.

Returns:
A complex type that contains the health check configuration.
        return ;
    }
    
    
A complex type that contains the health check configuration.

Parameters:
healthCheckConfig A complex type that contains the health check configuration.
    public void setHealthCheckConfig(HealthCheckConfig healthCheckConfig) {
        this. = healthCheckConfig;
    }
    
    
A complex type that contains the health check configuration.

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

Parameters:
healthCheckConfig A complex type that contains the health check configuration.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HealthCheck withHealthCheckConfig(HealthCheckConfig healthCheckConfig) {
        this. = healthCheckConfig;
        return this;
    }

    
The version of the health check. You can optionally pass this value in a call to UpdateHealthCheck to prevent overwriting another change to the health check.

Constraints:
Range: 1 -

Returns:
The version of the health check. You can optionally pass this value in a call to UpdateHealthCheck to prevent overwriting another change to the health check.
    public Long getHealthCheckVersion() {
        return ;
    }
    
    
The version of the health check. You can optionally pass this value in a call to UpdateHealthCheck to prevent overwriting another change to the health check.

Constraints:
Range: 1 -

Parameters:
healthCheckVersion The version of the health check. You can optionally pass this value in a call to UpdateHealthCheck to prevent overwriting another change to the health check.
    public void setHealthCheckVersion(Long healthCheckVersion) {
        this. = healthCheckVersion;
    }
    
    
The version of the health check. You can optionally pass this value in a call to UpdateHealthCheck to prevent overwriting another change to the health check.

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

Constraints:
Range: 1 -

Parameters:
healthCheckVersion The version of the health check. You can optionally pass this value in a call to UpdateHealthCheck to prevent overwriting another change to the health check.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HealthCheck withHealthCheckVersion(Long healthCheckVersion) {
        this. = healthCheckVersion;
        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 (getId() != nullsb.append("Id: " + getId() + ",");
        if (getCallerReference() != nullsb.append("CallerReference: " + getCallerReference() + ",");
        if (getHealthCheckConfig() != nullsb.append("HealthCheckConfig: " + getHealthCheckConfig() + ",");
        if (getHealthCheckVersion() != nullsb.append("HealthCheckVersion: " + getHealthCheckVersion() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); 
        hashCode = prime * hashCode + ((getCallerReference() == null) ? 0 : getCallerReference().hashCode()); 
        hashCode = prime * hashCode + ((getHealthCheckConfig() == null) ? 0 : getHealthCheckConfig().hashCode()); 
        hashCode = prime * hashCode + ((getHealthCheckVersion() == null) ? 0 : getHealthCheckVersion().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof HealthCheck == falsereturn false;
        HealthCheck other = (HealthCheck)obj;
        
        if (other.getId() == null ^ this.getId() == nullreturn false;
        if (other.getId() != null && other.getId().equals(this.getId()) == falsereturn false
        if (other.getCallerReference() == null ^ this.getCallerReference() == nullreturn false;
        if (other.getCallerReference() != null && other.getCallerReference().equals(this.getCallerReference()) == falsereturn false
        if (other.getHealthCheckConfig() == null ^ this.getHealthCheckConfig() == nullreturn false;
        if (other.getHealthCheckConfig() != null && other.getHealthCheckConfig().equals(this.getHealthCheckConfig()) == falsereturn false
        if (other.getHealthCheckVersion() == null ^ this.getHealthCheckVersion() == nullreturn false;
        if (other.getHealthCheckVersion() != null && other.getHealthCheckVersion().equals(this.getHealthCheckVersion()) == falsereturn false
        return true;
    }
    
    @Override
    public HealthCheck clone() {
        try {
            return (HealthChecksuper.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