step1:google 'protobuf required',尝试了解required属性跨版本兼容性的问题
http://stackoverflow.com/search?q=Protocol+Buffers+repeated
step2:继续了解
http://stackoverflow.com/questions/31176621/how-to-define-repeated-field-as-required-in-google-protocol-buffer
step3:
https://capnproto.org/faq.html#how-do-i-make-a-field-required-like-in-protocol-buffers
How do I make a field “required”, like in Protocol Buffers?
You don’t. You may find this surprising, but the “required” keyword in Protocol Buffers turned out to be a horrible mistake.
step4:baidu 'protobuffer3.0 required'
https://www.oschina.net/news/75687/protocol-buffers-3-0
step5:
https://github.com/google/protobuf/releases/tag/v3.0.0
Explicit "optional" keyword are disallowed in proto3 syntax, as fields are
optional by default; required fields are no longer supported.
Protocol Buffers v3.0.0
released this on Jul 28 2016