code: func Value(res *api.GenericResource) string {
  	switch res := res.Resource.(type) {
  	case *api.GenericResource_DiscreteResourceSpec:
  		return discreteToString(res)
  	case *api.GenericResource_NamedResourceSpec:
  		return res.NamedResourceSpec.Value
  	}
  
  	return ""
  }
docs: // Value returns the value key as a string