Custom attribute writer method checking allowed values (enum).
 @param [Object] adjustment_type Object to be assigned
196746
def adjustment_type=(adjustment_type)
      validator = EnumAttributeValidator.new('String', ["TAX"])
      unless validator.valid?(adjustment_type)
        fail ArgumentError, "invalid value for 'adjustment_type', must be one of #{validator.allowable_values}."
      end
      @adjustment_type = adjustment_type
    end
1301753
def enum(enum_type='enum', base_classes=None, methods=None, **attrs):
    
    # Enumerations can not be initalized as a new instance
    def __init__(instance, *args, **kwargs):
        raise RuntimeError('%s types can not be initialized.' % enum_type)

    if base_classes is None:
        base_classes = ()

    if methods is None:
        methods = {}

    base_classes = base_classes + (object,)
    for k, v in methods.items():
        methods[k] = classmethod(v)

    attrs['enums'] = attrs.copy()
    methods.update(attrs)
    methods['__init__'] = __init__
    return type(to_string(enum_type), base_classes, methods)
76048
def schedule_type=(schedule_type)
      validator = EnumAttributeValidator.new('String', ["SCHEDULED", "ASAP"])
      unless validator.valid?(schedule_type)
        fail ArgumentError, "invalid value for 'schedule_type', must be one of #{validator.allowable_values}."
      end
      @schedule_type = schedule_type
    end
1033975
def eac3_analog_to_digital_converter_type=(eac3_analog_to_digital_converter_type)
      validator = EnumAttributeValidator.new('String', ["standard", "hdcd"])
      unless validator.valid?(eac3_analog_to_digital_converter_type)
        fail ArgumentError, "invalid value for 'eac3_analog_to_digital_converter_type', must be one of #{validator.allowable_values}."
      end
      @eac3_analog_to_digital_converter_type = eac3_analog_to_digital_converter_type
    end
1355199
def goal_type=(goal_type)
      validator = EnumAttributeValidator.new('String', ['TB', 'TBD', 'MF'])
      unless validator.valid?(goal_type)
        fail ArgumentError, 'invalid value for "goal_type", must be one of #{validator.allowable_values}.'
      end
      @goal_type = goal_type
    end
934434
def valid_input?(input)
      case @attributes[:type]
      when :boolean
        [true,false].include?(input)
      when :enum
        raise MissingValuesError unless @attributes[:values]
        raise InvalidValuesError unless @attributes[:values].class == Array
        @attributes[:values].include?(input)
      when :string
        format = @attributes[:format] || :anything
        Validator.valid_input?(format, input)
      when :number
        [Integer, Fixnum].include?(input.class)
      when :timestamp
        # TODO timestamp pending
        # raise PendingBranchError
        true
      else
        false
      end
    end
1135330
public void adjustmentValueChanged(AdjustmentEvent _adjustmentEvent) {
        switch (_adjustmentEvent.Type.getValue()){
            case AdjustmentType.ADJUST_ABS_value:
                System.out.println( "The event has been triggered by dragging the thumb..." );
                break;
            case AdjustmentType.ADJUST_LINE_value:
                System.out.println( "The event has been triggered by a single line move.." );
                break;
            case AdjustmentType.ADJUST_PAGE_value:
                System.out.println( "The event has been triggered by a block move..." );
                break;
        }
        System.out.println( "The value of the scrollbar is: " + _adjustmentEvent.Value);
    }
637965
def renum(type_name, values = :defined_in_block, &block)
      nest = self.is_a?(Module) ? self : Object
      EnumeratedValueTypeFactory.create(nest, type_name, values, &block)
    end
749115
def location_measure_type=(location_measure_type)
      validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
      if location_measure_type.to_i == 0
        unless validator.valid?(location_measure_type)
          raise ArgumentError, "invalid value for 'location_measure_type', must be one of #{validator.allowable_values}."
        end
        @location_measure_type = location_measure_type
      else
        @location_measure_type = validator.allowable_values[location_measure_type.to_i]
      end
    end
896829
def dnxhd_type=(dnxhd_type)
      validator = EnumAttributeValidator.new('String', ["36", "45", "60", "75", "90", "90x", "110", "115", "120", "145", "175x", "175", "185x", "185", "220x", "220"])
      unless validator.valid?(dnxhd_type)
        fail ArgumentError, "invalid value for 'dnxhd_type', must be one of #{validator.allowable_values}."
      end
      @dnxhd_type = dnxhd_type
    end
138964
def instance_readers
      _attrs.map { |k, v| [:attr_writer].any? { |t| v[:type] == t } ? nil : k }.compact
    end
826716
def method=(method)
      validator = EnumAttributeValidator.new('String', ["ENUM", "FC"])
      unless validator.valid?(method)
        fail ArgumentError, "invalid value for 'method', must be one of #{validator.allowable_values}."
      end
      @method = method
    end
902655
def itemization_type=(itemization_type)
      validator = EnumAttributeValidator.new('String', ["ITEM", "CUSTOM_AMOUNT", "GIFT_CARD_ACTIVATION", "GIFT_CARD_RELOAD", "GIFT_CARD_UNKNOWN", "OTHER"])
      unless validator.valid?(itemization_type)
        fail ArgumentError, "invalid value for 'itemization_type', must be one of #{validator.allowable_values}."
      end
      @itemization_type = itemization_type
    end
279247
def assert_type(value)
      unless @type.nil? || value.is_a?(@type) || allow_nil && value.nil?
        raise TypeError, format("Expected %s, got %s", @type, value.class)
      end
    end
99706
def inventory_alert_type=(inventory_alert_type)
      validator = EnumAttributeValidator.new('String', ["NONE", "LOW_QUANTITY"])
      unless validator.valid?(inventory_alert_type)
        fail ArgumentError, "invalid value for 'inventory_alert_type', must be one of #{validator.allowable_values}."
      end
      @inventory_alert_type = inventory_alert_type
    end
669529
def sort_order=(sort_order)
      validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
      unless validator.valid?(sort_order)
        fail ArgumentError, "invalid value for 'sort_order', must be one of #{validator.allowable_values}."
      end
      @sort_order = sort_order
    end
790389
def visibility=(visibility)
      validator = EnumAttributeValidator.new('String', ["PUBLIC", "PRIVATE"])
      unless validator.valid?(visibility)
        fail ArgumentError, "invalid value for 'visibility', must be one of #{validator.allowable_values}."
      end
      @visibility = visibility
    end