1// Protocol Buffers - Google's data interchange format 2// Copyright 2008 Google Inc. All rights reserved. 3// 4// Use of this source code is governed by a BSD-style 5// license that can be found in the LICENSE file or at 6// https://developers.google.com/open-source/licenses/bsd 7 8syntax = "proto3"; 9 10package objc.protobuf.tests.proto3_preserve_unknown_enum; 11option objc_class_prefix = "UnknownEnums"; 12 13enum MyEnum { 14 FOO = 0; 15 BAR = 1; 16 BAZ = 2; 17} 18 19enum MyEnumPlusExtra { 20 E_FOO = 0; 21 E_BAR = 1; 22 E_BAZ = 2; 23 E_EXTRA = 3; 24} 25 26message MyMessage { 27 MyEnum e = 1; 28 repeated MyEnum repeated_e = 2; 29 repeated MyEnum repeated_packed_e = 3 [packed=true]; 30 repeated MyEnumPlusExtra repeated_packed_unexpected_e = 4; // not packed 31 oneof o { 32 MyEnum oneof_e_1 = 5; 33 MyEnum oneof_e_2 = 6; 34 } 35} 36 37message MyMessagePlusExtra { 38 MyEnumPlusExtra e = 1; 39 repeated MyEnumPlusExtra repeated_e = 2; 40 repeated MyEnumPlusExtra repeated_packed_e = 3 [packed=true]; 41 repeated MyEnumPlusExtra repeated_packed_unexpected_e = 4 [packed=true]; 42 oneof o { 43 MyEnumPlusExtra oneof_e_1 = 5; 44 MyEnumPlusExtra oneof_e_2 = 6; 45 } 46} 47