All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.appengine.v1.HealthCheck Maven / Gradle / Ivy

There is a newer version: 2.54.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * 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
 *
 *     https://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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/appengine/v1/app_yaml.proto

// Protobuf Java Version: 3.25.5
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() { host_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new HealthCheck(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.appengine.v1.AppYamlProto .internal_static_google_appengine_v1_HealthCheck_descriptor; } @java.lang.Override 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); } private int bitField0_; public static final int DISABLE_HEALTH_CHECK_FIELD_NUMBER = 1; private boolean disableHealthCheck_ = false; /** * * *
   * Whether to explicitly disable health checks for this instance.
   * 
* * bool disable_health_check = 1; * * @return The disableHealthCheck. */ @java.lang.Override public boolean getDisableHealthCheck() { return disableHealthCheck_; } public static final int HOST_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object host_ = ""; /** * * *
   * Host header to send when performing an HTTP health check.
   * Example: "myapp.appspot.com"
   * 
* * string host = 2; * * @return The host. */ @java.lang.Override 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; * * @return The bytes for host. */ @java.lang.Override 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_ = 0; /** * * *
   * Number of consecutive successful health checks required before receiving
   * traffic.
   * 
* * uint32 healthy_threshold = 3; * * @return The healthyThreshold. */ @java.lang.Override public int getHealthyThreshold() { return healthyThreshold_; } public static final int UNHEALTHY_THRESHOLD_FIELD_NUMBER = 4; private int unhealthyThreshold_ = 0; /** * * *
   * Number of consecutive failed health checks required before removing
   * traffic.
   * 
* * uint32 unhealthy_threshold = 4; * * @return The unhealthyThreshold. */ @java.lang.Override public int getUnhealthyThreshold() { return unhealthyThreshold_; } public static final int RESTART_THRESHOLD_FIELD_NUMBER = 5; private int restartThreshold_ = 0; /** * * *
   * Number of consecutive failed health checks required before an instance is
   * restarted.
   * 
* * uint32 restart_threshold = 5; * * @return The restartThreshold. */ @java.lang.Override 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; * * @return Whether the checkInterval field is set. */ @java.lang.Override public boolean hasCheckInterval() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Interval between health checks.
   * 
* * .google.protobuf.Duration check_interval = 6; * * @return The checkInterval. */ @java.lang.Override 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; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder() { return checkInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : checkInterval_; } 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; * * @return Whether the timeout field is set. */ @java.lang.Override public boolean hasTimeout() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Time before the health check is considered failed.
   * 
