Remove Chinese comments
[msb/java-sdk.git] / src / main / java / org / onap / msb / sdk / discovery / entity / Node.java
1 /*******************************************************************************
2  * Copyright 2017-2018 ZTE, Inc. and others.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5  * in compliance with the License. You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software distributed under the License
10  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11  * or implied. See the License for the specific language governing permissions and limitations under
12  * the License.
13  ******************************************************************************/
14 package org.onap.msb.sdk.discovery.entity;
15
16 import java.io.Serializable;
17
18 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
19
20
21 @JsonIgnoreProperties(ignoreUnknown = true)
22 public class Node implements Serializable {
23     private static final long serialVersionUID = 1L;
24
25     private String ip;
26
27     private String port;
28
29     private String ttl = "";
30
31     // health check type, allowableValues = "HTTP,TCP, TTL", example = "HTTP")
32     private String checkType = "";
33     // health check url, example for http "http://192.168.0.2:80/heallth", example for tcp
34     // "192.168.1.100:80"
35     private String checkUrl = "";
36
37     // TCP or HTTP health check Interval,Unit: second", example = "10s"
38     private String checkInterval;
39
40     // TCP or HTTP health check TimeOut,Unit: second", example = "10s"
41     private String checkTimeOut;
42
43
44     public String getIp() {
45         return ip;
46     }
47
48     public void setIp(String ip) {
49         this.ip = ip;
50     }
51
52     public String getPort() {
53         return port;
54     }
55
56     public void setPort(String port) {
57         this.port = port;
58     }
59
60     public String getTtl() {
61         return ttl;
62     }
63
64     public void setTtl(String ttl) {
65         this.ttl = ttl;
66     }
67
68     /**
69      * @return the checkType
70      */
71     public String getCheckType() {
72         return checkType;
73     }
74
75     /**
76      * @param checkType the checkType to set
77      */
78     public void setCheckType(String checkType) {
79         this.checkType = checkType;
80     }
81
82     /**
83      * @return the checkUrl
84      */
85     public String getCheckUrl() {
86         return checkUrl;
87     }
88
89     /**
90      * @param checkUrl the checkUrl to set
91      */
92     public void setCheckUrl(String checkUrl) {
93         this.checkUrl = checkUrl;
94     }
95
96     /**
97      * @return the checkInterval
98      */
99     public String getCheckInterval() {
100         return checkInterval;
101     }
102
103     /**
104      * @param checkInterval the checkInterval to set
105      */
106     public void setCheckInterval(String checkInterval) {
107         this.checkInterval = checkInterval;
108     }
109
110     /**
111      * @return the checkTimeOut
112      */
113     public String getCheckTimeOut() {
114         return checkTimeOut;
115     }
116
117     /**
118      * @param checkTimeOut the checkTimeOut to set
119      */
120     public void setCheckTimeOut(String checkTimeOut) {
121         this.checkTimeOut = checkTimeOut;
122     }
123
124     @Override
125     public String toString() {
126         // TODO Auto-generated method stub
127         return (new StringBuilder().append(ip).append(":").append(port).append("  ttl:").append(ttl)).toString();
128     }
129
130 }