1 /*******************************************************************************
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
13 ******************************************************************************/
14 package org.onap.msb.apiroute.wrapper.dao.route.bean;
16 import org.onap.msb.apiroute.wrapper.dao.DAOConstants;
18 import lombok.AllArgsConstructor;
20 import lombok.NoArgsConstructor;
27 public class RouteInfo {
28 private String kind = DAOConstants.ROUTE_KIND;
29 private String apiVersion = "";
30 private String status = "";
31 private Metadata metadata;
35 * Example route: { "kind" : "route", "apiVersion" : "v1", "status" : "1" "metadata" : { "name"
36 * : "kubernetes", "namespace" : "default", "uid" : "0b6f198e-c6ab-11e6-86aa-fa163ee2118b",
37 * "creationTimestamp" : "2016-12-20T11:54:21Z", "updateTimestamp" : "", "labels" : {
38 * "component" : "apiserver", "provider" : "kubernetes" }, "annotations" : {} }, "spec" : {
39 * "visualRange" : 0, "url" : "", "publish_port" : "", "host" : "", "apijson" : "",
40 * "apijsontype" : "" "metricsUrl" : "" "consulServiceName" : "" "useOwnUpstream" : ""
41 * //是否使用该服务独立的upstream转发 "publishProtocol" : "", //发布地址使用http还是http协议 "enable_ssl" : "0|1",
42 * //转发时,使用http还是http转发。http:0/https:1 "controll" : "", //是否可以修改 "nodes" : [{ "ip" : 10.10.10.2,
43 * "port" : 8080, "weight" : "" } ], } }
46 * @Override public boolean equals(Object o) { if (this == o) return true; if (o == null ||
47 * getClass() != o.getClass()) return false; RouteInfo that = (RouteInfo) o; return
48 * Objects.equals(kind, that.kind) && Objects.equals(apiVersion, that.apiVersion) &&
49 * Objects.equals(status, that.status) && Objects.equals(metadata, that.metadata) &&
50 * Objects.equals(spec, that.spec); }
52 * @Override public int hashCode() { return Objects.hash(kind, apiVersion, status, metadata,