Google Protocol Buffers, how to handle multiple message-Types?
Is it possible to get the Type of the serialized Protocol Buffer message? I have this example option java_outer_classname="ProtoUser"; message User { required int32 id = 1; required string name = 2; required string firstname = 3; required string lastname = 4; required string ssn= 5; } message Address { required int32 id = 1; required string country = 2 [default = "US"];; optional string state = 3; optional string city = 4; optional string street = 5; optional string zip = 6; } In Java I have this code Address addr = ProtoUser.Address.newBuilder().setCity("Weston").setCountry("USA").setId(1)