Custom attribute writer method checking allowed values (enum).
 @param [Object] eac3_lt_rt_surround_mix_level Object to be assigned
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
906440
def action=(action)
      validator = EnumAttributeValidator.new('String', ["COMPLETE", "CANCEL", "REFUND"])
      unless validator.valid?(action)
        fail ArgumentError, "invalid value for 'action', must be one of #{validator.allowable_values}."
      end
      @action = action
    end
952086
def action_type=(action_type)
      validator = EnumAttributeValidator.new('String', ['webhook', 'slack_webhook', 'email', 'aws_s3_upload'])
      unless validator.valid?(action_type)
        fail ArgumentError, 'invalid value for "action_type", must be one of #{validator.allowable_values}.'
      end
      @action_type = action_type
    end
1285055
@Override
   protected <E extends Enum<E>> String renderEnum(E argument) {
      EnumMarshaller<E> encoder = (EnumMarshaller<E>) serializationContext.getMarshaller(argument.getClass());
      return String.valueOf(encoder.encode(argument));
   }
90862
def audio_channels_layout=(audio_channels_layout)
      validator = EnumAttributeValidator.new('String', ["1.0", "2.0", "2.1", "3.0", "3.0(back)", "3.1", "4.0", "4.1", "quad", "5.0", "5.0(side)", "5.1(side)", "6.0", "6.1", "7.0", "7.1", "mono", "stereo"])
      unless validator.valid?(audio_channels_layout)
        fail ArgumentError, "invalid value for 'audio_channels_layout', must be one of #{validator.allowable_values}."
      end
      @audio_channels_layout = audio_channels_layout
    end
573126
def validate_enum_attribute(self, attribute: str,
                                candidates: Set[Union[str, int, float]]) -> None:
        
        self.add_errors(
            validate_enum_attribute(self.fully_qualified_name, self._spec, attribute, candidates))
1089054
def signature_implementation=(signature_implementation)
      validator = EnumAttributeValidator.new('String', ["TextStamp", "TextAsImage"])
      if signature_implementation.to_i == 0
        unless validator.valid?(signature_implementation)
          raise ArgumentError, "invalid value for 'signature_implementation', must be one of #{validator.allowable_values}."
        end
        @signature_implementation = signature_implementation
      else
        @signature_implementation = validator.allowable_values[signature_implementation.to_i]
      end
    end
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
1093618
def entry_method=(entry_method)
      validator = EnumAttributeValidator.new('String', ["SWIPED", "KEYED", "EMV", "ON_FILE", "CONTACTLESS"])
      unless validator.valid?(entry_method)
        fail ArgumentError, "invalid value for 'entry_method', must be one of #{validator.allowable_values}."
      end
      @entry_method = entry_method
    end
144230
def event_type=(event_type)
      validator = EnumAttributeValidator.new('String', ["API_CREATE", "API_EDIT", "API_DELETE", "REGISTER_CLOCKIN", "REGISTER_CLOCKOUT", "DASHBOARD_SUPERVISOR_CLOSE", "DASHBOARD_EDIT", "DASHBOARD_DELETE"])
      unless validator.valid?(event_type)
        fail ArgumentError, "invalid value for 'event_type', must be one of #{validator.allowable_values}."
      end
      @event_type = event_type
    end
1239069
def have_enum_values(enum, values, headers = nil, &b)
      values.each do |value|
        have_enum_value(enum, value, headers, &b)
      end
    end
194419
def match_type=(match_type)
      validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
      if match_type.to_i == 0
        unless validator.valid?(match_type)
          raise ArgumentError, "invalid value for 'match_type', must be one of #{validator.allowable_values}."
        end
        @match_type = match_type
      else
        @match_type = validator.allowable_values[match_type.to_i]
      end
    end
1139067
def frequency=(frequency)
      validator = EnumAttributeValidator.new('String', ['never', 'daily', 'weekly', 'everyOtherWeek', 'twiceAMonth', 'every4Weeks', 'monthly', 'everyOtherMonth', 'every3Months', 'every4Months', 'twiceAYear', 'yearly', 'everyOtherYear'])
      unless validator.valid?(frequency)
        fail ArgumentError, 'invalid value for "frequency", must be one of #{validator.allowable_values}.'
      end
      @frequency = frequency
    end
983475
def attachment_attributes_valid?
        [:size, :content_type].each do |attr_name|
          enum = attachment_options[attr_name]
          errors.add attr_name, I18n.translate("activerecord.errors.messages.inclusion", attr_name => enum) unless enum.nil? || enum.include?(send(attr_name))
        end
      end
888089
def status=(status)
      validator = EnumAttributeValidator.new('String', ["pending", "preparing", "processing", "success", "error"])
      unless validator.valid?(status)
        fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
      end
      @status = status
    end
1083862
def _checkAttribs(self, strict):
        """"""
        if self.choice:
            warning("Choice values not allowed for real-type parameter " +
                    self.name, strict)
            self.choice = None
676532
private Attribute checkContext(URI type, URI id, URI issuer,
                                        URI category, int designatorType) {
        if (!STRING_ATTRIBUTE_TYPE_URI.equals(type)) return null;
        String [] values = null;
        switch(designatorType){
            case AttributeDesignator.SUBJECT_TARGET:
                values = context.getSubjectValues(id.toString());
                break;
            case AttributeDesignator.RESOURCE_TARGET:
                values = context.getResourceValues(id);
                break;
            case AttributeDesignator.ACTION_TARGET:
                values = context.getActionValues(id);
                break;
            case AttributeDesignator.ENVIRONMENT_TARGET:
                values = context.getEnvironmentValues(id);
                break;
        }
        if (values == null || values.length == 0) return null;
        String iString = (issuer == null) ? null : issuer.toString();
        String tString = type.toString();
        if (values.length == 1) {
            AttributeValue val = stringToValue(values[0], tString);
            return (val == null) ? null :
                new SingletonAttribute(id, iString, getCurrentDateTime(), val);
        } else {
            ArrayList<AttributeValue> valCollection = new ArrayList<AttributeValue>(values.length);
            for (int i=0;i<values.length;i++) {
                AttributeValue val = stringToValue(values[i], tString);
                if (val != null) valCollection.add(val);
            }
            return new BasicAttribute(id, type, iString, getCurrentDateTime(), valCollection);
        }
    }