if (rulesName == null) {
rulesName = rulesInterface.getSimpleName();
}
ComponentModel componentModel = new V1ComponentModel();
componentModel.setName(rulesName);
RulesNamespace rulesNamespace = RulesNamespace.fromUri(rules.namespace());
if (rulesNamespace == null) {
rulesNamespace = RulesNamespace.DEFAULT;
for (RulesNamespace value : RulesNamespace.values()) {
if (value.versionMatches(switchyardNamespace)) {
rulesNamespace = value;