unittest_extras_full.proto 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // Additional options required for C# generation. File from copyright
  2. // line onwards is as per original distribution.
  3. import "google/protobuf/csharp_options.proto";
  4. option (google.protobuf.csharp_file_options).namespace = "Google.ProtocolBuffers.TestProtos";
  5. option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestExtrasFullProtoFile";
  6. package protobuf_unittest_extra;
  7. option optimize_for = CODE_SIZE;
  8. option java_package = "com.google.protobuf";
  9. message TestInteropPerson {
  10. required string name = 1;
  11. required int32 id = 2;
  12. optional string email = 3;
  13. repeated int32 codes = 10 [packed=true];
  14. enum PhoneType {
  15. MOBILE = 0;
  16. HOME = 1;
  17. WORK = 2;
  18. }
  19. message PhoneNumber {
  20. required string number = 1;
  21. optional PhoneType type = 2 [default = HOME];
  22. }
  23. repeated PhoneNumber phone = 4;
  24. repeated group Addresses = 5 {
  25. required string address = 1;
  26. optional string address2 = 2;
  27. required string city = 3;
  28. required string state = 4;
  29. required fixed32 zip = 5;
  30. }
  31. extensions 100 to 199;
  32. }
  33. message TestInteropEmployeeId {
  34. required string number = 1;
  35. }
  36. extend TestInteropPerson {
  37. required TestInteropEmployeeId employee_id = 126;
  38. }
  39. message TestMissingFieldsA {
  40. required string name = 1;
  41. required int32 id = 2;
  42. optional string email = 3;
  43. message SubA {
  44. required int32 count = 5;
  45. repeated string values = 6;
  46. }
  47. optional SubA testA = 11;
  48. }
  49. message TestMissingFieldsB {
  50. required string name = 1;
  51. required int32 id = 2;
  52. optional string website = 4;
  53. message SubB {
  54. repeated string values = 7;
  55. }
  56. optional SubB testB = 12;
  57. }