code: func (a *Attempt) DataProto() (ret *dm.Attempt_Data) {
  	switch a.State {
  	case dm.Attempt_SCHEDULING:
  		ret = dm.NewAttemptScheduling().Data
  	case dm.Attempt_EXECUTING:
  		ret = dm.NewAttemptExecuting(a.CurExecution).Data
  	case dm.Attempt_WAITING:
  		ret = dm.NewAttemptWaiting(a.DepMap.Size() - a.DepMap.CountSet()).Data
  	case dm.Attempt_FINISHED:
  		ret = dm.NewAttemptFinished(a.Result.Data).Data
  	case dm.Attempt_ABNORMAL_FINISHED:
  		ret = dm.NewAttemptAbnormalFinish(a.Result.AbnormalFinish).Data
  	default:
  		panic(fmt.Errorf("unknown Attempt_State: %s", a.State))
  	}
  	ret.Created = google_pb.NewTimestamp(a.Created)
  	ret.Modified = google_pb.NewTimestamp(a.Modified)
  	ret.NumExecutions = a.CurExecution
  	return ret
  }
docs: // DataProto returns an Attempt.Data message for this Attempt.