• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Protocol Buffers - Google's data interchange format
2// Copyright 2015 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
10// Explicit empty prefix, tests some validations code paths also.
11package objc.protobuf.tests;
12
13option objc_class_prefix = "";
14
15message Message3 {
16  enum Enum {
17    FOO = 0;
18    BAR = 1;
19    BAZ = 2;
20    EXTRA_3 = 30;
21  }
22
23     int32 optional_int32    =  1;
24     int64 optional_int64    =  2;
25    uint32 optional_uint32   =  3;
26    uint64 optional_uint64   =  4;
27    sint32 optional_sint32   =  5;
28    sint64 optional_sint64   =  6;
29   fixed32 optional_fixed32  =  7;
30   fixed64 optional_fixed64  =  8;
31  sfixed32 optional_sfixed32 =  9;
32  sfixed64 optional_sfixed64 = 10;
33     float optional_float    = 11;
34    double optional_double   = 12;
35      bool optional_bool     = 13;
36    string optional_string   = 14;
37     bytes optional_bytes    = 15;
38  // No 'group' in proto3.
39  Message3 optional_message  = 18;
40      Enum optional_enum     = 19;
41
42  repeated    int32 repeated_int32    = 31;
43  repeated    int64 repeated_int64    = 32;
44  repeated   uint32 repeated_uint32   = 33;
45  repeated   uint64 repeated_uint64   = 34;
46  repeated   sint32 repeated_sint32   = 35;
47  repeated   sint64 repeated_sint64   = 36;
48  repeated  fixed32 repeated_fixed32  = 37;
49  repeated  fixed64 repeated_fixed64  = 38;
50  repeated sfixed32 repeated_sfixed32 = 39;
51  repeated sfixed64 repeated_sfixed64 = 40;
52  repeated    float repeated_float    = 41;
53  repeated   double repeated_double   = 42;
54  repeated     bool repeated_bool     = 43;
55  repeated   string repeated_string   = 44;
56  repeated    bytes repeated_bytes    = 45;
57  // No 'group' in proto3.
58  repeated Message3 repeated_message  = 48;
59  repeated     Enum repeated_enum     = 49;
60
61  oneof o {
62       int32 oneof_int32    = 51;
63       int64 oneof_int64    = 52;
64      uint32 oneof_uint32   = 53;
65      uint64 oneof_uint64   = 54;
66      sint32 oneof_sint32   = 55;
67      sint64 oneof_sint64   = 56;
68     fixed32 oneof_fixed32  = 57;
69     fixed64 oneof_fixed64  = 58;
70    sfixed32 oneof_sfixed32 = 59;
71    sfixed64 oneof_sfixed64 = 60;
72       float oneof_float    = 61;
73      double oneof_double   = 62;
74        bool oneof_bool     = 63;
75      string oneof_string   = 64;
76       bytes oneof_bytes    = 65;
77    // No 'group' in proto3.
78    Message3 oneof_message  = 68;
79        Enum oneof_enum     = 69;
80  }
81
82  // Some token map cases, too many combinations to list them all.
83  map<int32   , int32   > map_int32_int32       = 70;
84  map<int64   , int64   > map_int64_int64       = 71;
85  map<uint32  , uint32  > map_uint32_uint32     = 72;
86  map<uint64  , uint64  > map_uint64_uint64     = 73;
87  map<sint32  , sint32  > map_sint32_sint32     = 74;
88  map<sint64  , sint64  > map_sint64_sint64     = 75;
89  map<fixed32 , fixed32 > map_fixed32_fixed32   = 76;
90  map<fixed64 , fixed64 > map_fixed64_fixed64   = 77;
91  map<sfixed32, sfixed32> map_sfixed32_sfixed32 = 78;
92  map<sfixed64, sfixed64> map_sfixed64_sfixed64 = 79;
93  map<int32   , float   > map_int32_float       = 80;
94  map<int32   , double  > map_int32_double      = 81;
95  map<bool    , bool    > map_bool_bool         = 82;
96  map<string  , string  > map_string_string     = 83;
97  map<string  , bytes   > map_string_bytes      = 84;
98  map<string  , Message3> map_string_message    = 85;
99  map<int32   , bytes   > map_int32_bytes       = 86;
100  map<int32   , Enum    > map_int32_enum        = 87;
101  map<int32   , Message3> map_int32_message     = 88;
102}
103
104message Message3Optional {
105  enum Enum {
106    FOO = 0;
107    BAR = 1;
108    BAZ = 2;
109    EXTRA_3 = 30;
110  }
111
112  optional    int32 optional_int32    =  1;
113  optional    int64 optional_int64    =  2;
114  optional   uint32 optional_uint32   =  3;
115  optional   uint64 optional_uint64   =  4;
116  optional   sint32 optional_sint32   =  5;
117  optional   sint64 optional_sint64   =  6;
118  optional  fixed32 optional_fixed32  =  7;
119  optional  fixed64 optional_fixed64  =  8;
120  optional sfixed32 optional_sfixed32 =  9;
121  optional sfixed64 optional_sfixed64 = 10;
122  optional    float optional_float    = 11;
123  optional   double optional_double   = 12;
124  optional     bool optional_bool     = 13;
125  optional   string optional_string   = 14;
126  optional    bytes optional_bytes    = 15;
127  // No 'group' in proto3.
128  optional Message3  optional_message = 18;
129  optional Enum         optional_enum = 19;
130}
131