aboutsummaryrefslogtreecommitdiffstats
path: root/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/consulextend/model/health/Service.java
blob: fd7f3fa18f2ef47985e12f9807fe97715eb8b6e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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();
}