Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
oneof vs enum
Prefer to have oneof with a string field describing the specific type of oneof.
message A { // A here is the "interface".
string name = 1;
string a_type = 2; // Or …