use protobuf to generate class