X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Fcontrollers%2FPolicyInfo.java;h=1736c18ed2b3390815d1b17c67769eadfe328d37;hb=776c8156aae66f505ab234063923e66e7e610a01;hp=eb54ba932ffb13af3ab2c1e97cd218b734324a56;hpb=8831a02bce715562f3cacce1691bf4d9d3af206b;p=nonrtric.git diff --git a/policy-agent/src/main/java/org/oransc/policyagent/controllers/PolicyInfo.java b/policy-agent/src/main/java/org/oransc/policyagent/controllers/PolicyInfo.java index eb54ba93..1736c18e 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/controllers/PolicyInfo.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/controllers/PolicyInfo.java @@ -17,26 +17,41 @@ * limitations under the License. * ========================LICENSE_END=================================== */ + package org.oransc.policyagent.controllers; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import org.immutables.gson.Gson; -import org.immutables.value.Value; -@Value.Immutable @Gson.TypeAdapters -interface PolicyInfo { +@ApiModel(value = "PolicyInfo") +public class PolicyInfo { + + @ApiModelProperty(value = "identity of the policy") + public String id; + + @ApiModelProperty(value = "name of the policy type") + public String type; - public String id(); + @ApiModelProperty(value = "identity the target NearRT RIC") + public String ric; - public String type(); + @ApiModelProperty(value = "the configuration of the policy") + public Object json; - public String ric(); + @ApiModelProperty(value = "the name of the service owning the policy") + public String service; - public String json(); + @ApiModelProperty(value = "timestamp, last modification time") + public String lastModified; - public String service(); + PolicyInfo() { + } - public String lastModified(); + public boolean validate() { + return id != null && type != null && ric != null && json != null && service != null && lastModified != null; + } }