Home | History | Annotate | Download | only in common
      1 import "nanopb.proto";
      2 
      3 message Person {
      4   required string name = 1 [(nanopb).max_size = 40];
      5   required int32 id = 2;
      6   optional string email = 3 [(nanopb).max_size = 40];
      7   
      8   enum PhoneType {
      9     MOBILE = 0;
     10     HOME = 1;
     11     WORK = 2;
     12   }
     13 
     14   message PhoneNumber {
     15     required string number = 1 [(nanopb).max_size = 40];
     16     optional PhoneType type = 2 [default = HOME];
     17   }
     18 
     19   repeated PhoneNumber phone = 4 [(nanopb).max_count = 5];
     20 }
     21