My project assumes Proto3 Objects as input. But, sometimes users provide Proto2 Object as input. In those cases, we want to throw exception as our code works with only Proto3 classes.
How can we check if input Protobuf object provided is Proto2 or Proto3 ?
Checking for method presence or default values is kind of a Hack. Is there any proper method to check version of Protobuf Object ?