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=ed705dc79d9c32a2e0cc560f64e890807fc2e510;hpb=cd9e9862fa9a5898f3595b397686861749f72953;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 ed705dc7..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 @@ -20,23 +20,38 @@ 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; + } }