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=42be5744a99e520ac98dbc80685a07fafcfb6c90;hb=61fcee9bad6d96005c403fdfd3f273430d4f8641;hp=3063c6bc9eb5b67ad228fd110d0c58d5052007d9;hpb=dfbd081159b02601a48162a647848223a9303ebf;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..42be5744 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 timeSinceLastActivitySeconds; + + @ApiModelProperty(value = "callback for notifying of RIC synchronization") + public String callbackUrl; + + ServiceStatus(String name, long keepAliveIntervalSeconds, long timeSincePingSeconds, String callbackUrl) { + this.serviceName = name; + this.keepAliveIntervalSeconds = keepAliveIntervalSeconds; + this.timeSinceLastActivitySeconds = timeSincePingSeconds; + this.callbackUrl = callbackUrl; + } }