com.salesforce.eventbus.protobuf.ReplayPreset Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: pubsub_api.proto
package com.salesforce.eventbus.protobuf;
/**
*
*
* Supported subscription replay start values.
* By default, the subscription will start at the tip of the stream if ReplayPreset is not specified.
*
*
* Protobuf enum {@code eventbus.v1.ReplayPreset}
*/
public enum ReplayPreset
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Start the subscription at the tip of the stream.
*
*
* LATEST = 0;
*/
LATEST(0),
/**
*
* Start the subscription at the earliest point in the stream.
*
*
* EARLIEST = 1;
*/
EARLIEST(1),
/**
*
* Start the subscription after a custom point in the stream. This must be set with a valid replay_id in the FetchRequest.
*
*
* CUSTOM = 2;
*/
CUSTOM(2),
UNRECOGNIZED(-1),
;
/**
*
* Start the subscription at the tip of the stream.
*
*
* LATEST = 0;
*/
public static final int LATEST_VALUE = 0;
/**
*
* Start the subscription at the earliest point in the stream.
*
*
* EARLIEST = 1;
*/
public static final int EARLIEST_VALUE = 1;
/**
*
* Start the subscription after a custom point in the stream. This must be set with a valid replay_id in the FetchRequest.
*
*
* CUSTOM = 2;
*/
public static final int CUSTOM_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;
}
/**
* @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 ReplayPreset 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 ReplayPreset forNumber(int value) {
switch (value) {
case 0: return LATEST;
case 1: return EARLIEST;
case 2: return CUSTOM;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ReplayPreset> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ReplayPreset findValueByNumber(int number) {
return ReplayPreset.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 com.salesforce.eventbus.protobuf.PubSubProto.getDescriptor().getEnumTypes().get(1);
}
private static final ReplayPreset[] VALUES = values();
public static ReplayPreset 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 ReplayPreset(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:eventbus.v1.ReplayPreset)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy