Constructor

 See JSS::APIObject#initialize

 Public Instance Methods

 Change the Priority

 @param new_val[Integer] the new priority, must be in the range POSSIBLE_PRIORITIES

 @return [void]
437062
def priority=(new_val = @priority)
      return nil if new_val == @priority
      raise JSS::InvalidDataError, "priority must be an integer between #{POSSIBLE_PRIORITIES.first} and #{POSSIBLE_PRIORITIES.last} (inclusive)" unless POSSIBLE_PRIORITIES.include? new_val
      @priority = new_val
      @need_to_update = true
    end
176938
def handle_option_call(option_name, *args, &block)
      if getter?(option_name, *args, &block)
        current_value(option_name)
      else
        new_value = new_value(option_name, *args, &block)
        instance.class.new(@values.merge(option_name.to_sym => new_value))
      end
    end
300142
def distribution_point=(newval)
      new = JSS::DistributionPoint.all.select { |b| (b[:id] == newval) || (b[:name] == newval) }[0]
      raise JSS::MissingDataError, "No distribution_point matching '#{newval}' in the JSS" unless new
      @distribution_point = new[:name]
      @need_to_update = true
    end
74979
function(val) {
			if (typeof val !== 'undefined' && this._value !== (val = String(val))) {
				this.parent._updateSource(val, this.valueRange());
				this._value = val;
			}
			
			return this._value;
		}
399111
def content_type=(new_val)
      return nil if new_val == @content_type
      raise JSS::InvalidDataError, "content_type must be one of :#{CONTENT_TYPES.keys.join ', :'}" unless \
        CONTENT_TYPES.keys.include? new_val
      @content_type = new_val
      @need_to_update = true
    end
104924
public void addNextValue(Object val) {
    long newVal = Long.parseLong(val.toString());
    if (this.maxVal < newVal) {
      this.maxVal = newVal;
    }
  }
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
1087710
def user=(new_user)
      if new_user && !new_user.respond_to?(:to_str)
        raise TypeError, "Can't convert #{new_user.class} into String."
      end
      @user = new_user ? new_user.to_str : nil

      # You can't have a nil user with a non-nil password
      if password != nil
        @user = EMPTY_STR if @user.nil?
      end

      # Reset dependent values
      remove_instance_variable(:@userinfo) if defined?(@userinfo)
      remove_instance_variable(:@normalized_userinfo) if defined?(@normalized_userinfo)
      remove_instance_variable(:@authority) if defined?(@authority)
      remove_instance_variable(:@normalized_user) if defined?(@normalized_user)
      remove_composite_values

      # Ensure we haven't created an invalid URI
      validate()
    end
345792
def self_service_feature_on_main_page=(new_val)
      return nil if @self_service_feature_on_main_page == new_val
      return nil unless @self_service_data_config[:can_feature_in_categories]
      raise JSS::InvalidDataError, 'New value must be true or false' unless new_val.jss_boolean?
      @self_service_feature_on_main_page = new_val
      @need_to_update = true
    end
82944
def _evaluate_priority(priority)
      case priority
      when Integer
        _evaluate_priority_int(priority)
      when String, Symbol
        _evaluate_priority_symbol(priority.to_sym)
      when NilClass
        _evaluate_priority_nil
      else
        raise Errors::InvalidPriorityError, priority.inspect
      end
    end
463894
def display_fields=(new_val)
      raise JSS::InvalidDataError, 'display_fields must be an Array.' unless new_val.is_a? Array
      return if new_val.sort == @display_fields.sort
      @display_fields = new_val
      @need_to_update = true
    end
1246392
def new_value(*args, &block)
      value = value_from_args(args, &block)

      value = if incremental
                incremental_value(value)
              else
                filter_value(transformed_value(value))
              end

      if value_valid?(value)
        self.custom_value = value
      elsif invalid.to_s == 'default' && !incremental
        default_value
      else
        fail ArgumentError, "The value #{value.inspect} is not valid."
      end
    end
1054737
def deploy_as_managed_app=(new_val)
      return nil if new_val == @deploy_as_managed_app
      raise JSS::InvalidDataError, 'New value must be true or false' unless new_val.jss_boolean?
      @deploy_as_managed_app = new_val
      @need_to_update = true
    end
736361
@JRubyMethod
    public static IRubyObject initialize(IRubyObject self, IRubyObject type_id, IRubyObject val) {
        ((RubyObject)self).fastSetInstanceVariable("@type_id", type_id);
        ((RubyObject)self).fastSetInstanceVariable("@value", val);
        return self;
    }
803097
def criteria=(new_criteria)
      raise JSS::InvalidDataError, 'JSS::Criteriable::Criteria instance required' unless new_criteria.is_a?(JSS::Criteriable::Criteria)
      @criteria = new_criteria
      @criteria.container = self
      @need_to_update = true
    end
151393
def Scope(value) # rubocop:disable Naming/MethodName
      case value
      when ObjectInspector::Scope
        value
      else
        ObjectInspector::Scope.new(value)
      end
    end
727281
def add_attribute_value_initializer
      class << self
        def new(opts=nil)
          obj = super()
          obj.post_initialize
          obj.merge_attributes(opts) if opts
          obj
        end
      end
      logger.debug { "#{self} is extended with an optional {attribute=>value} constructor parameter." }
    end