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