blob: 687a7c854a1e58f0e045134387c4e4be8bf4e91b [file] [log] [blame]
Khen Nursimulu7626ce12016-12-21 11:51:46 -05001// See README.txt for information and build instructions.
2
3syntax = "proto3";
4
5package tutorial;
6
7import "google/api/annotations.proto";
8
9import public "yang_options.proto";
10
11option java_package = "com.example.tutorial";
12option java_outer_classname = "AddressBookProtos";
13option csharp_namespace = "Google.Protobuf.Examples.AddressBook";
14
15message House {
16 option (voltha.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
17
18 enum HouseType {
19 MOBILE = 0;
20 SINGLE = 1;
21 TOWN = 2;
22 }
23
24 string myhouse = 1;
25
26 message Door {
27 string colour = 1;
28 string size = 2;
29 }
30}
31
32message Girl {
33 option (voltha.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
34 repeated House houses = 4;
35}
36
37message Person {
38 option (voltha.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
39
40 string name = 1;
41 int32 id = 2; // Unique ID number for this person.
42 string email = 3;
43 repeated string khen = 4;
44 repeated PhoneNumber phones = 5;
45
46 enum PhoneType {
47 MOBILE = 0;
48 HOME = 1;
49 WORK = 2;
50 }
51
52 message PhoneNumber {
53 string number = 1;
54 PhoneType type = 2;
55 }
56
57}
58
59// Our address book file is just one of these.
60message AddressBook {
61 Person people = 1 [(voltha.yang_inline_node).id = 'people',
62 (voltha.yang_inline_node).type = 'book-Person'] ;
63 Girl girl = 2;
64}