Created
December 17, 2015 08:26
-
-
Save iamralch/acdbc1b1429d97371609 to your computer and use it in GitHub Desktop.
Protocol Buffers Company Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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