code: func (s ConfigMapGeneratorV1) Generate(genericParams map[string]interface{}) (runtime.Object, error) {
  	err := ValidateParams(s.ParamNames(), genericParams)
  	if err != nil {
  		return nil, err
  	}
  	delegate := &ConfigMapGeneratorV1{}
  	fromFileStrings, found := genericParams["from-file"]
  	if found {
  		fromFileArray, isArray := fromFileStrings.([]string)
  		if !isArray {
  			return nil, fmt.Errorf("expected []string, found :%v", fromFileStrings)
  		}
  		delegate.FileSources = fromFileArray
  		delete(genericParams, "from-file")
  	}
  	fromLiteralStrings, found := genericParams["from-literal"]
  	if found {
  		fromLiteralArray, isArray := fromLiteralStrings.([]string)
  		if !isArray {
  			return nil, fmt.Errorf("expected []string, found :%v", fromFileStrings)
  		}
  		delegate.LiteralSources = fromLiteralArray
  		delete(genericParams, "from-literal")
  	}
  	params := map[string]string{}
  	for key, value := range genericParams {
  		strVal, isString := value.(string)
  		if !isString {
  			return nil, fmt.Errorf("expected string, saw %v for '%s'", value, key)
  		}
  		params[key] = strVal
  	}
  	delegate.Name = params["name"]
  	delegate.Type = params["type"]
  	return delegate.StructuredGenerate()
  }
docs: // Generate returns a configMap using the specified parameters.