Fix java check style issue
[msb/discovery.git] / sdclient / discovery-service / src / main / java / org / onap / msb / sdclient / core / Node.java
1 /**
2  * Copyright 2016-2017 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.sdclient.core;
15
16 import java.io.Serializable;
17
18 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
19
20 import io.swagger.annotations.ApiModelProperty;
21
22 @JsonIgnoreProperties(ignoreUnknown = true)
23 public class Node implements Serializable {
24     private static final long serialVersionUID = 1L;
25
26     @ApiModelProperty(example = "127.0.0.1", required = true)
27     private String ip;
28
29     @ApiModelProperty(example = "80", required = true)
30     private String port;
31
32
33     // 负载均衡策略参数
34     @ApiModelProperty(value = "lb node params", allowableValues = "weight,max_fails,fail_timeout",
35                     example = "weight=5,max_fails=3,fail_timeout=30s")
36     private String lb_server_params;
37
38     // 健康检查参数
39     @ApiModelProperty(value = "health check type", allowableValues = "TTL,HTTP,TCP", example = "TTL")
40     private String checkType = "";
41
42     @ApiModelProperty(value = "health check URL,applies only to TCP or HTTP", example = "http://localhost:5000/health")
43     private String checkUrl = "";
44
45     @ApiModelProperty(value = "TCP or HTTP health check Interval,Unit: second", example = "10s")
46     private String checkInterval;
47
48     @ApiModelProperty(value = "TCP or HTTP health check TimeOut,Unit: second", example = "10s")
49     private String checkTimeOut;
50
51     @ApiModelProperty(value = "TTL health check Interval,Unit: second", example = "10s")
52     private String ttl;
53
54
55     @ApiModelProperty(value = "Instance HA_role", allowableValues = "active,standby", example = "active")
56     private String ha_role = "";
57
58
59
60     public String getHa_role() {
61         return ha_role;
62     }
63
64     public void setHa_role(String ha_role) {
65         this.ha_role = ha_role;
66     }
67
68     public String getIp() {
69         return ip;
70     }
71
72     public void setIp(String ip) {
73         this.ip = ip;
74     }
75
76     public String getPort() {
77         return port;
78     }
79
80     public void setPort(String port) {
81         this.port = port;
82     }
83
84     public String getTtl() {
85         return ttl;
86     }
87
88     public void setTtl(String ttl) {
89         this.ttl = ttl;
90     }
91
92     public Node() {
93
94     }
95
96     public Node(String ip, String port) {
97         this.ip = ip;
98         this.port = port;
99     }
100
101     public String getLb_server_params() {
102         return lb_server_params;
103     }
104
105     public void setLb_server_params(String lb_server_params) {
106         this.lb_server_params = lb_server_params;
107     }
108
109
110     public String getCheckType() {
111         return checkType;
112     }
113
114     public void setCheckType(String checkType) {
115         this.checkType = checkType;
116     }
117
118     public String getCheckUrl() {
119         return checkUrl;
120     }
121
122     public void setCheckUrl(String checkUrl) {
123         this.checkUrl = checkUrl;
124     }
125
126     public String getCheckInterval() {
127         return checkInterval;
128     }
129
130     public void setCheckInterval(String checkInterval) {
131         this.checkInterval = checkInterval;
132     }
133
134     public String getCheckTimeOut() {
135         return checkTimeOut;
136     }
137
138     public void setCheckTimeOut(String checkTimeOut) {
139         this.checkTimeOut = checkTimeOut;
140     }
141
142
143
144 }