2 * Copyright 2016-2017 ZTE, Inc. and others.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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
14 package org.onap.msb.sdclient.core;
16 import java.io.Serializable;
18 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
20 import io.swagger.annotations.ApiModelProperty;
22 @JsonIgnoreProperties(ignoreUnknown = true)
23 public class Node implements Serializable {
24 private static final long serialVersionUID = 1L;
26 @ApiModelProperty(example = "127.0.0.1", required = true)
29 @ApiModelProperty(example = "80", required = true)
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;
39 @ApiModelProperty(value = "health check type", allowableValues = "TTL,HTTP,TCP", example = "TTL")
40 private String checkType = "";
42 @ApiModelProperty(value = "health check URL,applies only to TCP or HTTP", example = "http://localhost:5000/health")
43 private String checkUrl = "";
45 @ApiModelProperty(value = "TCP or HTTP health check Interval,Unit: second", example = "10s")
46 private String checkInterval;
48 @ApiModelProperty(value = "TCP or HTTP health check TimeOut,Unit: second", example = "10s")
49 private String checkTimeOut;
51 @ApiModelProperty(value = "TTL health check Interval,Unit: second", example = "10s")
55 @ApiModelProperty(value = "Instance HA_role", allowableValues = "active,standby", example = "active")
56 private String ha_role = "";
60 public String getHa_role() {
64 public void setHa_role(String ha_role) {
65 this.ha_role = ha_role;
68 public String getIp() {
72 public void setIp(String ip) {
76 public String getPort() {
80 public void setPort(String port) {
84 public String getTtl() {
88 public void setTtl(String ttl) {
96 public Node(String ip, String port) {
101 public String getLb_server_params() {
102 return lb_server_params;
105 public void setLb_server_params(String lb_server_params) {
106 this.lb_server_params = lb_server_params;
110 public String getCheckType() {
114 public void setCheckType(String checkType) {
115 this.checkType = checkType;
118 public String getCheckUrl() {
122 public void setCheckUrl(String checkUrl) {
123 this.checkUrl = checkUrl;
126 public String getCheckInterval() {
127 return checkInterval;
130 public void setCheckInterval(String checkInterval) {
131 this.checkInterval = checkInterval;
134 public String getCheckTimeOut() {
138 public void setCheckTimeOut(String checkTimeOut) {
139 this.checkTimeOut = checkTimeOut;