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