package org.openecomp.policy.api;
+import com.fasterxml.jackson.annotation.JsonCreator;
+
/**
* Enumeration of the Attribute Types that is used as a part of
* {@link org.openecomp.policy.api.PolicyParameters}.
/**
* Indicates AAF will be providing the Rule information.
*/
- AAF("AAF")
+ AAF("AAF"),
+ /**
+ * Indicates Guard YAML will be providing the Rule information.
+ */
+ GUARD_YAML("GUARD_YAML"),
+ /**
+ * Indicates Guard BLACKLIST YAML
+ */
+ GUARD_BL_YAML("GUARD_BL_YAML")
;
private String name;
public String toString() {
return this.name;
}
+
+ @JsonCreator
+ public static RuleProvider create (String value) {
+ for(RuleProvider type: values()){
+ if(type.toString().equals(value) || type.equals(RuleProvider.valueOf(value))){
+ return type;
+ }
+ }
+ throw new IllegalArgumentException();
+ }
}