aboutsummaryrefslogtreecommitdiffstats
path: root/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/ServiceHealth.java
diff options
context:
space:
mode:
Diffstat (limited to 'apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/ServiceHealth.java')
-rw-r--r--apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/ServiceHealth.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/ServiceHealth.java b/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/ServiceHealth.java
new file mode 100644
index 0000000..a739b4b
--- /dev/null
+++ b/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/ServiceHealth.java
@@ -0,0 +1,30 @@
+package org.onap.msb.apiroute.wrapper.consulextend.model.health;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.google.common.collect.ImmutableList;
+import com.orbitz.consul.model.health.HealthCheck;
+import com.orbitz.consul.model.health.Node;
+
+import org.immutables.value.Value;
+
+import java.util.List;
+@Value.Immutable
+@JsonSerialize(as = ImmutableServiceHealth.class)
+@JsonDeserialize(as = ImmutableServiceHealth.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class ServiceHealth {
+
+ @JsonProperty("Node")
+ public abstract Node getNode();
+
+ @JsonProperty("Service")
+ public abstract Service getService();
+
+ @JsonProperty("Checks")
+ @JsonDeserialize(as = ImmutableList.class, contentAs = HealthCheck.class)
+ public abstract List<HealthCheck> getChecks();
+
+}