2 * Copyright 2016-2017 ZTE, Inc. and others.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onap.msb.sdclient.core;
18 import io.swagger.annotations.ApiModelProperty;
20 import java.io.Serializable;
22 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
24 @JsonIgnoreProperties(ignoreUnknown = true)
25 public class Node implements Serializable {
26 private static final long serialVersionUID = 1L;
28 @ApiModelProperty(example = "127.0.0.1",required = true)
31 @ApiModelProperty(example = "80", required = true)
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;
40 @ApiModelProperty(value = "health check type", allowableValues = "TTL,HTTP,TCP", example = "TTL")
41 private String checkType="";
43 @ApiModelProperty(value = "health check URL,applies only to TCP or HTTP", example = "http://localhost:5000/health")
44 private String checkUrl="";
46 @ApiModelProperty(value = "TCP or HTTP health check Interval,Unit: second", example = "10s")
47 private String checkInterval;
49 @ApiModelProperty(value = "TCP or HTTP health check TimeOut,Unit: second", example = "10s")
50 private String checkTimeOut;
52 @ApiModelProperty(value = "TTL health check Interval,Unit: second", example = "10s")
56 @ApiModelProperty(value = "Instance HA_role", allowableValues = "active,standby", example = "active")
57 private String ha_role="";
63 public String getHa_role() {
67 public void setHa_role(String ha_role) {
68 this.ha_role = ha_role;
71 public String getIp() {
75 public void setIp(String ip) {
79 public String getPort() {
83 public void setPort(String port) {
87 public String getTtl() {
91 public void setTtl(String ttl) {
99 public Node(String ip,String port){
104 public String getLb_server_params() {
105 return lb_server_params;
108 public void setLb_server_params(String lb_server_params) {
109 this.lb_server_params = lb_server_params;
113 public String getCheckType() {
117 public void setCheckType(String checkType) {
118 this.checkType = checkType;
121 public String getCheckUrl() {
125 public void setCheckUrl(String checkUrl) {
126 this.checkUrl = checkUrl;
129 public String getCheckInterval() {
130 return checkInterval;
133 public void setCheckInterval(String checkInterval) {
134 this.checkInterval = checkInterval;
137 public String getCheckTimeOut() {
141 public void setCheckTimeOut(String checkTimeOut) {
142 this.checkTimeOut = checkTimeOut;