X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Fcontrollers%2FServiceStatus.java;h=1a9cf3272dc1b3542b60964b82f5b16de62c7bc2;hb=889b38fd05bc9143647827742e3a8e0f10783bc8;hp=3063c6bc9eb5b67ad228fd110d0c58d5052007d9;hpb=bbc4aa48f60dc70154ff07c2143918053f1c9154;p=nonrtric.git diff --git a/policy-agent/src/main/java/org/oransc/policyagent/controllers/ServiceStatus.java b/policy-agent/src/main/java/org/oransc/policyagent/controllers/ServiceStatus.java index 3063c6bc..1a9cf327 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/controllers/ServiceStatus.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/controllers/ServiceStatus.java @@ -20,22 +20,32 @@ 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 timeSincePingSeconds; + + @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.timeSincePingSeconds = timeSincePingSeconds; + this.callbackUrl = callbackUrl; + } }