// This generates addressbook.desc via
// protoc --descriptor_set_out=addressbook.desc addressbook.proto
syntax = "proto3";

package tutorial;

message Person {
  string name = 1;
  int32 id = 2;
  optional string email = 3;



  enum PhoneType {
    MOBILE = 0;
    HOME = 1;
    WORK = 2;
  }

  message PhoneNumber {
    string number = 1;
    PhoneType type = 2; 
  }

  repeated PhoneNumber phones = 4;

  optional bytes blob = 5;

  oneof test_oneof {
    string petname = 6;
    int32 numPets = 7;
  }
  map<string, float> mapField = 8;
}

message AddressBook {
  repeated Person people = 1;
}
