1syntax = "proto2";
2
3import "nanopb.proto";
4
5message Person {
6  required string name = 1 [(nanopb).max_size = 40];
7  required int32 id = 2;
8  optional string email = 3 [(nanopb).max_size = 40];
9
10  enum PhoneType {
11    MOBILE = 0;
12    HOME = 1;
13    WORK = 2;
14  }
15
16  message PhoneNumber {
17    required string number = 1 [(nanopb).max_size = 40];
18    optional PhoneType type = 2 [default = HOME];
19  }
20
21  repeated PhoneNumber phone = 4 [(nanopb).max_count = 5];
22}
23