com.google.api.services.run.v1.model.Probe 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.run.v1.model;
/**
* Probe describes a health check to be performed against a container to determine whether it is
* alive or ready to receive traffic.
*
* 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 Cloud Run 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 Probe extends com.google.api.client.json.GenericJson {
/**
* Not supported by Cloud Run.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private ExecAction exec;
/**
* Minimum consecutive failures for the probe to be considered failed after having succeeded.
* Defaults to 3. Minimum value is 1.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer failureThreshold;
/**
* GRPCAction specifies an action involving a GRPC port.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private GRPCAction grpc;
/**
* HTTPGet specifies the http request to perform.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private HTTPGetAction httpGet;
/**
* Number of seconds after the container has started before the probe is initiated. Defaults to 0
* seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for
* startup probe is 240.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer initialDelaySeconds;
/**
* How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum
* value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or
* equal than timeout_seconds.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer periodSeconds;
/**
* Minimum consecutive successes for the probe to be considered successful after having failed.
* Must be 1 if set.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer successThreshold;
/**
* TCPSocket specifies an action involving a TCP port.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private TCPSocketAction tcpSocket;
/**
* Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1.
* Maximum value is 3600. Must be smaller than period_seconds; if period_seconds is not set, must
* be less or equal than 10.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer timeoutSeconds;
/**
* Not supported by Cloud Run.
* @return value or {@code null} for none
*/
public ExecAction getExec() {
return exec;
}
/**
* Not supported by Cloud Run.
* @param exec exec or {@code null} for none
*/
public Probe setExec(ExecAction exec) {
this.exec = exec;
return this;
}
/**
* Minimum consecutive failures for the probe to be considered failed after having succeeded.
* Defaults to 3. Minimum value is 1.
* @return value or {@code null} for none
*/
public java.lang.Integer getFailureThreshold() {
return failureThreshold;
}
/**
* Minimum consecutive failures for the probe to be considered failed after having succeeded.
* Defaults to 3. Minimum value is 1.
* @param failureThreshold failureThreshold or {@code null} for none
*/
public Probe setFailureThreshold(java.lang.Integer failureThreshold) {
this.failureThreshold = failureThreshold;
return this;
}
/**
* GRPCAction specifies an action involving a GRPC port.
* @return value or {@code null} for none
*/
public GRPCAction getGrpc() {
return grpc;
}
/**
* GRPCAction specifies an action involving a GRPC port.
* @param grpc grpc or {@code null} for none
*/
public Probe setGrpc(GRPCAction grpc) {
this.grpc = grpc;
return this;
}
/**
* HTTPGet specifies the http request to perform.
* @return value or {@code null} for none
*/
public HTTPGetAction getHttpGet() {
return httpGet;
}
/**
* HTTPGet specifies the http request to perform.
* @param httpGet httpGet or {@code null} for none
*/
public Probe setHttpGet(HTTPGetAction httpGet) {
this.httpGet = httpGet;
return this;
}
/**
* Number of seconds after the container has started before the probe is initiated. Defaults to 0
* seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for
* startup probe is 240.
* @return value or {@code null} for none
*/
public java.lang.Integer getInitialDelaySeconds() {
return initialDelaySeconds;
}
/**
* Number of seconds after the container has started before the probe is initiated. Defaults to 0
* seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for
* startup probe is 240.
* @param initialDelaySeconds initialDelaySeconds or {@code null} for none
*/
public Probe setInitialDelaySeconds(java.lang.Integer initialDelaySeconds) {
this.initialDelaySeconds = initialDelaySeconds;
return this;
}
/**
* How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum
* value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or
* equal than timeout_seconds.
* @return value or {@code null} for none
*/
public java.lang.Integer getPeriodSeconds() {
return periodSeconds;
}
/**
* How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum
* value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or
* equal than timeout_seconds.
* @param periodSeconds periodSeconds or {@code null} for none
*/
public Probe setPeriodSeconds(java.lang.Integer periodSeconds) {
this.periodSeconds = periodSeconds;
return this;
}
/**
* Minimum consecutive successes for the probe to be considered successful after having failed.
* Must be 1 if set.
* @return value or {@code null} for none
*/
public java.lang.Integer getSuccessThreshold() {
return successThreshold;
}
/**
* Minimum consecutive successes for the probe to be considered successful after having failed.
* Must be 1 if set.
* @param successThreshold successThreshold or {@code null} for none
*/
public Probe setSuccessThreshold(java.lang.Integer successThreshold) {
this.successThreshold = successThreshold;
return this;
}
/**
* TCPSocket specifies an action involving a TCP port.
* @return value or {@code null} for none
*/
public TCPSocketAction getTcpSocket() {
return tcpSocket;
}
/**
* TCPSocket specifies an action involving a TCP port.
* @param tcpSocket tcpSocket or {@code null} for none
*/
public Probe setTcpSocket(TCPSocketAction tcpSocket) {
this.tcpSocket = tcpSocket;
return this;
}
/**
* Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1.
* Maximum value is 3600. Must be smaller than period_seconds; if period_seconds is not set, must
* be less or equal than 10.
* @return value or {@code null} for none
*/
public java.lang.Integer getTimeoutSeconds() {
return timeoutSeconds;
}
/**
* Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1.
* Maximum value is 3600. Must be smaller than period_seconds; if period_seconds is not set, must
* be less or equal than 10.
* @param timeoutSeconds timeoutSeconds or {@code null} for none
*/
public Probe setTimeoutSeconds(java.lang.Integer timeoutSeconds) {
this.timeoutSeconds = timeoutSeconds;
return this;
}
@Override
public Probe set(String fieldName, Object value) {
return (Probe) super.set(fieldName, value);
}
@Override
public Probe clone() {
return (Probe) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy