unittest_runtime_proto3.proto 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. // Protocol Buffers - Google's data interchange format
  2. // Copyright 2015 Google Inc. All rights reserved.
  3. //
  4. // Redistribution and use in source and binary forms, with or without
  5. // modification, are permitted provided that the following conditions are
  6. // met:
  7. //
  8. // * Redistributions of source code must retain the above copyright
  9. // notice, this list of conditions and the following disclaimer.
  10. // * Redistributions in binary form must reproduce the above
  11. // copyright notice, this list of conditions and the following disclaimer
  12. // in the documentation and/or other materials provided with the
  13. // distribution.
  14. // * Neither the name of Google Inc. nor the names of its
  15. // contributors may be used to endorse or promote products derived from
  16. // this software without specific prior written permission.
  17. //
  18. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  22. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  23. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  24. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  25. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  26. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  28. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. syntax = "proto3";
  30. package protobuf_unittest;
  31. message Message3 {
  32. enum Enum {
  33. FOO = 0;
  34. BAR = 1;
  35. BAZ = 2;
  36. EXTRA_3 = 30;
  37. }
  38. int32 optional_int32 = 1;
  39. int64 optional_int64 = 2;
  40. uint32 optional_uint32 = 3;
  41. uint64 optional_uint64 = 4;
  42. sint32 optional_sint32 = 5;
  43. sint64 optional_sint64 = 6;
  44. fixed32 optional_fixed32 = 7;
  45. fixed64 optional_fixed64 = 8;
  46. sfixed32 optional_sfixed32 = 9;
  47. sfixed64 optional_sfixed64 = 10;
  48. float optional_float = 11;
  49. double optional_double = 12;
  50. bool optional_bool = 13;
  51. string optional_string = 14;
  52. bytes optional_bytes = 15;
  53. // No 'group' in proto3.
  54. Message3 optional_message = 18;
  55. Enum optional_enum = 19;
  56. repeated int32 repeated_int32 = 31;
  57. repeated int64 repeated_int64 = 32;
  58. repeated uint32 repeated_uint32 = 33;
  59. repeated uint64 repeated_uint64 = 34;
  60. repeated sint32 repeated_sint32 = 35;
  61. repeated sint64 repeated_sint64 = 36;
  62. repeated fixed32 repeated_fixed32 = 37;
  63. repeated fixed64 repeated_fixed64 = 38;
  64. repeated sfixed32 repeated_sfixed32 = 39;
  65. repeated sfixed64 repeated_sfixed64 = 40;
  66. repeated float repeated_float = 41;
  67. repeated double repeated_double = 42;
  68. repeated bool repeated_bool = 43;
  69. repeated string repeated_string = 44;
  70. repeated bytes repeated_bytes = 45;
  71. // No 'group' in proto3.
  72. repeated Message3 repeated_message = 48;
  73. repeated Enum repeated_enum = 49;
  74. repeated Enum repeated_packed_enum = 50 [packed=true];
  75. oneof o {
  76. int32 oneof_int32 = 51;
  77. int64 oneof_int64 = 52;
  78. uint32 oneof_uint32 = 53;
  79. uint64 oneof_uint64 = 54;
  80. sint32 oneof_sint32 = 55;
  81. sint64 oneof_sint64 = 56;
  82. fixed32 oneof_fixed32 = 57;
  83. fixed64 oneof_fixed64 = 58;
  84. sfixed32 oneof_sfixed32 = 59;
  85. sfixed64 oneof_sfixed64 = 60;
  86. float oneof_float = 61;
  87. double oneof_double = 62;
  88. bool oneof_bool = 63;
  89. string oneof_string = 64;
  90. bytes oneof_bytes = 65;
  91. // No 'group' in proto3.
  92. Message3 oneof_message = 68;
  93. Enum oneof_enum = 69;
  94. }
  95. }