parameters=
 Change one of the stored parameters

 @param param_num[Integer] which param are we setting? must be 4..11

 @param new_val[String] the new value for the parameter

 @return [void]
421706
def set_parameter(param_num, new_val)
      raise JSS::NoSuchItemError, 'Parameter numbers must be from 4-11' unless (4..11).cover? param_num
      pkey = "parameter#{param_num}".to_sym
      raise JSS::InvalidDataError, 'parameter values must be strings or nil' unless new_val.nil? || new_val.is_a?(String)
      return nil if new_val == @parameters[pkey]
      @parameters[pkey] = new_val
      @need_to_update = true
    end
106727
def event=(new_val)
      return nil if new_val == @event
      raise JSS::InvalidDataError, 'Unknown webhook event' unless EVENTS.include? new_val
      @event = new_val
      @need_to_update = true
    end
308688
def free=(new_val)
      return nil if new_val == @free
      raise JSS::InvalidDataError, 'New value must be true or false' unless new_val.jss_boolean?
      @free = new_val
      @need_to_update = true
    end
721734
def recon_display= (new_val)
      return nil if @recon_display == new_val
      raise JSS::InvalidDataError, "recon_display must be a string, one of: #{RECON_DISPLAY_CHOICES.join(", ")}" unless RECON_DISPLAY_CHOICES.include? new_val
      @recon_display = new_val
      @need_to_update = true
    end
878575
def assign_from_old(params, new_params)
      queued_deletes = []

      params.attributes.each_pair do |name, old_val|
        # If there is a new value, see if it has [name]
        new_val = new_params ? new_params[name] : nil

        if !new_val
          # Queues the delete until after we finish the each_pair loop
          queued_deletes << name
        elsif new_val.is_a?(Hash)
          assign_from_old(old_val, new_val)
        else
          # assign value
          params.set(name, new_val) if old_val != new_val
          new_params.delete(name)
        end
      end

      queued_deletes.each { |name| params.delete(name) }
    end
312991
def enforce_count(args, params, diff = 0)
      num_args = args.size
      num_params = params == 'V' ? 0 : params.size + diff
      if num_args != num_params
        raise ArgumentError, "wrong number of parameters: expected #{num_params}, got #{num_args}"
      end
    end
412974
def set_current_stim_parameter(self, param, val):
        
        component = self._stimulus.component(0,1)
        component.set(param, val)
331257
def input_type=(new_val)
      return nil if @input_type == new_val
      raise JSS::InvalidDataError, "input_type must be a string, one of: #{INPUT_TYPES.join(', ')}" unless INPUT_TYPES.include? new_val
      @input_type = new_val
      @popup_choices = nil if @input_type == 'Text Field'
      @need_to_update = true
    end
288451
def setParameter(self, objID, param, value):
        
        self._connection._beginMessage(self._cmdSetID, tc.VAR_PARAMETER, objID,
                                       1 + 4 + 1 + 4 + len(param) + 1 + 4 + len(value))
        self._connection._string += struct.pack("!Bi", tc.TYPE_COMPOUND, 2)
        self._connection._packString(param)
        self._connection._packString(value)
        self._connection._sendExact()
11039
def set_params(self, prog=None, params=""):
        
        dest_prog = "to {0}".format(prog) if prog else ""
        self.add_option("--params", dest="extra", default=params,
                help="Extra parameters to pass {0}".format(dest_prog) + \
                     " (these WILL NOT be validated)")
1296612
def assign_new(params, new_params)
      new_params.each_pair do |name, value|
        if value.is_a?(Hash)
          assign_new(params.get(name), value)
        else
          # assign
          params.set(name, value)
        end
      end
    end
297071
def set_param(self, number, value):
        
        logger.debug("setting param number %s to %s" % (number, value))
        return self.library.Srv_SetParam(self.pointer, number,
                                         ctypes.byref(ctypes.c_int(value)))
251643
public void addParam(String strParam, boolean bValue)
    {
        this.addParam(strParam, bValue ? Constants.TRUE : Constants.FALSE);
    }
1245173
def set_param(key, value)
      code, message, value = @server.call("setParam", @caller_id, key, value)
      case code
      when 1
        return true
      when -1
        raise message
      else
        return false
      end
    end
566057
def level=(new_val)
      return nil if @level == new_val
      raise JSS::InvalidDataError, "New value must be one of '#{LEVELS.join("' '")}'" unless LEVELS.include? new_val
      @level = new_val
      @need_to_update = true
    end
1048959
def generate_parameters params
      @parameters = {}
      @options = {}
      params.each_pair do |param, data|
        if data[:opt]
          # optimise this parameter
          if data[:values] 
            # definition has provided an array of values
            if !data[:values].is_a? Array
              raise TargetLoadError.new("'values' for parameter #{param} is not an array")
            end
            if data[:type] == 'integer'
              data[:values].each do |v|
                raise TypeLoadError.new("'values' for parameter #{param} expected integer") unless v.is_a? Integer
              end
            elsif data[:type] == 'string'
              data[:values].each do |v|
                raise TypeLoadError.new("'values' for parameter #{param} expected string") unless v.is_a? String
              end
            end
            @parameters[param] = data[:values]
          else
            # definition has specified a range
            min, max, step = data[:min], data[:max], data[:step]
            unless min && max
              raise TargetLoadError.new("min and max must be set for parameter #{param}") 
            end
            range = (min..max)
            range = range.step(step) if step
            @parameters[param] = range.to_a
          end
        else
          # present option to user
          @options[param] = data
        end
      end
    end
961592
def switch_with_package=(new_val)
      return nil if new_val == @switch_with_package
      new_val = nil if new_val.to_s.empty?

      raise JSS::NoSuchItemError, "No package named '#{new_val}' exists in the JSS" if new_val && (!self.class.all_names(api: @api).include? new_val)

      new_val ||= DO_NOT_INSTALL
      @switch_with_package = new_val
      @need_to_update = true
    end