Updates of the policy agent NBI
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / controllers / ServiceRegistrationInfo.java
index 6ffaebd..907fa1c 100644 (file)
  * 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
-public interface ServiceRegistrationInfo {
+@ApiModel(value = "ServiceRegistrationInfo")
+public class ServiceRegistrationInfo {
+
+    @ApiModelProperty(value = "identity of the service")
+    public String serviceName;
+
+    @ApiModelProperty(
+        value = "keep alive interval for policies owned by the service. 0 means no timeout supervision."
+            + " Polcies that are not refreshed within this time are removed")
+    public long keepAliveIntervalSeconds;
+
+    @ApiModelProperty(value = "callback for notifying of RIC recovery")
+    public String callbackUrl;
 
-    public String name();
+    public ServiceRegistrationInfo() {
+    }
 
-    public long keepAliveInterval();
+    public ServiceRegistrationInfo(String name, long keepAliveIntervalSeconds, String callbackUrl) {
+        this.serviceName = name;
+        this.keepAliveIntervalSeconds = keepAliveIntervalSeconds;
+        this.callbackUrl = callbackUrl;
+    }
 
 }