* 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 of the target Near-RT 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;
+ }
}