// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/iot/v1/resources.proto

package com.google.cloud.iot.v1;

/**
 *
 *
 * <pre>
 * Indicates whether DeviceService (HTTP) is enabled or disabled for the
 * registry. See the field description for details.
 * </pre>
 *
 * Protobuf enum {@code google.cloud.iot.v1.HttpState}
 */
public enum HttpState implements com.google.protobuf.ProtocolMessageEnum {
  /**
   *
   *
   * <pre>
   * No HTTP state specified. If not specified, DeviceService will be
   * enabled by default.
   * </pre>
   *
   * <code>HTTP_STATE_UNSPECIFIED = 0;</code>
   */
  HTTP_STATE_UNSPECIFIED(0),
  /**
   *
   *
   * <pre>
   * Enables DeviceService (HTTP) service for the registry.
   * </pre>
   *
   * <code>HTTP_ENABLED = 1;</code>
   */
  HTTP_ENABLED(1),
  /**
   *
   *
   * <pre>
   * Disables DeviceService (HTTP) service for the registry.
   * </pre>
   *
   * <code>HTTP_DISABLED = 2;</code>
   */
  HTTP_DISABLED(2),
  UNRECOGNIZED(-1),
  ;

  /**
   *
   *
   * <pre>
   * No HTTP state specified. If not specified, DeviceService will be
   * enabled by default.
   * </pre>
   *
   * <code>HTTP_STATE_UNSPECIFIED = 0;</code>
   */
  public static final int HTTP_STATE_UNSPECIFIED_VALUE = 0;
  /**
   *
   *
   * <pre>
   * Enables DeviceService (HTTP) service for the registry.
   * </pre>
   *
   * <code>HTTP_ENABLED = 1;</code>
   */
  public static final int HTTP_ENABLED_VALUE = 1;
  /**
   *
   *
   * <pre>
   * Disables DeviceService (HTTP) service for the registry.
   * </pre>
   *
   * <code>HTTP_DISABLED = 2;</code>
   */
  public static final int HTTP_DISABLED_VALUE = 2;

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

  /** @deprecated Use {@link #forNumber(int)} instead. */
  @java.lang.Deprecated
  public static HttpState valueOf(int value) {
    return forNumber(value);
  }

  public static HttpState forNumber(int value) {
    switch (value) {
      case 0:
        return HTTP_STATE_UNSPECIFIED;
      case 1:
        return HTTP_ENABLED;
      case 2:
        return HTTP_DISABLED;
      default:
        return null;
    }
  }

  public static com.google.protobuf.Internal.EnumLiteMap<HttpState> internalGetValueMap() {
    return internalValueMap;
  }

  private static final com.google.protobuf.Internal.EnumLiteMap<HttpState> internalValueMap =
      new com.google.protobuf.Internal.EnumLiteMap<HttpState>() {
        public HttpState findValueByNumber(int number) {
          return HttpState.forNumber(number);
        }
      };

  public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
    return getDescriptor().getValues().get(ordinal());
  }

  public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
    return getDescriptor();
  }

  public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
    return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(1);
  }

  private static final HttpState[] VALUES = values();

  public static HttpState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
    if (desc.getType() != getDescriptor()) {
      throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
    }
    if (desc.getIndex() == -1) {
      return UNRECOGNIZED;
    }
    return VALUES[desc.getIndex()];
  }

  private final int value;

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

  // @@protoc_insertion_point(enum_scope:google.cloud.iot.v1.HttpState)
}
