aboutsummaryrefslogtreecommitdiffstats
path: root/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/Service.java
diff options
context:
space:
mode:
Diffstat (limited to 'apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/Service.java')
-rw-r--r--apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/Service.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/Service.java b/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/Service.java
new file mode 100644
index 0000000..fd7f3fa
--- /dev/null
+++ b/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/Service.java
@@ -0,0 +1,39 @@
+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 org.immutables.value.Value;
+
+import java.util.List;
+
+@Value.Immutable
+@JsonSerialize(as = ImmutableService.class)
+@JsonDeserialize(as = ImmutableService.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class Service {
+
+ @JsonProperty("ID")
+ public abstract String getId();
+
+ @JsonProperty("Service")
+ public abstract String getService();
+
+ @JsonProperty("Tags")
+ @JsonDeserialize(as = ImmutableList.class, contentAs = String.class)
+ public abstract List<String> getTags();
+
+ @JsonProperty("Address")
+ public abstract String getAddress();
+
+ @JsonProperty("Port")
+ public abstract int getPort();
+
+ @JsonProperty("CreateIndex")
+ public abstract int getCreateIndex();
+
+ @JsonProperty("ModifyIndex")
+ public abstract int getModifyIndex();
+}