def add_input(self, **kwargs):
        self._closed()
        def _get_item(args):
            if not args:
                raise ValueError("No parameter specified.")
            item = args.popitem()
            if args:
                raise ValueError("Too many parameters, not clear what to do "
                                 "with {}".format(kwargs))
            return item
        symbols = None
        input_dict = CommentedMap()
        if 'default' in kwargs:
            input_dict['default'] = kwargs.pop('default')
        if 'label' in kwargs:
            input_dict['label'] = kwargs.pop('label')
        if 'symbols' in kwargs:
            symbols = kwargs.pop('symbols')
        name, input_type = _get_item(kwargs)
        if input_type == 'enum':
            typ = CommentedMap()
            typ['type'] = 'enum'
            if symbols is None:
                raise ValueError("Please specify the enum's symbols.")
            if symbols == []:
                raise ValueError("The enum's symbols cannot be empty.")
            if type(symbols) != list:
                raise ValueError('Symbols should be a list.')
            symbols = [str(s) for s in symbols]
            typ['symbols'] = symbols
            input_dict['type'] = typ
        else:
            if bool(input_dict):
                input_dict['type'] = input_type
        msg = '"{}" is already used as a workflow input. Please use a ' +\
              'different name.'
        if name in self.wf_inputs:
            raise ValueError(msg.format(name))
        if isinstance(input_type, dict):
            input_dict['type'] = input_type
        if bool(input_dict):
            self.wf_inputs[name] = input_dict
        else:
            self.wf_inputs[name] = input_type
        return Reference(input_name=name)