* * .google.protobuf.Duration timeout = 7; * * @return The timeout. */ @java.lang.Override 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; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (disableHealthCheck_ != false) { output.writeBool(1, disableHealthCheck_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { 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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(6, getCheckInterval()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(7, getTimeout()); } getUnknownFields().writeTo(output); } @java.lang.Override 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { 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 (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCheckInterval()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTimeout()); } size += getUnknownFields().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; if (getDisableHealthCheck() != other.getDisableHealthCheck()) return false; if (!getHost().equals(other.getHost())) return false; if (getHealthyThreshold() != other.getHealthyThreshold()) return false; if (getUnhealthyThreshold() != other.getUnhealthyThreshold()) return false; if (getRestartThreshold() != other.getRestartThreshold()) return false; if (hasCheckInterval() != other.hasCheckInterval()) return false; if (hasCheckInterval()) { if (!getCheckInterval().equals(other.getCheckInterval())) return false; } if (hasTimeout() != other.hasTimeout()) return false; if (hasTimeout()) { if (!getTimeout().equals(other.getTimeout())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @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) + getUnknownFields().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); } @java.lang.Override 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); } @java.lang.Override 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; } @java.lang.Override 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) { getCheckIntervalFieldBuilder(); getTimeoutFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; disableHealthCheck_ = false; host_ = ""; healthyThreshold_ = 0; unhealthyThreshold_ = 0; restartThreshold_ = 0; checkInterval_ = null; if (checkIntervalBuilder_ != null) { checkIntervalBuilder_.dispose(); checkIntervalBuilder_ = null; } timeout_ = null; if (timeoutBuilder_ != null) { timeoutBuilder_.dispose(); timeoutBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.appengine.v1.AppYamlProto .internal_static_google_appengine_v1_HealthCheck_descriptor; } @java.lang.Override public com.google.appengine.v1.HealthCheck getDefaultInstanceForType() { return com.google.appengine.v1.HealthCheck.getDefaultInstance(); } @java.lang.Override public com.google.appengine.v1.HealthCheck build() { com.google.appengine.v1.HealthCheck result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.appengine.v1.HealthCheck buildPartial() { com.google.appengine.v1.HealthCheck result = new com.google.appengine.v1.HealthCheck(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.appengine.v1.HealthCheck result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.disableHealthCheck_ = disableHealthCheck_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.host_ = host_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.healthyThreshold_ = healthyThreshold_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.unhealthyThreshold_ = unhealthyThreshold_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.restartThreshold_ = restartThreshold_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000020) != 0)) { result.checkInterval_ = checkIntervalBuilder_ == null ? checkInterval_ : checkIntervalBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000040) != 0)) { result.timeout_ = timeoutBuilder_ == null ? timeout_ : timeoutBuilder_.build(); to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override 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_; bitField0_ |= 0x00000002; 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.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { disableHealthCheck_ = input.readBool(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { host_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 24: { healthyThreshold_ = input.readUInt32(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { unhealthyThreshold_ = input.readUInt32(); bitField0_ |= 0x00000008; break; } // case 32 case 40: { restartThreshold_ = input.readUInt32(); bitField0_ |= 0x00000010; break; } // case 40 case 50: { input.readMessage(getCheckIntervalFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 case 58: { input.readMessage(getTimeoutFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private boolean disableHealthCheck_; /** * * *
     * Whether to explicitly disable health checks for this instance.
     * 
* * bool disable_health_check = 1; * * @return The disableHealthCheck. */ @java.lang.Override public boolean getDisableHealthCheck() { return disableHealthCheck_; } /** * * *
     * Whether to explicitly disable health checks for this instance.
     * 
* * bool disable_health_check = 1; * * @param value The disableHealthCheck to set. * @return This builder for chaining. */ public Builder setDisableHealthCheck(boolean value) { disableHealthCheck_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Whether to explicitly disable health checks for this instance.
     * 
* * bool disable_health_check = 1; * * @return This builder for chaining. */ public Builder clearDisableHealthCheck() { bitField0_ = (bitField0_ & ~0x00000001); 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; * * @return The host. */ 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; * * @return The bytes for host. */ 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; * * @param value The host to set. * @return This builder for chaining. */ public Builder setHost(java.lang.String value) { if (value == null) { throw new NullPointerException(); } host_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Host header to send when performing an HTTP health check.
     * Example: "myapp.appspot.com"
     * 
* * string host = 2; * * @return This builder for chaining. */ public Builder clearHost() { host_ = getDefaultInstance().getHost(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * Host header to send when performing an HTTP health check.
     * Example: "myapp.appspot.com"
     * 
* * string host = 2; * * @param value The bytes for host to set. * @return This builder for chaining. */ public Builder setHostBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); host_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private int healthyThreshold_; /** * * *
     * Number of consecutive successful health checks required before receiving
     * traffic.
     * 
* * uint32 healthy_threshold = 3; * * @return The healthyThreshold. */ @java.lang.Override public int getHealthyThreshold() { return healthyThreshold_; } /** * * *
     * Number of consecutive successful health checks required before receiving
     * traffic.
     * 
* * uint32 healthy_threshold = 3; * * @param value The healthyThreshold to set. * @return This builder for chaining. */ public Builder setHealthyThreshold(int value) { healthyThreshold_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Number of consecutive successful health checks required before receiving
     * traffic.
     * 
* * uint32 healthy_threshold = 3; * * @return This builder for chaining. */ public Builder clearHealthyThreshold() { bitField0_ = (bitField0_ & ~0x00000004); healthyThreshold_ = 0; onChanged(); return this; } private int unhealthyThreshold_; /** * * *
     * Number of consecutive failed health checks required before removing
     * traffic.
     * 
* * uint32 unhealthy_threshold = 4; * * @return The unhealthyThreshold. */ @java.lang.Override public int getUnhealthyThreshold() { return unhealthyThreshold_; } /** * * *
     * Number of consecutive failed health checks required before removing
     * traffic.
     * 
* * uint32 unhealthy_threshold = 4; * * @param value The unhealthyThreshold to set. * @return This builder for chaining. */ public Builder setUnhealthyThreshold(int value) { unhealthyThreshold_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Number of consecutive failed health checks required before removing
     * traffic.
     * 
* * uint32 unhealthy_threshold = 4; * * @return This builder for chaining. */ public Builder clearUnhealthyThreshold() { bitField0_ = (bitField0_ & ~0x00000008); unhealthyThreshold_ = 0; onChanged(); return this; } private int restartThreshold_; /** * * *
     * Number of consecutive failed health checks required before an instance is
     * restarted.
     * 
* * uint32 restart_threshold = 5; * * @return The restartThreshold. */ @java.lang.Override public int getRestartThreshold() { return restartThreshold_; } /** * * *
     * Number of consecutive failed health checks required before an instance is
     * restarted.
     * 
* * uint32 restart_threshold = 5; * * @param value The restartThreshold to set. * @return This builder for chaining. */ public Builder setRestartThreshold(int value) { restartThreshold_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Number of consecutive failed health checks required before an instance is
     * restarted.
     * 
* * uint32 restart_threshold = 5; * * @return This builder for chaining. */ public Builder clearRestartThreshold() { bitField0_ = (bitField0_ & ~0x00000010); restartThreshold_ = 0; onChanged(); return this; } private com.google.protobuf.Duration checkInterval_; 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; * * @return Whether the checkInterval field is set. */ public boolean hasCheckInterval() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
     * Interval between health checks.
     * 
* * .google.protobuf.Duration check_interval = 6; * * @return The checkInterval. */ 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; } else { checkIntervalBuilder_.setMessage(value); } bitField0_ |= 0x00000020; onChanged(); 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(); } else { checkIntervalBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Interval between health checks.
     * 
* * .google.protobuf.Duration check_interval = 6; */ public Builder mergeCheckInterval(com.google.protobuf.Duration value) { if (checkIntervalBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0) && checkInterval_ != null && checkInterval_ != com.google.protobuf.Duration.getDefaultInstance()) { getCheckIntervalBuilder().mergeFrom(value); } else { checkInterval_ = value; } } else { checkIntervalBuilder_.mergeFrom(value); } if (checkInterval_ != null) { bitField0_ |= 0x00000020; onChanged(); } return this; } /** * * *
     * Interval between health checks.
     * 
* * .google.protobuf.Duration check_interval = 6; */ public Builder clearCheckInterval() { bitField0_ = (bitField0_ & ~0x00000020); checkInterval_ = null; if (checkIntervalBuilder_ != null) { checkIntervalBuilder_.dispose(); checkIntervalBuilder_ = null; } onChanged(); return this; } /** * * *
     * Interval between health checks.
     * 
* * .google.protobuf.Duration check_interval = 6; */ public com.google.protobuf.Duration.Builder getCheckIntervalBuilder() { bitField0_ |= 0x00000020; 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_; 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; * * @return Whether the timeout field is set. */ public boolean hasTimeout() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
     * Time before the health check is considered failed.
     * 
* * .google.protobuf.Duration timeout = 7; * * @return The timeout. */ 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; } else { timeoutBuilder_.setMessage(value); } bitField0_ |= 0x00000040; onChanged(); 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(); } else { timeoutBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; onChanged(); 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 (((bitField0_ & 0x00000040) != 0) && timeout_ != null && timeout_ != com.google.protobuf.Duration.getDefaultInstance()) { getTimeoutBuilder().mergeFrom(value); } else { timeout_ = value; } } else { timeoutBuilder_.mergeFrom(value); } if (timeout_ != null) { bitField0_ |= 0x00000040; onChanged(); } return this; } /** * * *
     * Time before the health check is considered failed.
     * 
* * .google.protobuf.Duration timeout = 7; */ public Builder clearTimeout() { bitField0_ = (bitField0_ & ~0x00000040); timeout_ = null; if (timeoutBuilder_ != null) { timeoutBuilder_.dispose(); timeoutBuilder_ = null; } onChanged(); return this; } /** * * *
     * Time before the health check is considered failed.
     * 
* * .google.protobuf.Duration timeout = 7; */ public com.google.protobuf.Duration.Builder getTimeoutBuilder() { bitField0_ |= 0x00000040; 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_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override 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() { @java.lang.Override public HealthCheck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.appengine.v1.HealthCheck getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy