Custom attribute writer method checking allowed values (enum).
 @param [Object] eac3_surround_ex_mode Object to be assigned
968164
def eac3_surround_ex_mode=(eac3_surround_ex_mode)
      validator = EnumAttributeValidator.new('String', ["m0", "m1", "m2"])
      unless validator.valid?(eac3_surround_ex_mode)
        fail ArgumentError, "invalid value for 'eac3_surround_ex_mode', must be one of #{validator.allowable_values}."
      end
      @eac3_surround_ex_mode = eac3_surround_ex_mode
    end
1126886
def eac3_lt_rt_center_mix_level=(eac3_lt_rt_center_mix_level)
      validator = EnumAttributeValidator.new('String', ["c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7"])
      unless validator.valid?(eac3_lt_rt_center_mix_level)
        fail ArgumentError, "invalid value for 'eac3_lt_rt_center_mix_level', must be one of #{validator.allowable_values}."
      end
      @eac3_lt_rt_center_mix_level = eac3_lt_rt_center_mix_level
    end
744067
def code_text_alignment=(code_text_alignment)
      validator = EnumAttributeValidator.new('String', ["None", "Above", "Below", "Right"])
      if code_text_alignment.to_i == 0
        unless validator.valid?(code_text_alignment)
          raise ArgumentError, "invalid value for 'code_text_alignment', must be one of #{validator.allowable_values}."
        end
        @code_text_alignment = code_text_alignment
      else
        @code_text_alignment = validator.allowable_values[code_text_alignment.to_i]
      end
    end
707352
def _modeIsValid(self, mode):
        
        try:
            # Suport for version 2 of wrappers
            return mode in self.modes.keys()
        except AttributeError as e:
            # Legacy for mantaining old wrappers
            if mode in self.isValidMode.keys():
                if mode in self.isValidMode.keys():
                    return True
        return False
1301888
def valid?
      status_validator = EnumAttributeValidator.new('String', ["AUTHORIZED", "CAPTURED", "VOIDED", "FAILED"])
      return false unless status_validator.valid?(@status)
      entry_method_validator = EnumAttributeValidator.new('String', ["SWIPED", "KEYED", "EMV", "ON_FILE", "CONTACTLESS"])
      return false unless entry_method_validator.valid?(@entry_method)
      return true
    end
1005486
def check_enum(enum, name=None, valid=None):
    
    name = name or 'enum'
    # Try to convert
    res = None
    if isinstance(enum, int):
        if hasattr(enum, 'name') and enum.name.startswith('GL_'):
            res = enum.name[3:].lower()
    elif isinstance(enum, string_types):
        res = enum.lower()
    # Check
    if res is None:
        raise ValueError('Could not determine string represenatation for'
                         'enum %r' % enum)
    elif valid and res not in valid:
        raise ValueError('Value of %s must be one of %r, not %r' % 
                         (name, valid, enum))
    return res
1028918
async def on_isupport_extban(self, value):
        
        self._extban_prefix, types = value.split(',')
        self._extban_types = set(types)
974983
def attribute_required?(attribute)
      validator = find_validator(attribute, ActiveModel::Validations::PresenceValidator) ||
                  find_validator(attribute, TranslatablePresenceValidator)

      return unless validator

      # Check if the if condition is present and it evaluates to true
      if_condition = validator.options[:if]
      validator_if_condition = if_condition.nil? ||
                               (string_or_symbol?(if_condition) ? object.send(if_condition) : if_condition.call(object))

      # Check if the unless condition is present and it evaluates to false
      unless_condition = validator.options[:unless]
      validator_unless_condition = unless_condition.nil? ||
                                   (string_or_symbol?(unless_condition) ? !object.send(unless_condition) : !unless_condition.call(object))

      validator_if_condition && validator_unless_condition
    end
638652
def valid?
      return false if @is_valid.nil?
      match_type_validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
      return false unless match_type_validator.valid?(@match_type)
      return true
    end
979169
def eac3_drc_line_mode_profile=(eac3_drc_line_mode_profile)
      validator = EnumAttributeValidator.new('String', ["p0", "p1", "p2", "p3", "p4", "p5"])
      unless validator.valid?(eac3_drc_line_mode_profile)
        fail ArgumentError, "invalid value for 'eac3_drc_line_mode_profile', must be one of #{validator.allowable_values}."
      end
      @eac3_drc_line_mode_profile = eac3_drc_line_mode_profile
    end
1075466
def style=(style)
      validator = EnumAttributeValidator.new('String', ["Default", "Solid", "ShortDash", "ShortDot", "ShortDashDot", "ShortDashDotDot", "Dot", "Dash", "LongDash", "DashDot", "LongDashDot", "LongDashDotDot"])
      if style.to_i == 0
        unless validator.valid?(style)
          raise ArgumentError, "invalid value for 'style', must be one of #{validator.allowable_values}."
        end
        @style = style
      else
        @style = validator.allowable_values[style.to_i]
      end
    end
86330
def order=(order)
      validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
      unless validator.valid?(order)
        fail ArgumentError, "invalid value for 'order', must be one of #{validator.allowable_values}."
      end
      @order = order
    end
500851
def eac3_lt_rt_surround_mix_level=(eac3_lt_rt_surround_mix_level)
      validator = EnumAttributeValidator.new('String', ["c3", "c4", "c5", "c6", "c7"])
      unless validator.valid?(eac3_lt_rt_surround_mix_level)
        fail ArgumentError, "invalid value for 'eac3_lt_rt_surround_mix_level', must be one of #{validator.allowable_values}."
      end
      @eac3_lt_rt_surround_mix_level = eac3_lt_rt_surround_mix_level
    end
1083862
def _checkAttribs(self, strict):
        """"""
        if self.choice:
            warning("Choice values not allowed for real-type parameter " +
                    self.name, strict)
            self.choice = None
206263
function isValidExtension(src){
   var extension = src.split('.').pop();
   var isValid = ENUM_INVALID_EXTENSIONS[extension] === false ? false : true;
   return isValid;
}
1201353
def eac3_lo_ro_center_mix_level=(eac3_lo_ro_center_mix_level)
      validator = EnumAttributeValidator.new('String', ["c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7"])
      unless validator.valid?(eac3_lo_ro_center_mix_level)
        fail ArgumentError, "invalid value for 'eac3_lo_ro_center_mix_level', must be one of #{validator.allowable_values}."
      end
      @eac3_lo_ro_center_mix_level = eac3_lo_ro_center_mix_level
    end
1087794
def color=(color)
      validator = EnumAttributeValidator.new('String', ["9da2a6", "4ab200", "0b8000", "2952cc", "a82ee5", "e5457a", "b21212", "593c00", "e5BF00"])
      unless validator.valid?(color)
        fail ArgumentError, "invalid value for 'color', must be one of #{validator.allowable_values}."
      end
      @color = color
    end