How to define generic message in proto file.
Eg :
message GenericResponse
{
bool status = 1;
Foo foo= 2;
Bar bar = 3;
Baz baz = 4;
}
Instead of above mentioned protocol I need following protocol.
message GenericResponse
{
bool status = 1;
google.protobuf.Message response = 2;
}
I need to set Foo
or Bar
or Baz
values in response
.
Is there any way to achieve this ?