Skip to content

Instantly share code, notes, and snippets.

@kospol
Created March 21, 2014 18:36
Show Gist options
  • Save kospol/9692848 to your computer and use it in GitHub Desktop.
Save kospol/9692848 to your computer and use it in GitHub Desktop.
package test;
option java_package = "com.example.zoo";
option java_outer_classname = "ZooLand";
message MyAnimalList {
repeated Animal animals = 1;
}
message Animal {
extensions 100 to max;
enum Type
{
Pinguin = 2;
Lion = 3;
}
required Type type = 4;
required int32 weight = 5;
required int32 age = 6;
}
message Pinguin {
extend Animal {
required Pinguin mPinguin = 100;
}
required int32 jumpsPerDay = 1;
required int32 height = 2;
}
message Lion {
extend Animal {
required Lion mLion = 101;
}
required bool king = 1;
required double roarms = 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment