Protobuf Reference

Proto3 Syntax

syntax = "proto3";File header
message MyMsg { string name = 1; }Message definition
repeated string items = 1;Repeated field (list)
optional int32 count = 2;Optional field
oneof payload { string s = 1; int32 n = 2; }Oneof
enum Status { UNKNOWN=0; OK=1; ERROR=2; }Enum
map scores = 1;Map field

Well-Known Types

google.protobuf.TimestampNanosecond timestamp
google.protobuf.DurationDuration
google.protobuf.AnyAny message type
google.protobuf.StructJSON-like structure