File tree 1 file changed +42
-0
lines changed
1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ -- See README.txt for information and build instructions.
2
+
3
+ package " tutorial" ;
4
+
5
+ option {
6
+ java_package = " com.example.tutorial" ;
7
+ java_outer_classname = " AddressBookProtos" ;
8
+ }
9
+
10
+ message " Person" {
11
+ required " name" :string (1 );
12
+ required " id" :int32 (2 ); -- Unique ID number for this person.
13
+ optional " email" :string (3 );
14
+
15
+ enum " PhoneType" {
16
+ MOBILE = 0 ;
17
+ HOME = 1 ;
18
+ WORK = 2 ;
19
+ };
20
+
21
+ message " PhoneNumber" {
22
+ required " number" :string (1 );
23
+ optional " type" :PhoneType (2 ) {default = " HOME" };
24
+ };
25
+
26
+ repeated " phone" :PhoneNumber (4 );
27
+ repeated " test" :int32 (5 ) {packed = true };
28
+
29
+ extensions (10 , " max" );
30
+ }
31
+
32
+ message " Ext" {
33
+ extend " Person" {
34
+ optional " test" :int32 (10 );
35
+ }
36
+ }
37
+
38
+ -- Our address book file is just one of these.
39
+ message " AddressBook" {
40
+ repeated " person" :Person (1 );
41
+ }
42
+
You can’t perform that action at this time.
0 commit comments