• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// See README.txt for information and build instructions.
2
3package tutorial;
4
5option java_package = "com.example.tutorial";
6option java_outer_classname = "AddressBookProtos";
7
8message Person {
9  required string name = 1;
10  required int32 id = 2;        // Unique ID number for this person.
11  optional string email = 3;
12
13  enum PhoneType {
14    MOBILE = 0;
15    HOME = 1;
16    WORK = 2;
17  }
18
19  message PhoneNumber {
20    required string number = 1;
21    optional PhoneType type = 2 [default = HOME];
22  }
23
24  repeated PhoneNumber phone = 4;
25}
26
27// Our address book file is just one of these.
28message AddressBook {
29  repeated Person person = 1;
30}
31