extensions.proto 492 B

12345678910111213141516171819
  1. syntax = "proto2";
  2. import 'alltypes.proto';
  3. extend AllTypes {
  4. optional int32 AllTypes_extensionfield1 = 255 [default = 5];
  5. }
  6. message ExtensionMessage {
  7. extend AllTypes {
  8. optional ExtensionMessage AllTypes_extensionfield2 = 254;
  9. // required ExtensionMessage AllTypes_extensionfield3 = 253; // No longer allowed by protobuf 3
  10. repeated ExtensionMessage AllTypes_extensionfield4 = 252;
  11. }
  12. required string test1 = 1;
  13. required int32 test2 = 2;
  14. }