com.google.api.services.appengine.v1.model.HealthCheck Maven / Gradle / Ivy
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* 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.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.appengine.v1.model;
/**
* Health checking configuration for VM instances. Unhealthy instances are killed and replaced with
* new instances. Only applicable for instances in App Engine flexible environment.
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the App Engine Admin API. For a detailed explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class HealthCheck extends com.google.api.client.json.GenericJson {
/**
* Interval between health checks.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private String checkInterval;
/**
* Whether to explicitly disable health checks for this instance.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean disableHealthCheck;
/**
* Number of consecutive successful health checks required before receiving traffic.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Long healthyThreshold;
/**
* Host header to send when performing an HTTP health check. Example: "myapp.appspot.com"
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String host;
/**
* Number of consecutive failed health checks required before an instance is restarted.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Long restartThreshold;
/**
* Time before the health check is considered failed.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private String timeout;
/**
* Number of consecutive failed health checks required before removing traffic.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Long unhealthyThreshold;
/**
* Interval between health checks.
* @return value or {@code null} for none
*/
public String getCheckInterval() {
return checkInterval;
}
/**
* Interval between health checks.
* @param checkInterval checkInterval or {@code null} for none
*/
public HealthCheck setCheckInterval(String checkInterval) {
this.checkInterval = checkInterval;
return this;
}
/**
* Whether to explicitly disable health checks for this instance.
* @return value or {@code null} for none
*/
public java.lang.Boolean getDisableHealthCheck() {
return disableHealthCheck;
}
/**
* Whether to explicitly disable health checks for this instance.
* @param disableHealthCheck disableHealthCheck or {@code null} for none
*/
public HealthCheck setDisableHealthCheck(java.lang.Boolean disableHealthCheck) {
this.disableHealthCheck = disableHealthCheck;
return this;
}
/**
* Number of consecutive successful health checks required before receiving traffic.
* @return value or {@code null} for none
*/
public java.lang.Long getHealthyThreshold() {
return healthyThreshold;
}
/**
* Number of consecutive successful health checks required before receiving traffic.
* @param healthyThreshold healthyThreshold or {@code null} for none
*/
public HealthCheck setHealthyThreshold(java.lang.Long healthyThreshold) {
this.healthyThreshold = healthyThreshold;
return this;
}
/**
* Host header to send when performing an HTTP health check. Example: "myapp.appspot.com"
* @return value or {@code null} for none
*/
public java.lang.String getHost() {
return host;
}
/**
* Host header to send when performing an HTTP health check. Example: "myapp.appspot.com"
* @param host host or {@code null} for none
*/
public HealthCheck setHost(java.lang.String host) {
this.host = host;
return this;
}
/**
* Number of consecutive failed health checks required before an instance is restarted.
* @return value or {@code null} for none
*/
public java.lang.Long getRestartThreshold() {
return restartThreshold;
}
/**
* Number of consecutive failed health checks required before an instance is restarted.
* @param restartThreshold restartThreshold or {@code null} for none
*/
public HealthCheck setRestartThreshold(java.lang.Long restartThreshold) {
this.restartThreshold = restartThreshold;
return this;
}
/**
* Time before the health check is considered failed.
* @return value or {@code null} for none
*/
public String getTimeout() {
return timeout;
}
/**
* Time before the health check is considered failed.
* @param timeout timeout or {@code null} for none
*/
public HealthCheck setTimeout(String timeout) {
this.timeout = timeout;
return this;
}
/**
* Number of consecutive failed health checks required before removing traffic.
* @return value or {@code null} for none
*/
public java.lang.Long getUnhealthyThreshold() {
return unhealthyThreshold;
}
/**
* Number of consecutive failed health checks required before removing traffic.
* @param unhealthyThreshold unhealthyThreshold or {@code null} for none
*/
public HealthCheck setUnhealthyThreshold(java.lang.Long unhealthyThreshold) {
this.unhealthyThreshold = unhealthyThreshold;
return this;
}
@Override
public HealthCheck set(String fieldName, Object value) {
return (HealthCheck) super.set(fieldName, value);
}
@Override
public HealthCheck clone() {
return (HealthCheck) super.clone();
}
}