Skip to content

Instantly share code, notes, and snippets.

@iamralch
Created December 17, 2015 08:26
Show Gist options
  • Save iamralch/acdbc1b1429d97371609 to your computer and use it in GitHub Desktop.
Save iamralch/acdbc1b1429d97371609 to your computer and use it in GitHub Desktop.
Protocol Buffers Company Example
syntax = 'proto2';
package example;
enum CompanyType {
Private = 17;
Public = 18;
NonProfit = 19;
};
message Company {
required string Name = 1;
repeated Employee Employees = 2;
required CompanyType Type = 3;
optional group Address = 4 {
required string Country = 5;
required string City = 6;
optional string Street = 7;
}
}
message Employee {
required string Name = 1;
optional string SSN = 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment