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

main.java.com.grpc.health.v1.HealthCheckResponse Maven / Gradle / Ivy

There is a newer version: 5.133.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: grpc/health/v1/health.proto

// Protobuf Java Version: 3.25.3
package com.grpc.health.v1;

/**
 * Protobuf type {@code grpc.health.v1.HealthCheckResponse}
 */
public  final class HealthCheckResponse extends
    com.google.protobuf.GeneratedMessageLite<
        HealthCheckResponse, HealthCheckResponse.Builder> implements
    // @@protoc_insertion_point(message_implements:grpc.health.v1.HealthCheckResponse)
    HealthCheckResponseOrBuilder {
  private HealthCheckResponse() {
  }
  /**
   * Protobuf enum {@code grpc.health.v1.HealthCheckResponse.ServingStatus}
   */
  public enum ServingStatus
      implements com.google.protobuf.Internal.EnumLite {
    /**
     * SERVING_STATUS_UNSPECIFIED = 0;
     */
    SERVING_STATUS_UNSPECIFIED(0),
    /**
     * SERVING_STATUS_SERVING = 1;
     */
    SERVING_STATUS_SERVING(1),
    /**
     * SERVING_STATUS_NOT_SERVING = 2;
     */
    SERVING_STATUS_NOT_SERVING(2),
    UNRECOGNIZED(-1),
    ;

    /**
     * SERVING_STATUS_UNSPECIFIED = 0;
     */
    public static final int SERVING_STATUS_UNSPECIFIED_VALUE = 0;
    /**
     * SERVING_STATUS_SERVING = 1;
     */
    public static final int SERVING_STATUS_SERVING_VALUE = 1;
    /**
     * SERVING_STATUS_NOT_SERVING = 2;
     */
    public static final int SERVING_STATUS_NOT_SERVING_VALUE = 2;


    @java.lang.Override
    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static ServingStatus valueOf(int value) {
      return forNumber(value);
    }

    public static ServingStatus forNumber(int value) {
      switch (value) {
        case 0: return SERVING_STATUS_UNSPECIFIED;
        case 1: return SERVING_STATUS_SERVING;
        case 2: return SERVING_STATUS_NOT_SERVING;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        ServingStatus> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap() {
            @java.lang.Override
            public ServingStatus findValueByNumber(int number) {
              return ServingStatus.forNumber(number);
            }
          };

    public static com.google.protobuf.Internal.EnumVerifier 
        internalGetVerifier() {
      return ServingStatusVerifier.INSTANCE;
    }

    private static final class ServingStatusVerifier implements 
         com.google.protobuf.Internal.EnumVerifier { 
            static final com.google.protobuf.Internal.EnumVerifier           INSTANCE = new ServingStatusVerifier();
            @java.lang.Override
            public boolean isInRange(int number) {
              return ServingStatus.forNumber(number) != null;
            }
          };

    private final int value;

    private ServingStatus(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:grpc.health.v1.HealthCheckResponse.ServingStatus)
  }

  public static final int STATUS_FIELD_NUMBER = 1;
  private int status_;
  /**
   * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1 [json_name = "status"];
   * @return The enum numeric value on the wire for status.
   */
  @java.lang.Override
  public int getStatusValue() {
    return status_;
  }
  /**
   * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1 [json_name = "status"];
   * @return The status.
   */
  @java.lang.Override
  public com.grpc.health.v1.HealthCheckResponse.ServingStatus getStatus() {
    com.grpc.health.v1.HealthCheckResponse.ServingStatus result = com.grpc.health.v1.HealthCheckResponse.ServingStatus.forNumber(status_);
    return result == null ? com.grpc.health.v1.HealthCheckResponse.ServingStatus.UNRECOGNIZED : result;
  }
  /**
   * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1 [json_name = "status"];
   * @param value The enum numeric value on the wire for status to set.
   */
  private void setStatusValue(int value) {
      status_ = value;
  }
  /**
   * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1 [json_name = "status"];
   * @param value The status to set.
   */
  private void setStatus(com.grpc.health.v1.HealthCheckResponse.ServingStatus value) {
    status_ = value.getNumber();

  }
  /**
   * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1 [json_name = "status"];
   */
  private void clearStatus() {

    status_ = 0;
  }

  public static com.grpc.health.v1.HealthCheckResponse parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.grpc.health.v1.HealthCheckResponse parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.grpc.health.v1.HealthCheckResponse parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.grpc.health.v1.HealthCheckResponse parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.grpc.health.v1.HealthCheckResponse parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.grpc.health.v1.HealthCheckResponse parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.grpc.health.v1.HealthCheckResponse parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.grpc.health.v1.HealthCheckResponse parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }

  public static com.grpc.health.v1.HealthCheckResponse parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input);
  }

  public static com.grpc.health.v1.HealthCheckResponse parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static com.grpc.health.v1.HealthCheckResponse parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.grpc.health.v1.HealthCheckResponse parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }

  public static Builder newBuilder() {
    return (Builder) DEFAULT_INSTANCE.createBuilder();
  }
  public static Builder newBuilder(com.grpc.health.v1.HealthCheckResponse prototype) {
    return DEFAULT_INSTANCE.createBuilder(prototype);
  }

  /**
   * Protobuf type {@code grpc.health.v1.HealthCheckResponse}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageLite.Builder<
        com.grpc.health.v1.HealthCheckResponse, Builder> implements
      // @@protoc_insertion_point(builder_implements:grpc.health.v1.HealthCheckResponse)
      com.grpc.health.v1.HealthCheckResponseOrBuilder {
    // Construct using com.grpc.health.v1.HealthCheckResponse.newBuilder()
    private Builder() {
      super(DEFAULT_INSTANCE);
    }


    /**
     * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1 [json_name = "status"];
     * @return The enum numeric value on the wire for status.
     */
    @java.lang.Override
    public int getStatusValue() {
      return instance.getStatusValue();
    }
    /**
     * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1 [json_name = "status"];
     * @param value The status to set.
     * @return This builder for chaining.
     */
    public Builder setStatusValue(int value) {
      copyOnWrite();
      instance.setStatusValue(value);
      return this;
    }
    /**
     * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1 [json_name = "status"];
     * @return The status.
     */
    @java.lang.Override
    public com.grpc.health.v1.HealthCheckResponse.ServingStatus getStatus() {
      return instance.getStatus();
    }
    /**
     * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1 [json_name = "status"];
     * @param value The enum numeric value on the wire for status to set.
     * @return This builder for chaining.
     */
    public Builder setStatus(com.grpc.health.v1.HealthCheckResponse.ServingStatus value) {
      copyOnWrite();
      instance.setStatus(value);
      return this;
    }
    /**
     * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1 [json_name = "status"];
     * @return This builder for chaining.
     */
    public Builder clearStatus() {
      copyOnWrite();
      instance.clearStatus();
      return this;
    }

    // @@protoc_insertion_point(builder_scope:grpc.health.v1.HealthCheckResponse)
  }
  @java.lang.Override
  @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
  protected final java.lang.Object dynamicMethod(
      com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
      java.lang.Object arg0, java.lang.Object arg1) {
    switch (method) {
      case NEW_MUTABLE_INSTANCE: {
        return new com.grpc.health.v1.HealthCheckResponse();
      }
      case NEW_BUILDER: {
        return new Builder();
      }
      case BUILD_MESSAGE_INFO: {
          java.lang.Object[] objects = new java.lang.Object[] {
            "status_",
          };
          java.lang.String info =
              "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\f";
          return newMessageInfo(DEFAULT_INSTANCE, info, objects);
      }
      // fall through
      case GET_DEFAULT_INSTANCE: {
        return DEFAULT_INSTANCE;
      }
      case GET_PARSER: {
        com.google.protobuf.Parser parser = PARSER;
        if (parser == null) {
          synchronized (com.grpc.health.v1.HealthCheckResponse.class) {
            parser = PARSER;
            if (parser == null) {
              parser =
                  new DefaultInstanceBasedParser(
                      DEFAULT_INSTANCE);
              PARSER = parser;
            }
          }
        }
        return parser;
    }
    case GET_MEMOIZED_IS_INITIALIZED: {
      return (byte) 1;
    }
    case SET_MEMOIZED_IS_INITIALIZED: {
      return null;
    }
    }
    throw new UnsupportedOperationException();
  }


  // @@protoc_insertion_point(class_scope:grpc.health.v1.HealthCheckResponse)
  private static final com.grpc.health.v1.HealthCheckResponse DEFAULT_INSTANCE;
  static {
    HealthCheckResponse defaultInstance = new HealthCheckResponse();
    // New instances are implicitly immutable so no need to make
    // immutable.
    DEFAULT_INSTANCE = defaultInstance;
    com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
      HealthCheckResponse.class, defaultInstance);
  }

  public static com.grpc.health.v1.HealthCheckResponse getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static volatile com.google.protobuf.Parser PARSER;

  public static com.google.protobuf.Parser parser() {
    return DEFAULT_INSTANCE.getParserForType();
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy