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.Arrays;
22 import java.util.Objects;
25 public class ApiRouteInfo extends RouteInfo {
26 private static final long serialVersionUID = 1L;
28 @ApiModelProperty(example = "v1", required = true)
29 private String version;
32 private String apiJson=""; //swagger json Path
34 @ApiModelProperty(value = "[apiJson Type] 0:local file 1: remote file", allowableValues = "0,1", example = "1")
35 private String apiJsonType="1";
36 private String metricsUrl="";
40 public String getVersion() {
43 public void setVersion(String version) {
44 this.version = version;
47 public String getApiJson() {
50 public void setApiJson(String apiJson) {
51 this.apiJson = apiJson;
57 public String getApiJsonType() {
60 public void setApiJsonType(String apiJsonType) {
61 this.apiJsonType = apiJsonType;
63 public String getMetricsUrl() {
66 public void setMetricsUrl(String metricsUrl) {
67 this.metricsUrl = metricsUrl;
74 public Object clone() throws CloneNotSupportedException
80 public boolean equals(Object o) {
81 if (this == o) return true;
82 if (o == null || getClass() != o.getClass()) return false;
83 ApiRouteInfo that = (ApiRouteInfo) o;
84 return Objects.equals(isEnable_ssl(), that.isEnable_ssl()) &&
85 Objects.equals(getServiceName(), that.getServiceName()) &&
86 Objects.equals(version, that.version) &&
87 Objects.equals(getUrl(), that.getUrl()) &&
88 Objects.equals(apiJson, that.apiJson) &&
89 Objects.equals(apiJsonType, that.apiJsonType) &&
90 Objects.equals(metricsUrl, that.metricsUrl) &&
91 Objects.equals(getControl(), that.getControl()) &&
92 Objects.equals(getStatus(), that.getStatus()) &&
93 Objects.equals(getVisualRange(), that.getVisualRange()) &&
94 Objects.equals(getUseOwnUpstream(), that.getUseOwnUpstream()) &&
95 Arrays.equals(getServers(), that.getServers()) &&
96 Objects.equals(getHost(), that.getHost()) &&
97 Objects.equals(getNamespace(), that.getNamespace()) &&
98 Objects.equals(getPublish_port(), that.getPublish_port()) &&
99 Objects.equals(getConsulServiceName(), that.getConsulServiceName()) &&
100 Objects.equals(getPublishProtocol(), that.getPublishProtocol());
104 public int hashCode() {
105 return Objects.hash(getServiceName(), version, getUrl(), apiJson, apiJsonType, metricsUrl, getControl(), getStatus(), getVisualRange(), getServers(), getHost(), getNamespace(), getPublish_port(), isEnable_ssl(), getConsulServiceName(), getPublishProtocol());