X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=policy-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Fcontrollers%2FServiceStatus.java;h=8f4daac16d263a173de51b5387ab6e984f853754;hb=136e826cabebb7e4188c68ec118bb11632f8139a;hp=64647b889a2eba451be8fc568006500d73e748da;hpb=7adad623a64bfbb96b3c73ed7c1d0d49aabff659;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 64647b88..8f4daac1 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 @@ -17,24 +17,35 @@ * limitations under the License. * ========================LICENSE_END=================================== */ + 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 { + + @ApiModelProperty(value = "identity of the service") + public final String serviceName; + + @ApiModelProperty(value = "policy keep alive timeout") + public final long keepAliveIntervalSeconds; - @SerializedName("name") - public String name(); + @ApiModelProperty(value = "time since last invocation by the service") + public final long timeSinceLastActivitySeconds; - @SerializedName("keepAlive") - public long keepAliveInterval(); + @ApiModelProperty(value = "callback for notifying of RIC recovery") + public String callbackUrl; - @SerializedName("timeSincePing") - public long timeSincePing(); + ServiceStatus(String name, long keepAliveIntervalSeconds, long timeSincePingSeconds, String callbackUrl) { + this.serviceName = name; + this.keepAliveIntervalSeconds = keepAliveIntervalSeconds; + this.timeSinceLastActivitySeconds = timeSincePingSeconds; + this.callbackUrl = callbackUrl; + } }