code: func (r *ArchiveRequest) Validate() error {
  	switch {
  	case r.Format == ArchiveRequest_Invalid:
  		return errors.New("format must be valid")
  	case r.Project == "":
  		return errors.New("project is required")
  	case r.Ref == "":
  		return errors.New("ref is required")
  	default:
  		return nil
  	}
  }
docs: // Validate returns an error if r is invalid.