migrate discovery source codes from OPEN-O
[msb/discovery.git] / sdclient / discovery-service / src / main / java / org / onap / msb / sdclient / core / HealthService.java
1 /**
2  * Copyright 2016 ZTE, Inc. and others.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.onap.msb.sdclient.core;
17
18 import java.io.Serializable;
19 import java.util.List;
20
21 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
22 import com.fasterxml.jackson.annotation.JsonProperty;
23
24 @JsonIgnoreProperties(ignoreUnknown = true)
25 public class HealthService implements Serializable {
26    
27
28     private static final long serialVersionUID = 1L;
29     
30     @JsonProperty("Node")
31     private Node node;
32     
33     @JsonProperty("Service")
34     private Service service;
35     
36     @JsonProperty("Checks")
37     private List<Check> checks;
38     
39
40     public Node getNode() {
41         return node;
42     }
43
44     public void setNode(Node node) {
45         this.node = node;
46     }
47
48     public Service getService() {
49         return service;
50     }
51
52     public void setService(Service service) {
53         this.service = service;
54     }
55
56     public List<Check> getChecks() {
57         return checks;
58     }
59
60     public void setChecks(List<Check> checks) {
61         this.checks = checks;
62     }
63
64     
65   
66     
67     @JsonIgnoreProperties(ignoreUnknown = true)
68     public class Service{
69         @JsonProperty("ID")
70         private String id;
71         
72         @JsonProperty("Service")
73         private String service;
74         
75         @JsonProperty("Tags")
76         private List<String> tags;
77         
78         @JsonProperty("Address")
79         private String address;
80         
81         @JsonProperty("Port")
82         private String port;
83
84         public String getId() {
85             return id;
86         }
87
88         public void setId(String id) {
89             this.id = id;
90         }
91
92         public String getService() {
93             return service;
94         }
95
96         public void setService(String service) {
97             this.service = service;
98         }
99
100         public List<String> getTags() {
101             return tags;
102         }
103
104         public void setTags(List<String> tags) {
105             this.tags = tags;
106         }
107
108         public String getAddress() {
109             return address;
110         }
111
112         public void setAddress(String address) {
113             this.address = address;
114         }
115
116         public String getPort() {
117             return port;
118         }
119
120         public void setPort(String port) {
121             this.port = port;
122         }
123         
124     }
125     
126     @JsonIgnoreProperties(ignoreUnknown = true)
127     public class Node{
128         
129         @JsonProperty("Node")
130         private String node;
131         
132         @JsonProperty("Address")
133         private String address;
134
135         public String getNode() {
136             return node;
137         }
138
139         public void setNode(String node) {
140             this.node = node;
141         }
142
143         public String getAddress() {
144             return address;
145         }
146
147         public void setAddress(String address) {
148             this.address = address;
149         }
150         
151         
152     }
153
154 }