• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Protocol Buffers - Google's data interchange format
2// Copyright 2023 Google LLC.  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 = "proto2";
9
10package nest;
11
12message Outer {
13  message Inner {
14    message InnerSubMsg {
15      optional bool flag = 1;
16    }
17
18    enum InnerEnum {
19      INNER_ENUM_UNSPECIFIED = 0;
20      INNER_ENUM_FOO = 1;
21    }
22
23    optional double double = 1;
24    optional float float = 2;
25    optional int32 int32 = 3;
26    optional int64 int64 = 4;
27    optional uint32 uint32 = 5;
28    optional uint64 uint64 = 6;
29    optional sint32 sint32 = 7;
30    optional sint64 sint64 = 8;
31    optional fixed32 fixed32 = 9;
32    optional fixed64 fixed64 = 10;
33    optional sfixed32 sfixed32 = 11;
34    optional sfixed64 sfixed64 = 12;
35    optional bool bool = 13;
36    optional string string = 14;
37    optional bytes bytes = 15;
38    optional InnerSubMsg inner_submsg = 16;
39    optional InnerEnum inner_enum = 17;
40    repeated int32 repeated_int32 = 18 [packed = true];
41    repeated InnerSubMsg repeated_inner_submsg = 19;
42    map<string, string> string_map = 20;
43
44    message SuperInner {
45      message DuperInner {
46        message EvenMoreInner {
47          message CantBelieveItsSoInner {
48            optional int32 num = 99;
49          }
50
51          enum JustWayTooInner {
52            JUST_WAY_TOO_INNER_UNSPECIFIED = 0;
53          }
54        }
55      }
56    }
57  }
58  optional Inner inner = 1;
59  optional .nest.Outer.Inner.SuperInner.DuperInner.EvenMoreInner
60      .CantBelieveItsSoInner deep = 2;
61
62  optional .nest.Outer.Inner.SuperInner.DuperInner.EvenMoreInner.JustWayTooInner
63      deep_enum = 4;
64
65  optional NotInside notinside = 3;
66}
67
68message NotInside {
69  optional int32 num = 1;
70}
71
72message Recursive {
73  optional Recursive rec = 1;
74  optional int32 num = 2;
75}
76