update Protobuf API to 2.0