def icon=(new_icon)
      if new_icon.is_a? Integer
        return if @icon && new_icon == @icon.id
        validate_icon new_icon
        @new_icon_id = new_icon
        @need_to_update = true
      else
        unless uploadable? && defined?(self.class::UPLOAD_TYPES) && self.class::UPLOAD_TYPES.key?(:icon)
          raise JSS::UnsupportedError, "Class #{self.class} does not support icon uploads."
        end
        new_icon = Pathname.new new_icon
        upload(:icon, new_icon)
        refresh_icon
      end # new_icon.is_a? Integer
      new_icon
    end
def icon=(new_icon)
      if new_icon.is_a? Integer
        return if @icon && new_icon == @icon.id
        validate_icon new_icon
        @new_icon_id = new_icon
        @need_to_update = true
      else
        unless uploadable? && defined?(self.class::UPLOAD_TYPES) && self.class::UPLOAD_TYPES.key?(:icon)
          raise JSS::UnsupportedError, "Class #{self.class} does not support icon uploads."
        end
        new_icon = Pathname.new new_icon
        upload(:icon, new_icon)
        refresh_icon
      end # new_icon.is_a? Integer
      new_icon
    end
Set a new Self Service icon for this object.

 Since JSS::Icon objects are read-only,
 the icon can only be changed by supplying the id number
 of an icon already existing in the JSS, or a path to
 a local file, which will be uploaded to the JSS and added
 to this instance.  Uploads
 take effect immediately, but if an integer is supplied, the change
 must be sent to the JSS via {#update} or {#create}

 @param new_icon[Integer, String, Pathname] The id or path to the new icon.

 @return [false, Integer, Pathname] false means no change was made.