Complete the code to define a Protocol Buffers message named Person.
message Person {
string name = [1];
}The number 1 is the field tag number, which uniquely identifies the field in the message.
Complete the code to declare an integer field called id in a protobuf message.
message User {
[1] id = 1;
}The int32 type is used for 32-bit integer fields in protobuf.
Fix the error in the protobuf field declaration for a repeated string called tags.
message Item {
[1] string tags = 2;
}The repeated keyword is used to declare a list of values in protobuf.
Fill both blanks to define a nested message Address inside Person with a string field city.
message Person {
message [1] {
[2] city = 1;
}
}The nested message is named Address and the field city is a string type.
Fill all three blanks to create a map field from string keys to int32 values named scores.
message Game {
map<[1], [2]> [3] = 1;
}The map field uses string keys and int32 values, named scores.