com.google.appengine.v1.HealthCheck Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-appengine-v1 Show documentation
Show all versions of proto-google-appengine-v1 Show documentation
PROTO library for proto-google-appengine-v1
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/appengine/v1/app_yaml.proto
package com.google.appengine.v1;
/**
*
* Health checking configuration for VM instances. Unhealthy instances
* are killed and replaced with new instances. Only applicable for
* instances in App Engine flexible environment.
*
*
* Protobuf type {@code google.appengine.v1.HealthCheck}
*/
public final class HealthCheck extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.appengine.v1.HealthCheck)
HealthCheckOrBuilder {
private static final long serialVersionUID = 0L;
// Use HealthCheck.newBuilder() to construct.
private HealthCheck(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HealthCheck() {
disableHealthCheck_ = false;
host_ = "";
healthyThreshold_ = 0;
unhealthyThreshold_ = 0;
restartThreshold_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HealthCheck(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
disableHealthCheck_ = input.readBool();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
host_ = s;
break;
}
case 24: {
healthyThreshold_ = input.readUInt32();
break;
}
case 32: {
unhealthyThreshold_ = input.readUInt32();
break;
}
case 40: {
restartThreshold_ = input.readUInt32();
break;
}
case 50: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (checkInterval_ != null) {
subBuilder = checkInterval_.toBuilder();
}
checkInterval_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(checkInterval_);
checkInterval_ = subBuilder.buildPartial();
}
break;
}
case 58: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (timeout_ != null) {
subBuilder = timeout_.toBuilder();
}
timeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(timeout_);
timeout_ = subBuilder.buildPartial();
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.appengine.v1.AppYamlProto.internal_static_google_appengine_v1_HealthCheck_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.appengine.v1.AppYamlProto.internal_static_google_appengine_v1_HealthCheck_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.appengine.v1.HealthCheck.class, com.google.appengine.v1.HealthCheck.Builder.class);
}
public static final int DISABLE_HEALTH_CHECK_FIELD_NUMBER = 1;
private boolean disableHealthCheck_;
/**
*
* Whether to explicitly disable health checks for this instance.
*
*
* bool disable_health_check = 1;
*/
public boolean getDisableHealthCheck() {
return disableHealthCheck_;
}
public static final int HOST_FIELD_NUMBER = 2;
private volatile java.lang.Object host_;
/**
*
* Host header to send when performing an HTTP health check.
* Example: "myapp.appspot.com"
*
*
* string host = 2;
*/
public java.lang.String getHost() {
java.lang.Object ref = host_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
host_ = s;
return s;
}
}
/**
*
* Host header to send when performing an HTTP health check.
* Example: "myapp.appspot.com"
*
*
* string host = 2;
*/
public com.google.protobuf.ByteString
getHostBytes() {
java.lang.Object ref = host_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
host_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HEALTHY_THRESHOLD_FIELD_NUMBER = 3;
private int healthyThreshold_;
/**
*
* Number of consecutive successful health checks required before receiving
* traffic.
*
*
* uint32 healthy_threshold = 3;
*/
public int getHealthyThreshold() {
return healthyThreshold_;
}
public static final int UNHEALTHY_THRESHOLD_FIELD_NUMBER = 4;
private int unhealthyThreshold_;
/**
*
* Number of consecutive failed health checks required before removing
* traffic.
*
*
* uint32 unhealthy_threshold = 4;
*/
public int getUnhealthyThreshold() {
return unhealthyThreshold_;
}
public static final int RESTART_THRESHOLD_FIELD_NUMBER = 5;
private int restartThreshold_;
/**
*
* Number of consecutive failed health checks required before an instance is
* restarted.
*
*
* uint32 restart_threshold = 5;
*/
public int getRestartThreshold() {
return restartThreshold_;
}
public static final int CHECK_INTERVAL_FIELD_NUMBER = 6;
private com.google.protobuf.Duration checkInterval_;
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
public boolean hasCheckInterval() {
return checkInterval_ != null;
}
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
public com.google.protobuf.Duration getCheckInterval() {
return checkInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : checkInterval_;
}
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
public com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder() {
return getCheckInterval();
}
public static final int TIMEOUT_FIELD_NUMBER = 7;
private com.google.protobuf.Duration timeout_;
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
public boolean hasTimeout() {
return timeout_ != null;
}
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
public com.google.protobuf.Duration getTimeout() {
return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
}
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() {
return getTimeout();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (disableHealthCheck_ != false) {
output.writeBool(1, disableHealthCheck_);
}
if (!getHostBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, host_);
}
if (healthyThreshold_ != 0) {
output.writeUInt32(3, healthyThreshold_);
}
if (unhealthyThreshold_ != 0) {
output.writeUInt32(4, unhealthyThreshold_);
}
if (restartThreshold_ != 0) {
output.writeUInt32(5, restartThreshold_);
}
if (checkInterval_ != null) {
output.writeMessage(6, getCheckInterval());
}
if (timeout_ != null) {
output.writeMessage(7, getTimeout());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (disableHealthCheck_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, disableHealthCheck_);
}
if (!getHostBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, host_);
}
if (healthyThreshold_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, healthyThreshold_);
}
if (unhealthyThreshold_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(4, unhealthyThreshold_);
}
if (restartThreshold_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(5, restartThreshold_);
}
if (checkInterval_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getCheckInterval());
}
if (timeout_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getTimeout());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.appengine.v1.HealthCheck)) {
return super.equals(obj);
}
com.google.appengine.v1.HealthCheck other = (com.google.appengine.v1.HealthCheck) obj;
boolean result = true;
result = result && (getDisableHealthCheck()
== other.getDisableHealthCheck());
result = result && getHost()
.equals(other.getHost());
result = result && (getHealthyThreshold()
== other.getHealthyThreshold());
result = result && (getUnhealthyThreshold()
== other.getUnhealthyThreshold());
result = result && (getRestartThreshold()
== other.getRestartThreshold());
result = result && (hasCheckInterval() == other.hasCheckInterval());
if (hasCheckInterval()) {
result = result && getCheckInterval()
.equals(other.getCheckInterval());
}
result = result && (hasTimeout() == other.hasTimeout());
if (hasTimeout()) {
result = result && getTimeout()
.equals(other.getTimeout());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DISABLE_HEALTH_CHECK_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDisableHealthCheck());
hash = (37 * hash) + HOST_FIELD_NUMBER;
hash = (53 * hash) + getHost().hashCode();
hash = (37 * hash) + HEALTHY_THRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + getHealthyThreshold();
hash = (37 * hash) + UNHEALTHY_THRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + getUnhealthyThreshold();
hash = (37 * hash) + RESTART_THRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + getRestartThreshold();
if (hasCheckInterval()) {
hash = (37 * hash) + CHECK_INTERVAL_FIELD_NUMBER;
hash = (53 * hash) + getCheckInterval().hashCode();
}
if (hasTimeout()) {
hash = (37 * hash) + TIMEOUT_FIELD_NUMBER;
hash = (53 * hash) + getTimeout().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.appengine.v1.HealthCheck parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.appengine.v1.HealthCheck parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.appengine.v1.HealthCheck parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.appengine.v1.HealthCheck parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.appengine.v1.HealthCheck parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.appengine.v1.HealthCheck parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.appengine.v1.HealthCheck parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.appengine.v1.HealthCheck parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.appengine.v1.HealthCheck parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.appengine.v1.HealthCheck parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.appengine.v1.HealthCheck parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.appengine.v1.HealthCheck parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.appengine.v1.HealthCheck prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Health checking configuration for VM instances. Unhealthy instances
* are killed and replaced with new instances. Only applicable for
* instances in App Engine flexible environment.
*
*
* Protobuf type {@code google.appengine.v1.HealthCheck}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.appengine.v1.HealthCheck)
com.google.appengine.v1.HealthCheckOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.appengine.v1.AppYamlProto.internal_static_google_appengine_v1_HealthCheck_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.appengine.v1.AppYamlProto.internal_static_google_appengine_v1_HealthCheck_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.appengine.v1.HealthCheck.class, com.google.appengine.v1.HealthCheck.Builder.class);
}
// Construct using com.google.appengine.v1.HealthCheck.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
disableHealthCheck_ = false;
host_ = "";
healthyThreshold_ = 0;
unhealthyThreshold_ = 0;
restartThreshold_ = 0;
if (checkIntervalBuilder_ == null) {
checkInterval_ = null;
} else {
checkInterval_ = null;
checkIntervalBuilder_ = null;
}
if (timeoutBuilder_ == null) {
timeout_ = null;
} else {
timeout_ = null;
timeoutBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.appengine.v1.AppYamlProto.internal_static_google_appengine_v1_HealthCheck_descriptor;
}
public com.google.appengine.v1.HealthCheck getDefaultInstanceForType() {
return com.google.appengine.v1.HealthCheck.getDefaultInstance();
}
public com.google.appengine.v1.HealthCheck build() {
com.google.appengine.v1.HealthCheck result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.appengine.v1.HealthCheck buildPartial() {
com.google.appengine.v1.HealthCheck result = new com.google.appengine.v1.HealthCheck(this);
result.disableHealthCheck_ = disableHealthCheck_;
result.host_ = host_;
result.healthyThreshold_ = healthyThreshold_;
result.unhealthyThreshold_ = unhealthyThreshold_;
result.restartThreshold_ = restartThreshold_;
if (checkIntervalBuilder_ == null) {
result.checkInterval_ = checkInterval_;
} else {
result.checkInterval_ = checkIntervalBuilder_.build();
}
if (timeoutBuilder_ == null) {
result.timeout_ = timeout_;
} else {
result.timeout_ = timeoutBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.appengine.v1.HealthCheck) {
return mergeFrom((com.google.appengine.v1.HealthCheck)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.appengine.v1.HealthCheck other) {
if (other == com.google.appengine.v1.HealthCheck.getDefaultInstance()) return this;
if (other.getDisableHealthCheck() != false) {
setDisableHealthCheck(other.getDisableHealthCheck());
}
if (!other.getHost().isEmpty()) {
host_ = other.host_;
onChanged();
}
if (other.getHealthyThreshold() != 0) {
setHealthyThreshold(other.getHealthyThreshold());
}
if (other.getUnhealthyThreshold() != 0) {
setUnhealthyThreshold(other.getUnhealthyThreshold());
}
if (other.getRestartThreshold() != 0) {
setRestartThreshold(other.getRestartThreshold());
}
if (other.hasCheckInterval()) {
mergeCheckInterval(other.getCheckInterval());
}
if (other.hasTimeout()) {
mergeTimeout(other.getTimeout());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.appengine.v1.HealthCheck parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.appengine.v1.HealthCheck) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private boolean disableHealthCheck_ ;
/**
*
* Whether to explicitly disable health checks for this instance.
*
*
* bool disable_health_check = 1;
*/
public boolean getDisableHealthCheck() {
return disableHealthCheck_;
}
/**
*
* Whether to explicitly disable health checks for this instance.
*
*
* bool disable_health_check = 1;
*/
public Builder setDisableHealthCheck(boolean value) {
disableHealthCheck_ = value;
onChanged();
return this;
}
/**
*
* Whether to explicitly disable health checks for this instance.
*
*
* bool disable_health_check = 1;
*/
public Builder clearDisableHealthCheck() {
disableHealthCheck_ = false;
onChanged();
return this;
}
private java.lang.Object host_ = "";
/**
*
* Host header to send when performing an HTTP health check.
* Example: "myapp.appspot.com"
*
*
* string host = 2;
*/
public java.lang.String getHost() {
java.lang.Object ref = host_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
host_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Host header to send when performing an HTTP health check.
* Example: "myapp.appspot.com"
*
*
* string host = 2;
*/
public com.google.protobuf.ByteString
getHostBytes() {
java.lang.Object ref = host_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
host_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Host header to send when performing an HTTP health check.
* Example: "myapp.appspot.com"
*
*
* string host = 2;
*/
public Builder setHost(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
host_ = value;
onChanged();
return this;
}
/**
*
* Host header to send when performing an HTTP health check.
* Example: "myapp.appspot.com"
*
*
* string host = 2;
*/
public Builder clearHost() {
host_ = getDefaultInstance().getHost();
onChanged();
return this;
}
/**
*
* Host header to send when performing an HTTP health check.
* Example: "myapp.appspot.com"
*
*
* string host = 2;
*/
public Builder setHostBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
host_ = value;
onChanged();
return this;
}
private int healthyThreshold_ ;
/**
*
* Number of consecutive successful health checks required before receiving
* traffic.
*
*
* uint32 healthy_threshold = 3;
*/
public int getHealthyThreshold() {
return healthyThreshold_;
}
/**
*
* Number of consecutive successful health checks required before receiving
* traffic.
*
*
* uint32 healthy_threshold = 3;
*/
public Builder setHealthyThreshold(int value) {
healthyThreshold_ = value;
onChanged();
return this;
}
/**
*
* Number of consecutive successful health checks required before receiving
* traffic.
*
*
* uint32 healthy_threshold = 3;
*/
public Builder clearHealthyThreshold() {
healthyThreshold_ = 0;
onChanged();
return this;
}
private int unhealthyThreshold_ ;
/**
*
* Number of consecutive failed health checks required before removing
* traffic.
*
*
* uint32 unhealthy_threshold = 4;
*/
public int getUnhealthyThreshold() {
return unhealthyThreshold_;
}
/**
*
* Number of consecutive failed health checks required before removing
* traffic.
*
*
* uint32 unhealthy_threshold = 4;
*/
public Builder setUnhealthyThreshold(int value) {
unhealthyThreshold_ = value;
onChanged();
return this;
}
/**
*
* Number of consecutive failed health checks required before removing
* traffic.
*
*
* uint32 unhealthy_threshold = 4;
*/
public Builder clearUnhealthyThreshold() {
unhealthyThreshold_ = 0;
onChanged();
return this;
}
private int restartThreshold_ ;
/**
*
* Number of consecutive failed health checks required before an instance is
* restarted.
*
*
* uint32 restart_threshold = 5;
*/
public int getRestartThreshold() {
return restartThreshold_;
}
/**
*
* Number of consecutive failed health checks required before an instance is
* restarted.
*
*
* uint32 restart_threshold = 5;
*/
public Builder setRestartThreshold(int value) {
restartThreshold_ = value;
onChanged();
return this;
}
/**
*
* Number of consecutive failed health checks required before an instance is
* restarted.
*
*
* uint32 restart_threshold = 5;
*/
public Builder clearRestartThreshold() {
restartThreshold_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Duration checkInterval_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> checkIntervalBuilder_;
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
public boolean hasCheckInterval() {
return checkIntervalBuilder_ != null || checkInterval_ != null;
}
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
public com.google.protobuf.Duration getCheckInterval() {
if (checkIntervalBuilder_ == null) {
return checkInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : checkInterval_;
} else {
return checkIntervalBuilder_.getMessage();
}
}
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
public Builder setCheckInterval(com.google.protobuf.Duration value) {
if (checkIntervalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
checkInterval_ = value;
onChanged();
} else {
checkIntervalBuilder_.setMessage(value);
}
return this;
}
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
public Builder setCheckInterval(
com.google.protobuf.Duration.Builder builderForValue) {
if (checkIntervalBuilder_ == null) {
checkInterval_ = builderForValue.build();
onChanged();
} else {
checkIntervalBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
public Builder mergeCheckInterval(com.google.protobuf.Duration value) {
if (checkIntervalBuilder_ == null) {
if (checkInterval_ != null) {
checkInterval_ =
com.google.protobuf.Duration.newBuilder(checkInterval_).mergeFrom(value).buildPartial();
} else {
checkInterval_ = value;
}
onChanged();
} else {
checkIntervalBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
public Builder clearCheckInterval() {
if (checkIntervalBuilder_ == null) {
checkInterval_ = null;
onChanged();
} else {
checkInterval_ = null;
checkIntervalBuilder_ = null;
}
return this;
}
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
public com.google.protobuf.Duration.Builder getCheckIntervalBuilder() {
onChanged();
return getCheckIntervalFieldBuilder().getBuilder();
}
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
public com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder() {
if (checkIntervalBuilder_ != null) {
return checkIntervalBuilder_.getMessageOrBuilder();
} else {
return checkInterval_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : checkInterval_;
}
}
/**
*
* Interval between health checks.
*
*
* .google.protobuf.Duration check_interval = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getCheckIntervalFieldBuilder() {
if (checkIntervalBuilder_ == null) {
checkIntervalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getCheckInterval(),
getParentForChildren(),
isClean());
checkInterval_ = null;
}
return checkIntervalBuilder_;
}
private com.google.protobuf.Duration timeout_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> timeoutBuilder_;
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
public boolean hasTimeout() {
return timeoutBuilder_ != null || timeout_ != null;
}
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
public com.google.protobuf.Duration getTimeout() {
if (timeoutBuilder_ == null) {
return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
} else {
return timeoutBuilder_.getMessage();
}
}
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
public Builder setTimeout(com.google.protobuf.Duration value) {
if (timeoutBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
timeout_ = value;
onChanged();
} else {
timeoutBuilder_.setMessage(value);
}
return this;
}
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
public Builder setTimeout(
com.google.protobuf.Duration.Builder builderForValue) {
if (timeoutBuilder_ == null) {
timeout_ = builderForValue.build();
onChanged();
} else {
timeoutBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
public Builder mergeTimeout(com.google.protobuf.Duration value) {
if (timeoutBuilder_ == null) {
if (timeout_ != null) {
timeout_ =
com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial();
} else {
timeout_ = value;
}
onChanged();
} else {
timeoutBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
public Builder clearTimeout() {
if (timeoutBuilder_ == null) {
timeout_ = null;
onChanged();
} else {
timeout_ = null;
timeoutBuilder_ = null;
}
return this;
}
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
public com.google.protobuf.Duration.Builder getTimeoutBuilder() {
onChanged();
return getTimeoutFieldBuilder().getBuilder();
}
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() {
if (timeoutBuilder_ != null) {
return timeoutBuilder_.getMessageOrBuilder();
} else {
return timeout_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : timeout_;
}
}
/**
*
* Time before the health check is considered failed.
*
*
* .google.protobuf.Duration timeout = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getTimeoutFieldBuilder() {
if (timeoutBuilder_ == null) {
timeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getTimeout(),
getParentForChildren(),
isClean());
timeout_ = null;
}
return timeoutBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.appengine.v1.HealthCheck)
}
// @@protoc_insertion_point(class_scope:google.appengine.v1.HealthCheck)
private static final com.google.appengine.v1.HealthCheck DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.appengine.v1.HealthCheck();
}
public static com.google.appengine.v1.HealthCheck getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public HealthCheck parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HealthCheck(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.appengine.v1.HealthCheck getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy