package org.oransc.policyagent.controllers;
-import com.google.gson.annotations.SerializedName;
+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 ServiceStatus {
+@ApiModel(value = "ServiceStatus")
+public class ServiceStatus {
- @SerializedName("name")
- public String name();
+ @ApiModelProperty(value = "identity of the service")
+ public final String serviceName;
- @SerializedName("keepAlive")
- public long keepAliveInterval();
+ @ApiModelProperty(value = "policy keep alive timeout")
+ public final long keepAliveIntervalSeconds;
- @SerializedName("timeSincePing")
- public long timeSincePing();
+ @ApiModelProperty(value = "time since last invocation by the service")
+ public final long timeSinceLastActivitySeconds;
+
+ @ApiModelProperty(value = "callback for notifying of RIC recovery")
+ public String callbackUrl;
+
+ ServiceStatus(String name, long keepAliveIntervalSeconds, long timeSincePingSeconds, String callbackUrl) {
+ this.serviceName = name;
+ this.keepAliveIntervalSeconds = keepAliveIntervalSeconds;
+ this.timeSinceLastActivitySeconds = timeSincePingSeconds;
+ this.callbackUrl = callbackUrl;
+ }
}