1 /*******************************************************************************
2 * Copyright 2016-2018 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
13 ******************************************************************************/
14 package org.onap.msb.apiroute.api;
16 import java.io.Serializable;
17 import java.util.Objects;
19 import io.swagger.annotations.ApiModelProperty;
21 public class Node implements Serializable {
22 private static final long serialVersionUID = 1L;
24 @ApiModelProperty(required = true)
27 @ApiModelProperty(required = true)
30 private String status = "passing";
34 // health check type, allowableValues = "HTTP,TCP", example = "HTTP")
35 private String checkType = "";
36 // health check url, example for http "http://192.168.0.2:80/heallth", example for tcp
38 private String checkUrl = "";
40 // TCP or HTTP health check Interval,Unit: second", example = "10s"
41 private String checkInterval;
43 // TCP or HTTP health check TimeOut,Unit: second", example = "10s"
44 private String checkTimeOut;
46 private Boolean tls_skip_verify = true;
48 * @return the checkType
50 public String getCheckType() {
55 * @param checkType the checkType to set
57 public void setCheckType(String checkType) {
58 this.checkType = checkType;
62 * @return the checkUrl
64 public String getCheckUrl() {
69 * @param checkUrl the checkUrl to set
71 public void setCheckUrl(String checkUrl) {
72 this.checkUrl = checkUrl;
76 * @return the checkInterval
78 public String getCheckInterval() {
83 * @param checkInterval the checkInterval to set
85 public void setCheckInterval(String checkInterval) {
86 this.checkInterval = checkInterval;
90 * @return the checkTimeOut
92 public String getCheckTimeOut() {
97 * @param checkTimeOut the checkTimeOut to set
99 public void setCheckTimeOut(String checkTimeOut) {
100 this.checkTimeOut = checkTimeOut;
103 public String getStatus() {
107 public void setStatus(String status) {
108 this.status = status;
111 public String getIp() {
115 public void setIp(String ip) {
119 public String getPort() {
123 public void setPort(String port) {
127 public int getTtl() {
131 public void setTtl(int ttl) {
139 public Node(String ip, String port, int ttl) {
145 public Node(String ip, String port) {
151 public boolean equals(Object o) {
154 if (o == null || getClass() != o.getClass())
156 Node node = (Node) o;
157 return Objects.equals(ttl, node.ttl) && Objects.equals(ip, node.ip) && Objects.equals(port, node.port)
158 && Objects.equals(status, node.status);
162 public int hashCode() {
163 return Objects.hash(ip, port, status, ttl);