ServiceSelector.java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: sigstore_trustroot.proto
// Protobuf Java Version: 4.30.2
package dev.sigstore.proto.trustroot.v1;
/**
* <pre>
* ServiceSelector specifies how a client SHOULD select a set of
* Services to connect to. A client SHOULD throw an error if
* the value is SERVICE_SELECTOR_UNDEFINED.
* </pre>
*
* Protobuf enum {@code dev.sigstore.trustroot.v1.ServiceSelector}
*/
@javax.annotation.Generated(value="protoc", comments="annotations:ServiceSelector.java.pb.meta")
public enum ServiceSelector
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <code>SERVICE_SELECTOR_UNDEFINED = 0;</code>
*/
SERVICE_SELECTOR_UNDEFINED(0),
/**
* <pre>
* Clients SHOULD select all Services based on supported API version
* and validity window.
* </pre>
*
* <code>ALL = 1;</code>
*/
ALL(1),
/**
* <pre>
* Clients SHOULD select one Service based on supported API version
* and validity window. It is up to the client implementation to
* decide how to select the Service, e.g. random or round-robin.
* </pre>
*
* <code>ANY = 2;</code>
*/
ANY(2),
/**
* <pre>
* Clients SHOULD select a specific number of Services based on
* supported API version and validity window, using the provided
* `count`. It is up to the client implementation to decide how to
* select the Service, e.g. random or round-robin.
* </pre>
*
* <code>EXACT = 3;</code>
*/
EXACT(3),
UNRECOGNIZED(-1),
;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 30,
/* patch= */ 2,
/* suffix= */ "",
ServiceSelector.class.getName());
}
/**
* <code>SERVICE_SELECTOR_UNDEFINED = 0;</code>
*/
public static final int SERVICE_SELECTOR_UNDEFINED_VALUE = 0;
/**
* <pre>
* Clients SHOULD select all Services based on supported API version
* and validity window.
* </pre>
*
* <code>ALL = 1;</code>
*/
public static final int ALL_VALUE = 1;
/**
* <pre>
* Clients SHOULD select one Service based on supported API version
* and validity window. It is up to the client implementation to
* decide how to select the Service, e.g. random or round-robin.
* </pre>
*
* <code>ANY = 2;</code>
*/
public static final int ANY_VALUE = 2;
/**
* <pre>
* Clients SHOULD select a specific number of Services based on
* supported API version and validity window, using the provided
* `count`. It is up to the client implementation to decide how to
* select the Service, e.g. random or round-robin.
* </pre>
*
* <code>EXACT = 3;</code>
*/
public static final int EXACT_VALUE = 3;
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 numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ServiceSelector valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ServiceSelector forNumber(int value) {
switch (value) {
case 0: return SERVICE_SELECTOR_UNDEFINED;
case 1: return ALL;
case 2: return ANY;
case 3: return EXACT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<ServiceSelector>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ServiceSelector> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<ServiceSelector>() {
public ServiceSelector findValueByNumber(int number) {
return ServiceSelector.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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 dev.sigstore.proto.trustroot.v1.TrustRootProto.getDescriptor().getEnumTypes().get(0);
}
private static final ServiceSelector[] VALUES = values();
public static ServiceSelector 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 ServiceSelector(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:dev.sigstore.trustroot.v1.ServiceSelector)
}