1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
// This is the same as test.proto, but with a package name, to
// isolate whether protoc is generating wrong type names in some places.
syntax = "proto2";
package PKG;
message OneofMessage {
oneof first {
string name = 4;
sint64 number = 9;
}
oneof second {
string foo = 1;
double bar = 2;
}
oneof singleton_oneof {
string qqsv = 3;
}
}
// a map<...> creates a message that contains a Key and Value.
// So, number_ints = {"one":1, "two":2} is equivalent to
// '..MapMessage'{
// number_ints:[
// '.MapMessage.NumberIntsEntry'{key:"two",value:2},
// '.MapMessage.NumberIntsEntry'{key:"one",value:1}]}
message MapMessage {
map<string, sint64> number_ints = 5;
}
message NotMapMessage {
message KeyValue {
optional string Key = 1;
optional sint64 Value = 2;
}
repeated KeyValue number_ints = 5;
}
|