io.envoyproxy.envoy.data.cluster.v2alpha.Action Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/data/cluster/v2alpha/outlier_detection_event.proto
package io.envoyproxy.envoy.data.cluster.v2alpha;
/**
*
* Represents possible action applied to upstream host
*
*
* Protobuf enum {@code envoy.data.cluster.v2alpha.Action}
*/
public enum Action
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* In case host was excluded from service
*
*
* EJECT = 0;
*/
EJECT(0),
/**
*
* In case host was brought back into service
*
*
* UNEJECT = 1;
*/
UNEJECT(1),
UNRECOGNIZED(-1),
;
/**
*
* In case host was excluded from service
*
*
* EJECT = 0;
*/
public static final int EJECT_VALUE = 0;
/**
*
* In case host was brought back into service
*
*
* UNEJECT = 1;
*/
public static final int UNEJECT_VALUE = 1;
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 Action valueOf(int value) {
return forNumber(value);
}
public static Action forNumber(int value) {
switch (value) {
case 0: return EJECT;
case 1: return UNEJECT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Action> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Action findValueByNumber(int number) {
return Action.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 io.envoyproxy.envoy.data.cluster.v2alpha.OutlierDetectionEventProto.getDescriptor().getEnumTypes().get(1);
}
private static final Action[] VALUES = values();
public static Action 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 Action(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:envoy.data.cluster.v2alpha.Action)
}