grpc.extensions.Extensions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client-protos-jvm Show documentation
Show all versions of client-protos-jvm Show documentation
Kotlin protobuf protocols for the JVM that define the Momento gRPC wire format
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: extensions.proto
package grpc.extensions;
public final class Extensions {
private Extensions() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
registry.add(grpc.extensions.Extensions.retrySemantic);
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
*
* A hint so you can decide a little more in the abstract "can this be retried?""
*
*
* Protobuf enum {@code RetrySemantic}
*/
public enum RetrySemantic
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Never retry this message without telling the user. (you should infer this as the default)
*
*
* NotRetryable = 0;
*/
NotRetryable(0),
/**
*
* You can retry this without surfacing an error to the user.
*
*
* Retryable = 1;
*/
Retryable(1),
UNRECOGNIZED(-1),
;
/**
*
* Never retry this message without telling the user. (you should infer this as the default)
*
*
* NotRetryable = 0;
*/
public static final int NotRetryable_VALUE = 0;
/**
*
* You can retry this without surfacing an error to the user.
*
*
* Retryable = 1;
*/
public static final int Retryable_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;
}
/**
* @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 RetrySemantic 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 RetrySemantic forNumber(int value) {
switch (value) {
case 0: return NotRetryable;
case 1: return Retryable;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
RetrySemantic> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public RetrySemantic findValueByNumber(int number) {
return RetrySemantic.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 grpc.extensions.Extensions.getDescriptor().getEnumTypes().get(0);
}
private static final RetrySemantic[] VALUES = values();
public static RetrySemantic 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 RetrySemantic(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:RetrySemantic)
}
public static final int RETRY_SEMANTIC_FIELD_NUMBER = 50000;
/**
*
* Can this message be re-driven without an error?
*
*
* extend .google.protobuf.MessageOptions { ... }
*/
public static final
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.protobuf.DescriptorProtos.MessageOptions,
grpc.extensions.Extensions.RetrySemantic> retrySemantic = com.google.protobuf.GeneratedMessage
.newFileScopedGeneratedExtension(
grpc.extensions.Extensions.RetrySemantic.class,
null);
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\020extensions.proto\032 google/protobuf/desc" +
"riptor.proto*0\n\rRetrySemantic\022\020\n\014NotRetr" +
"yable\020\000\022\r\n\tRetryable\020\001:I\n\016retry_semantic" +
"\022\037.google.protobuf.MessageOptions\030\320\206\003 \001(" +
"\0162\016.RetrySemanticB_\n\017grpc.extensionsZ0gi" +
"thub.com/momentohq/client-sdk-go;client_" +
"sdk_go\252\002\031Momento.Protos.Extensionsb\006prot" +
"o3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.DescriptorProtos.getDescriptor(),
});
retrySemantic.internalInit(descriptor.getExtensions().get(0));
com.google.protobuf.DescriptorProtos.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}