addressbook.proto 661 B

123456789101112131415161718192021222324252627282930313233
  1. // See README.txt for information and build instructions.
  2. syntax = "proto3";
  3. package tutorial;
  4. option java_package = "com.example.tutorial";
  5. option java_outer_classname = "AddressBookProtos";
  6. option csharp_namespace = "Google.Protobuf.Examples.AddressBook";
  7. message Person {
  8. string name = 1;
  9. int32 id = 2; // Unique ID number for this person.
  10. string email = 3;
  11. enum PhoneType {
  12. MOBILE = 0;
  13. HOME = 1;
  14. WORK = 2;
  15. }
  16. message PhoneNumber {
  17. string number = 1;
  18. PhoneType type = 2;
  19. }
  20. repeated PhoneNumber phone = 4;
  21. }
  22. // Our address book file is just one of these.
  23. message AddressBook {
  24. repeated Person person = 1;
  25. }