modify copyright year
[msb/discovery.git] / sdclient / discovery-service / src / main / java / org / onap / msb / sdclient / core / AgentService.java
1 /**
2  * Copyright 2016-2017 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.JsonInclude;
23 import com.fasterxml.jackson.annotation.JsonProperty;
24 import com.fasterxml.jackson.annotation.JsonInclude.Include;
25
26 @JsonIgnoreProperties(ignoreUnknown = true)
27 public class AgentService implements Serializable {
28    
29
30     private static final long serialVersionUID = 1L;
31
32     @JsonProperty("ID")
33     private String id;
34
35     @JsonProperty("Name")
36     private String name;
37
38     @JsonProperty("Tags")
39     private List<String> tags;
40
41     @JsonProperty("Address")
42     private String address;
43
44     @JsonProperty("Port")
45     private int port;
46     
47     @JsonProperty("Check")
48     @JsonInclude(Include.NON_EMPTY) 
49     private Check check;
50     
51     @JsonInclude(Include.NON_EMPTY)  
52     public class Check{
53         
54         @JsonProperty("HTTP")
55         private String http;
56         
57         @JsonProperty("TCP")
58         private String tcp;
59         
60         @JsonProperty("TTL")
61         private String ttl;
62         
63         @JsonProperty("Interval")
64         private String interval;
65         
66         @JsonProperty("Timeout")
67         private String timeout;
68         
69       
70         private String status="passing";
71         
72         public String getTimeout() {
73           return timeout;
74         }
75         public void setTimeout(String timeout) {
76           this.timeout = timeout;
77         }
78         
79         public String getHttp() {
80             return http;
81         }
82         public void setHttp(String http) {
83             this.http = http;
84         }
85         public String getTcp() {
86             return tcp;
87         }
88         public void setTcp(String tcp) {
89             this.tcp = tcp;
90         }
91         public String getTtl() {
92             return ttl;
93         }
94         public void setTtl(String ttl) {
95             this.ttl = ttl;
96         }
97         public String getInterval() {
98             return interval;
99         }
100         public void setInterval(String interval) {
101             this.interval = interval;
102         }
103         public String getStatus() {
104             return status;
105         }
106         public void setStatus(String status) {
107             this.status = status;
108         }
109       
110         
111     }
112
113     public String getId() {
114         return id;
115     }
116
117     public void setId(String id) {
118         this.id = id;
119     }
120
121    
122
123     public String getName() {
124         return name;
125     }
126
127     public void setName(String name) {
128         this.name = name;
129     }
130
131     public List<String> getTags() {
132         return tags;
133     }
134
135     public void setTags(List<String> tags) {
136         this.tags = tags;
137     }
138
139     public String getAddress() {
140         return address;
141     }
142
143     public void setAddress(String address) {
144         this.address = address;
145     }
146
147     public int getPort() {
148         return port;
149     }
150
151     public void setPort(int port) {
152         this.port = port;
153     }
154     
155     public Check getCheck() {
156         return check;
157     }
158
159     public void setCheck(Check check) {
160         this.check = check;
161     }
162    
163     public Check createCheck(){
164         return new Check();
165          
166     }
167 }