-
Notifications
You must be signed in to change notification settings - Fork 0
/
addressbook.proto
42 lines (34 loc) · 1.16 KB
/
addressbook.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
syntax = "proto3";
import "google/protobuf/timestamp.proto";
import "leo_options.proto";
package tutorial;
option (leo.proto.use_custom_superclass) = true;
option java_multiple_files = true;
option java_package = "com.example.tutorial";
option java_outer_classname = "AddressBookProtos";
enum PhoneType {
MOBILE = 0;
HOME = 1;
WORK = 2;
}
message Person {
option (leo.proto.msg_implements_interface) = "com.example.custom.CustomPersonMarkerInterface";
string id = 1 [(leo.proto.javatype) = "java.util.UUID"];
string name = 2;
int32 age = 3;
string email = 4;
message PhoneNumber {
string number = 1;
PhoneType type = 2 [(.leo.proto.javatype) = "com.example.custom.CustomPhoneType"];
}
repeated PhoneNumber phones = 5;
repeated string friendIds = 6;
repeated string friendIds2 = 7 [(leo.proto.javatype) = "java.util.UUID"];
repeated int32 favoriteNumber = 8;
google.protobuf.Timestamp last_updated = 9;
}
message AddressBook {
option (leo.proto.msg_use_custom_superclass) = false;
repeated Person people = 1;
Person owner = 2 [(leo.proto.javatype) = "com.example.custom.CustomOwnerClass"];
}