test12.proto 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. // Protocol Buffers - Google's data interchange format
  2. // Copyright 2008 Google Inc. All rights reserved.
  3. // https://developers.google.com/protocol-buffers/
  4. //
  5. // Redistribution and use in source and binary forms, with or without
  6. // modification, are permitted provided that the following conditions are
  7. // met:
  8. //
  9. // * Redistributions of source code must retain the above copyright
  10. // notice, this list of conditions and the following disclaimer.
  11. // * Redistributions in binary form must reproduce the above
  12. // copyright notice, this list of conditions and the following disclaimer
  13. // in the documentation and/or other materials provided with the
  14. // distribution.
  15. // * Neither the name of Google Inc. nor the names of its
  16. // contributors may be used to endorse or promote products derived from
  17. // this software without specific prior written permission.
  18. //
  19. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  22. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  23. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  24. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  25. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  26. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  27. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  28. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  29. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. syntax = "proto2";
  31. package jspb.circulartest;
  32. message MessageField1 {
  33. optional int32 a = 1;
  34. optional MessageField2 b = 2;
  35. }
  36. message MessageField2 {
  37. optional int32 a = 1;
  38. optional MessageField1 b = 2;
  39. }
  40. message RepeatedMessageField1 {
  41. optional int32 a = 1;
  42. optional RepeatedMessageField2 b = 2;
  43. }
  44. message RepeatedMessageField2 {
  45. optional int32 a = 1;
  46. repeated RepeatedMessageField1 b = 2;
  47. }
  48. message MapField1 {
  49. optional int32 a = 1;
  50. optional MapField2 b = 2;
  51. }
  52. message MapField2 {
  53. optional int32 a = 1;
  54. map<int32, MapField1> b = 2;
  55. }
  56. message NestedMessage1 {
  57. optional NestedMessage2 b = 2;
  58. message NestedNestedMessage {
  59. optional int32 a = 1;
  60. }
  61. }
  62. message NestedMessage2 {
  63. optional int32 a = 1;
  64. optional NestedMessage1.NestedNestedMessage b = 2;
  65. }
  66. message NestedEnum1 {
  67. optional NestedEnum2 b = 2;
  68. enum NestedNestedEnum {
  69. UNDEFINED = 0;
  70. VALUE_1 = 1;
  71. }
  72. }
  73. message NestedEnum2 {
  74. optional int32 a = 1;
  75. optional NestedEnum1.NestedNestedEnum b = 2;
  76. }
  77. message ExtensionContainingType1 {
  78. optional int32 a = 1;
  79. optional ExtensionContainingType2 b = 2;
  80. extensions 99 to 100;
  81. }
  82. message ExtensionContainingType2 {
  83. optional int32 a = 1;
  84. extend ExtensionContainingType1 {
  85. optional int32 c = 99;
  86. }
  87. }
  88. message ExtensionField1 {
  89. optional int32 a = 1;
  90. optional ExtensionField2 b = 2;
  91. }
  92. message ExtensionField2 {
  93. optional int32 a = 1;
  94. extend ExtensionField3 {
  95. optional ExtensionField1 c = 99;
  96. }
  97. }
  98. message ExtensionField3 {
  99. extensions 99 to 100;
  100. }