You can have conditional protobuf fields / messages.
Checkout:
- Any: https://developers.google.com/protocol-buffers/docs/proto3#a...
- OneOf: https://developers.google.com/protocol-buffers/docs/proto3#o...
I believe Any is the equivalent to having a proto in format of:
```
message MyMessage {
string type = 1;
bytes data = 2;
}```