test.proto 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. // Copyright 2018 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. syntax = "proto3";
  5. package google.golang.org.proto3_20180125;
  6. option go_package = "google.golang.org/protobuf/internal/testprotos/legacy/proto3.v1.0.0-20180125-92554152";
  7. enum SiblingEnum {
  8. ALPHA = 0;
  9. BRAVO = 10;
  10. CHARLIE = 200;
  11. }
  12. message SiblingMessage {
  13. string f1 = 1;
  14. repeated string f2 = 2;
  15. Message f3 = 3;
  16. }
  17. message Message {
  18. enum ChildEnum {
  19. ALPHA = 0;
  20. BRAVO = 1;
  21. CHARLIE = 2;
  22. }
  23. message ChildMessage {
  24. string f1 = 1;
  25. repeated string f2 = 2;
  26. Message f3 = 3;
  27. }
  28. // Optional fields.
  29. bool optional_bool = 100;
  30. int32 optional_int32 = 101;
  31. sint32 optional_sint32 = 102;
  32. uint32 optional_uint32 = 103;
  33. int64 optional_int64 = 104;
  34. sint64 optional_sint64 = 105;
  35. uint64 optional_uint64 = 106;
  36. fixed32 optional_fixed32 = 107;
  37. sfixed32 optional_sfixed32 = 108;
  38. float optional_float = 109;
  39. fixed64 optional_fixed64 = 110;
  40. sfixed64 optional_sfixed64 = 111;
  41. double optional_double = 112;
  42. string optional_string = 113;
  43. bytes optional_bytes = 114;
  44. ChildEnum optional_child_enum = 115;
  45. ChildMessage optional_child_message = 116;
  46. SiblingEnum optional_sibling_enum = 117;
  47. SiblingMessage optional_sibling_message = 118;
  48. // Repeated fields.
  49. repeated bool repeated_bool = 200;
  50. repeated int32 repeated_int32 = 201;
  51. repeated sint32 repeated_sint32 = 202;
  52. repeated uint32 repeated_uint32 = 203;
  53. repeated int64 repeated_int64 = 204;
  54. repeated sint64 repeated_sint64 = 205;
  55. repeated uint64 repeated_uint64 = 206;
  56. repeated fixed32 repeated_fixed32 = 207;
  57. repeated sfixed32 repeated_sfixed32 = 208;
  58. repeated float repeated_float = 209;
  59. repeated fixed64 repeated_fixed64 = 210;
  60. repeated sfixed64 repeated_sfixed64 = 211;
  61. repeated double repeated_double = 212;
  62. repeated string repeated_string = 213;
  63. repeated bytes repeated_bytes = 214;
  64. repeated ChildEnum repeated_child_enum = 215;
  65. repeated ChildMessage repeated_child_message = 216;
  66. repeated SiblingEnum repeated_sibling_enum = 217;
  67. repeated SiblingMessage repeated_sibling_message = 218;
  68. // Map fields.
  69. map<bool, bool> map_bool_bool = 300;
  70. map<bool, int32> map_bool_int32 = 301;
  71. map<bool, sint32> map_bool_sint32 = 302;
  72. map<bool, uint32> map_bool_uint32 = 303;
  73. map<bool, int64> map_bool_int64 = 304;
  74. map<bool, sint64> map_bool_sint64 = 305;
  75. map<bool, uint64> map_bool_uint64 = 306;
  76. map<bool, fixed32> map_bool_fixed32 = 307;
  77. map<bool, sfixed32> map_bool_sfixed32 = 308;
  78. map<bool, float> map_bool_float = 309;
  79. map<bool, fixed64> map_bool_fixed64 = 310;
  80. map<bool, sfixed64> map_bool_sfixed64 = 311;
  81. map<bool, double> map_bool_double = 312;
  82. map<bool, string> map_bool_string = 313;
  83. map<bool, bytes> map_bool_bytes = 314;
  84. map<bool, ChildEnum> map_bool_child_enum = 315;
  85. map<bool, ChildMessage> map_bool_child_message = 316;
  86. map<bool, SiblingEnum> map_bool_sibling_enum = 317;
  87. map<bool, SiblingMessage> map_bool_sibling_message = 318;
  88. map<int32, bool> map_int32_bool = 319;
  89. map<sint32, bool> map_sint32_bool = 320;
  90. map<uint32, bool> map_uint32_bool = 321;
  91. map<int64, bool> map_int64_bool = 322;
  92. map<sint64, bool> map_sint64_bool = 323;
  93. map<uint64, bool> map_uint64_bool = 324;
  94. map<fixed32, bool> map_fixed32_bool = 325;
  95. map<string, bool> map_string_bool = 326;
  96. // Oneof fields.
  97. oneof oneof_union {
  98. bool oneof_bool = 400;
  99. int32 oneof_int32 = 401;
  100. sint32 oneof_sint32 = 402;
  101. uint32 oneof_uint32 = 403;
  102. int64 oneof_int64 = 404;
  103. sint64 oneof_sint64 = 405;
  104. uint64 oneof_uint64 = 406;
  105. fixed32 oneof_fixed32 = 407;
  106. sfixed32 oneof_sfixed32 = 408;
  107. float oneof_float = 409;
  108. fixed64 oneof_fixed64 = 410;
  109. sfixed64 oneof_sfixed64 = 411;
  110. double oneof_double = 412;
  111. string oneof_string = 413;
  112. bytes oneof_bytes = 414;
  113. ChildEnum oneof_child_enum = 415;
  114. ChildMessage oneof_child_message = 416;
  115. SiblingEnum oneof_sibling_enum = 417;
  116. SiblingMessage oneof_sibling_message = 418;
  117. string oneof_string1 = 419;
  118. string oneof_string2 = 420;
  119. string oneof_string3 = 421;
  120. }
  121. }