Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (26 sloc) 594 Bytes
// To generate the python protobuf interface call:
// $ protoc addressbook.proto --python_out .
message AddressBook {
repeated Contact contacts = 1;
};
message Address {
repeated string address_lines = 1;
optional string postcode = 2;
};
message Contact {
required string first_name = 1;
required string last_name = 2;
optional Address address = 3;
repeated Phone phone_numbers = 4;
};
enum PhoneType {
MOBILE = 1;
LANDLINE = 2;
}
message Phone {
optional PhoneType type = 1;
optional string number = 2;
};
message SearchResult {
repeated Contact contacts = 1;
};