2 * Copyright 2016 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.apiroute.api;
18 import io.swagger.annotations.ApiModelProperty;
20 import java.io.Serializable;
21 import java.util.Objects;
24 public class RouteServer implements Serializable{
25 private static final long serialVersionUID = 1L;
26 @ApiModelProperty(required = true)
29 @ApiModelProperty(required = true)
33 public String getIp() {
37 public void setIp(String ip) {
43 public int getWeight() {
47 public void setWeight(int weight) {
55 public RouteServer(String ip,String port){
61 public String getPort() {
65 public void setPort(String port) {
70 public boolean equals(Object o) {
71 if (this == o) return true;
72 if (o == null || getClass() != o.getClass()) return false;
73 RouteServer that = (RouteServer) o;
74 return Objects.equals(weight, that.weight) &&
75 Objects.equals(ip, that.ip) &&
76 Objects.equals(port, that.port);
80 public int hashCode() {
81 return Objects.hash(ip, port, weight);