My proto file has enum defined. Here's an example
package mypackage;
enum Direction {
EAST = 1;
WEST = 2;
NORTH = 3;
SOUTH = 4;
}
message SomeActionRequest {
Direction direction = 1;
}
service SomeService {
rpc SomeAction (SomeActionRequest) returns (...) { }
}
In the implementation of my service method (SomeAction), what is the best way to validate that the input enum value (direction) is a valid enum?