com.google.protobuf.Syntax Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protobuf-javalite Show documentation
Show all versions of protobuf-javalite Show documentation
Lite version of Protocol Buffers library. This version is optimized for code size, but does
not guarantee API/ABI stability.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/type.proto
// Protobuf Java Version: 3.25.0
package com.google.protobuf;
/**
* Protobuf enum {@code google.protobuf.Syntax}
*/
public enum Syntax
implements com.google.protobuf.Internal.EnumLite {
/**
* SYNTAX_PROTO2 = 0;
*/
SYNTAX_PROTO2(0),
/**
* SYNTAX_PROTO3 = 1;
*/
SYNTAX_PROTO3(1),
/**
* SYNTAX_EDITIONS = 2;
*/
SYNTAX_EDITIONS(2),
UNRECOGNIZED(-1),
;
/**
* SYNTAX_PROTO2 = 0;
*/
public static final int SYNTAX_PROTO2_VALUE = 0;
/**
* SYNTAX_PROTO3 = 1;
*/
public static final int SYNTAX_PROTO3_VALUE = 1;
/**
* SYNTAX_EDITIONS = 2;
*/
public static final int SYNTAX_EDITIONS_VALUE = 2;
@java.lang.Override
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 number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Syntax valueOf(int value) {
return forNumber(value);
}
public static Syntax forNumber(int value) {
switch (value) {
case 0: return SYNTAX_PROTO2;
case 1: return SYNTAX_PROTO3;
case 2: return SYNTAX_EDITIONS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Syntax> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
@java.lang.Override
public Syntax findValueByNumber(int number) {
return Syntax.forNumber(number);
}
};
public static com.google.protobuf.Internal.EnumVerifier
internalGetVerifier() {
return SyntaxVerifier.INSTANCE;
}
private static final class SyntaxVerifier implements
com.google.protobuf.Internal.EnumVerifier {
static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new SyntaxVerifier();
@java.lang.Override
public boolean isInRange(int number) {
return Syntax.forNumber(number) != null;
}
};
private final int value;
private Syntax(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.protobuf.Syntax)
}