我是 protobuf 使用的新手。
我计划编写带有枚举的 protobuf def 。
有什么方法可以在其中提供 id、值和描述。
编译后我希望生成的枚举应该与下面的示例等效
enum Sample{
W(0, "W"), P(0, "P"), C(0, "C"), B(0, "B")
private final int id;
private final String value;
private Status(int id, String value) {
this.id= id;
this.value = value;
}
}
Run Code Online (Sandbox Code Playgroud)
非常感谢任何帮助。