Skip to content

Instantly share code, notes, and snippets.

@swankjesse
Created February 11, 2015 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swankjesse/64ae88fb62143cf6d05f to your computer and use it in GitHub Desktop.
Save swankjesse/64ae88fb62143cf6d05f to your computer and use it in GitHub Desktop.
syntax = "proto3";
package publicobject.example;
option java_package = "com.publicobject.example";
option java_multiple_files = true;
message Person {
// The customer's full name.
optional string name = 1;
// The customer's ID number.
optional int32 id = 2;
// Email address for the customer.
optional string email = 3;
enum PhoneType {
UNKNOWN = 0;
MOBILE = 1;
HOME = 2;
WORK = 3;
}
message PhoneNumber {
// The user's phone number.
optional string number = 1;
// The type of phone stored here.
optional PhoneType type = 2;
}
// A list of the user's phone numbers.
repeated PhoneNumber phone = 4;
map<string, string> social_network_identities = 5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment