1ffe3c632Sopenharmony_ci// Protocol Buffers - Google's data interchange format
2ffe3c632Sopenharmony_ci// Copyright 2015 Google Inc.  All rights reserved.
3ffe3c632Sopenharmony_ci//
4ffe3c632Sopenharmony_ci// Redistribution and use in source and binary forms, with or without
5ffe3c632Sopenharmony_ci// modification, are permitted provided that the following conditions are
6ffe3c632Sopenharmony_ci// met:
7ffe3c632Sopenharmony_ci//
8ffe3c632Sopenharmony_ci//     * Redistributions of source code must retain the above copyright
9ffe3c632Sopenharmony_ci// notice, this list of conditions and the following disclaimer.
10ffe3c632Sopenharmony_ci//     * Redistributions in binary form must reproduce the above
11ffe3c632Sopenharmony_ci// copyright notice, this list of conditions and the following disclaimer
12ffe3c632Sopenharmony_ci// in the documentation and/or other materials provided with the
13ffe3c632Sopenharmony_ci// distribution.
14ffe3c632Sopenharmony_ci//     * Neither the name of Google Inc. nor the names of its
15ffe3c632Sopenharmony_ci// contributors may be used to endorse or promote products derived from
16ffe3c632Sopenharmony_ci// this software without specific prior written permission.
17ffe3c632Sopenharmony_ci//
18ffe3c632Sopenharmony_ci// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19ffe3c632Sopenharmony_ci// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20ffe3c632Sopenharmony_ci// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21ffe3c632Sopenharmony_ci// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22ffe3c632Sopenharmony_ci// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23ffe3c632Sopenharmony_ci// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24ffe3c632Sopenharmony_ci// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25ffe3c632Sopenharmony_ci// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26ffe3c632Sopenharmony_ci// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27ffe3c632Sopenharmony_ci// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28ffe3c632Sopenharmony_ci// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29ffe3c632Sopenharmony_ci
30ffe3c632Sopenharmony_cisyntax = "proto2";
31ffe3c632Sopenharmony_ci
32ffe3c632Sopenharmony_cipackage protobuf_unittest;
33ffe3c632Sopenharmony_ci
34ffe3c632Sopenharmony_cimessage Message2 {
35ffe3c632Sopenharmony_ci  enum Enum {
36ffe3c632Sopenharmony_ci    FOO = 0;
37ffe3c632Sopenharmony_ci    BAR = 1;
38ffe3c632Sopenharmony_ci    BAZ = 2;
39ffe3c632Sopenharmony_ci    EXTRA_2 = 20;
40ffe3c632Sopenharmony_ci  }
41ffe3c632Sopenharmony_ci
42ffe3c632Sopenharmony_ci  optional    int32 optional_int32    =  1;
43ffe3c632Sopenharmony_ci  optional    int64 optional_int64    =  2;
44ffe3c632Sopenharmony_ci  optional   uint32 optional_uint32   =  3;
45ffe3c632Sopenharmony_ci  optional   uint64 optional_uint64   =  4;
46ffe3c632Sopenharmony_ci  optional   sint32 optional_sint32   =  5;
47ffe3c632Sopenharmony_ci  optional   sint64 optional_sint64   =  6;
48ffe3c632Sopenharmony_ci  optional  fixed32 optional_fixed32  =  7;
49ffe3c632Sopenharmony_ci  optional  fixed64 optional_fixed64  =  8;
50ffe3c632Sopenharmony_ci  optional sfixed32 optional_sfixed32 =  9;
51ffe3c632Sopenharmony_ci  optional sfixed64 optional_sfixed64 = 10;
52ffe3c632Sopenharmony_ci  optional    float optional_float    = 11;
53ffe3c632Sopenharmony_ci  optional   double optional_double   = 12;
54ffe3c632Sopenharmony_ci  optional     bool optional_bool     = 13;
55ffe3c632Sopenharmony_ci  optional   string optional_string   = 14;
56ffe3c632Sopenharmony_ci  optional    bytes optional_bytes    = 15;
57ffe3c632Sopenharmony_ci  optional group OptionalGroup = 16 {
58ffe3c632Sopenharmony_ci    optional int32 a = 17;
59ffe3c632Sopenharmony_ci  }
60ffe3c632Sopenharmony_ci  optional Message2  optional_message = 18;
61ffe3c632Sopenharmony_ci  optional Enum         optional_enum = 19;
62ffe3c632Sopenharmony_ci
63ffe3c632Sopenharmony_ci  repeated    int32 repeated_int32    = 31;
64ffe3c632Sopenharmony_ci  repeated    int64 repeated_int64    = 32;
65ffe3c632Sopenharmony_ci  repeated   uint32 repeated_uint32   = 33;
66ffe3c632Sopenharmony_ci  repeated   uint64 repeated_uint64   = 34;
67ffe3c632Sopenharmony_ci  repeated   sint32 repeated_sint32   = 35;
68ffe3c632Sopenharmony_ci  repeated   sint64 repeated_sint64   = 36;
69ffe3c632Sopenharmony_ci  repeated  fixed32 repeated_fixed32  = 37;
70ffe3c632Sopenharmony_ci  repeated  fixed64 repeated_fixed64  = 38;
71ffe3c632Sopenharmony_ci  repeated sfixed32 repeated_sfixed32 = 39;
72ffe3c632Sopenharmony_ci  repeated sfixed64 repeated_sfixed64 = 40;
73ffe3c632Sopenharmony_ci  repeated    float repeated_float    = 41;
74ffe3c632Sopenharmony_ci  repeated   double repeated_double   = 42;
75ffe3c632Sopenharmony_ci  repeated     bool repeated_bool     = 43;
76ffe3c632Sopenharmony_ci  repeated   string repeated_string   = 44;
77ffe3c632Sopenharmony_ci  repeated    bytes repeated_bytes    = 45;
78ffe3c632Sopenharmony_ci  repeated group RepeatedGroup = 46 {
79ffe3c632Sopenharmony_ci    optional int32 a = 47;
80ffe3c632Sopenharmony_ci  }
81ffe3c632Sopenharmony_ci  repeated Message2 repeated_message  = 48;
82ffe3c632Sopenharmony_ci  repeated Enum     repeated_enum     = 49;
83ffe3c632Sopenharmony_ci
84ffe3c632Sopenharmony_ci  oneof o {
85ffe3c632Sopenharmony_ci       int32 oneof_int32    = 51 [default = 100];
86ffe3c632Sopenharmony_ci       int64 oneof_int64    = 52 [default = 101];
87ffe3c632Sopenharmony_ci      uint32 oneof_uint32   = 53 [default = 102];
88ffe3c632Sopenharmony_ci      uint64 oneof_uint64   = 54 [default = 103];
89ffe3c632Sopenharmony_ci      sint32 oneof_sint32   = 55 [default = 104];
90ffe3c632Sopenharmony_ci      sint64 oneof_sint64   = 56 [default = 105];
91ffe3c632Sopenharmony_ci     fixed32 oneof_fixed32  = 57 [default = 106];
92ffe3c632Sopenharmony_ci     fixed64 oneof_fixed64  = 58 [default = 107];
93ffe3c632Sopenharmony_ci    sfixed32 oneof_sfixed32 = 59 [default = 108];
94ffe3c632Sopenharmony_ci    sfixed64 oneof_sfixed64 = 60 [default = 109];
95ffe3c632Sopenharmony_ci       float oneof_float    = 61 [default = 110];
96ffe3c632Sopenharmony_ci      double oneof_double   = 62 [default = 111];
97ffe3c632Sopenharmony_ci        bool oneof_bool     = 63 [default = true];
98ffe3c632Sopenharmony_ci      string oneof_string   = 64 [default = "string"];
99ffe3c632Sopenharmony_ci       bytes oneof_bytes    = 65 [default = "data"];
100ffe3c632Sopenharmony_ci       group OneofGroup     = 66 {
101ffe3c632Sopenharmony_ci         optional int32 a = 67;
102ffe3c632Sopenharmony_ci         optional int32 b = 167;
103ffe3c632Sopenharmony_ci       }
104ffe3c632Sopenharmony_ci     Message2 oneof_message = 68;
105ffe3c632Sopenharmony_ci     Enum        oneof_enum = 69 [default = BAZ];
106ffe3c632Sopenharmony_ci  }
107ffe3c632Sopenharmony_ci
108ffe3c632Sopenharmony_ci  // Some token map cases, too many combinations to list them all.
109ffe3c632Sopenharmony_ci  map<int32   , int32   > map_int32_int32       = 70;
110ffe3c632Sopenharmony_ci  map<int64   , int64   > map_int64_int64       = 71;
111ffe3c632Sopenharmony_ci  map<uint32  , uint32  > map_uint32_uint32     = 72;
112ffe3c632Sopenharmony_ci  map<uint64  , uint64  > map_uint64_uint64     = 73;
113ffe3c632Sopenharmony_ci  map<sint32  , sint32  > map_sint32_sint32     = 74;
114ffe3c632Sopenharmony_ci  map<sint64  , sint64  > map_sint64_sint64     = 75;
115ffe3c632Sopenharmony_ci  map<fixed32 , fixed32 > map_fixed32_fixed32   = 76;
116ffe3c632Sopenharmony_ci  map<fixed64 , fixed64 > map_fixed64_fixed64   = 77;
117ffe3c632Sopenharmony_ci  map<sfixed32, sfixed32> map_sfixed32_sfixed32 = 78;
118ffe3c632Sopenharmony_ci  map<sfixed64, sfixed64> map_sfixed64_sfixed64 = 79;
119ffe3c632Sopenharmony_ci  map<int32   , float   > map_int32_float       = 80;
120ffe3c632Sopenharmony_ci  map<int32   , double  > map_int32_double      = 81;
121ffe3c632Sopenharmony_ci  map<bool    , bool    > map_bool_bool         = 82;
122ffe3c632Sopenharmony_ci  map<string  , string  > map_string_string     = 83;
123ffe3c632Sopenharmony_ci  map<string  , bytes   > map_string_bytes      = 84;
124ffe3c632Sopenharmony_ci  map<string  , Message2> map_string_message    = 85;
125ffe3c632Sopenharmony_ci  map<int32   , bytes   > map_int32_bytes       = 86;
126ffe3c632Sopenharmony_ci  map<int32   , Enum    > map_int32_enum        = 87;
127ffe3c632Sopenharmony_ci  map<int32   , Message2> map_int32_message     = 88;
128ffe3c632Sopenharmony_ci}
129