| OLD | NEW |
| (Empty) | |
| 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 |
| 31 syntax = "proto3"; |
| 32 |
| 33 package google.protobuf.testing; |
| 34 |
| 35 import "google/protobuf/any.proto"; |
| 36 import "google/protobuf/struct.proto"; |
| 37 import "google/protobuf/wrappers.proto"; |
| 38 |
| 39 message DefaultValueTestCases { |
| 40 DoubleMessage empty_double = 1; |
| 41 DoubleMessage double_with_default_value = 2; |
| 42 DoubleMessage double_with_nondefault_value = 3; |
| 43 DoubleMessage repeated_double = 4; |
| 44 DoubleMessage nested_message = 5; |
| 45 DoubleMessage repeated_nested_message = 6; |
| 46 DoubleMessage double_message_with_oneof = 7; |
| 47 StructMessage empty_struct = 201; |
| 48 StructMessage empty_struct2 = 202; |
| 49 StructMessage struct_with_null_value = 203; |
| 50 StructMessage struct_with_values = 204; |
| 51 StructMessage struct_with_nested_struct = 205; |
| 52 StructMessage struct_with_nested_list = 206; |
| 53 StructMessage struct_with_list_of_nulls = 207; |
| 54 StructMessage struct_with_list_of_lists = 208; |
| 55 StructMessage struct_with_list_of_structs = 209; |
| 56 google.protobuf.Struct top_level_struct = 210; |
| 57 ValueMessage value_wrapper_simple = 212; |
| 58 ValueMessage value_wrapper_with_struct = 213; |
| 59 ValueMessage value_wrapper_with_list = 214; |
| 60 ListValueMessage list_value_wrapper = 215; |
| 61 google.protobuf.Value top_level_value_simple = 216; |
| 62 google.protobuf.Value top_level_value_with_struct = 217; |
| 63 google.protobuf.Value top_level_value_with_list = 218; |
| 64 google.protobuf.ListValue top_level_listvalue = 219; |
| 65 AnyMessage empty_any = 301; |
| 66 AnyMessage type_only_any = 302; |
| 67 AnyMessage recursive_any = 303; |
| 68 AnyMessage any_with_message_value = 304; |
| 69 AnyMessage any_with_nested_message = 305; |
| 70 AnyMessage any_with_message_containing_map = 306; |
| 71 AnyMessage any_with_message_containing_struct = 307; |
| 72 google.protobuf.Any top_level_any = 308; |
| 73 StringtoIntMap empty_map = 401; |
| 74 StringtoIntMap string_to_int = 402; |
| 75 IntToStringMap int_to_string = 403; |
| 76 MixedMap mixed1 = 404; |
| 77 MixedMap2 mixed2 = 405; |
| 78 MixedMap2 empty_mixed2 = 406; |
| 79 MessageMap map_of_objects = 407; |
| 80 MixedMap mixed_empty = 408; |
| 81 MessageMap message_map_empty = 409; |
| 82 DoubleValueMessage double_value = 501; |
| 83 DoubleValueMessage double_value_default = 502; |
| 84 } |
| 85 |
| 86 message DoubleMessage { |
| 87 double double_value = 1; |
| 88 repeated double repeated_double = 2; |
| 89 DoubleMessage nested_message = 3; |
| 90 repeated DoubleMessage repeated_nested_message = 4; |
| 91 google.protobuf.DoubleValue double_wrapper = 100; |
| 92 oneof value { |
| 93 string str_value = 112; |
| 94 int64 num_value = 113; |
| 95 } |
| 96 } |
| 97 |
| 98 message StructMessage { |
| 99 google.protobuf.Struct struct = 1; |
| 100 } |
| 101 |
| 102 message ValueMessage { |
| 103 google.protobuf.Value value = 1; |
| 104 } |
| 105 |
| 106 message ListValueMessage { |
| 107 google.protobuf.ListValue shopping_list = 1; |
| 108 } |
| 109 message RequestMessage { |
| 110 string content = 1; |
| 111 } |
| 112 |
| 113 // A test service. |
| 114 service DefaultValueTestService { |
| 115 // A test method. |
| 116 rpc Call(RequestMessage) returns (DefaultValueTestCases); |
| 117 } |
| 118 |
| 119 message AnyMessage { |
| 120 google.protobuf.Any any = 1; |
| 121 AnyData data = 2; |
| 122 } |
| 123 |
| 124 message AnyData { |
| 125 int32 attr = 1; |
| 126 string str = 2; |
| 127 repeated string msgs = 3; |
| 128 AnyData nested_data = 4; |
| 129 map<string, string> map_data = 7; |
| 130 google.protobuf.Struct struct_data = 8; |
| 131 repeated AnyData repeated_data = 9; |
| 132 } |
| 133 |
| 134 message StringtoIntMap { |
| 135 map<string, int32> map = 1; |
| 136 } |
| 137 |
| 138 message IntToStringMap { |
| 139 map<int32, string> map = 1; |
| 140 } |
| 141 |
| 142 message MixedMap { |
| 143 string msg = 1; |
| 144 map<string, float> map = 2; |
| 145 int32 int_value = 3; |
| 146 } |
| 147 |
| 148 message MixedMap2 { |
| 149 enum E { |
| 150 E0 = 0; |
| 151 E1 = 1; |
| 152 E2 = 2; |
| 153 E3 = 3; |
| 154 } |
| 155 map<int32, bool> map = 1; |
| 156 E ee = 2; |
| 157 string msg = 4; |
| 158 } |
| 159 |
| 160 message MessageMap { |
| 161 message M { |
| 162 int32 inner_int = 1; |
| 163 string inner_text = 2; |
| 164 } |
| 165 map<string, M> map = 1; |
| 166 } |
| 167 |
| 168 message DoubleValueMessage { |
| 169 google.protobuf.DoubleValue double = 1; |
| 170 } |
| OLD | NEW |