Divide the MSB source codes into two repos
[msb/apigateway.git] / apiroute / apiroute-service / src / main / java / org / onap / msb / apiroute / wrapper / dao / route / bean / RouteInfo.java
1 package org.onap.msb.apiroute.wrapper.dao.route.bean;
2
3 import org.onap.msb.apiroute.wrapper.dao.DAOConstants;
4
5 import lombok.AllArgsConstructor;
6 import lombok.Getter;
7 import lombok.NoArgsConstructor;
8 import lombok.Setter;
9
10 @AllArgsConstructor
11 @NoArgsConstructor
12 @Getter
13 @Setter
14 public class RouteInfo {
15     private String kind = DAOConstants.ROUTE_KIND;
16     private String apiVersion = "";
17     private String status = "";
18     private Metadata metadata;
19     private Spec spec;
20
21     /**
22  Example route:
23  {
24         "kind" : "route",
25         "apiVersion" : "v1",
26      "status" : "1"
27         "metadata" : {
28                 "name" : "kubernetes",
29                 "namespace" : "default",
30                 "uid" : "0b6f198e-c6ab-11e6-86aa-fa163ee2118b",
31                 "creationTimestamp" : "2016-12-20T11:54:21Z",
32                 "updateTimestamp" : "",
33                 "labels" : {
34                         "component" : "apiserver",
35                         "provider" : "kubernetes"
36                 },
37                 "annotations" : {}
38         },
39         "spec" : {
40                 "visualRange" : 0,
41                 "url" : "",
42                 "publish_port" : "",
43                 "host" : "",
44                 "apijson" : "",
45                 "apijsontype" : ""
46                 "metricsUrl" : ""
47                 "consulServiceName" : ""
48                 "useOwnUpstream" : "" //是否使用该服务独立的upstream转发
49                 "publishProtocol" : "", //发布地址使用http还是http协议
50                 "enable_ssl" : "0|1", //转发时,使用http还是http转发。http:0/https:1
51                 "controll" : "", //是否可以修改
52                 "nodes" : [{
53                                 "ip" : 10.10.10.2,
54                                 "port" : 8080,
55                                 "weight" : ""
56                         }
57                 ],
58         }
59 }
60      */
61         /*
62     @Override
63     public boolean equals(Object o) {
64         if (this == o) return true;
65         if (o == null || getClass() != o.getClass()) return false;
66         RouteInfo that = (RouteInfo) o;
67         return Objects.equals(kind, that.kind) &&
68                 Objects.equals(apiVersion, that.apiVersion) &&
69                 Objects.equals(status, that.status) &&
70                 Objects.equals(metadata, that.metadata) &&
71                 Objects.equals(spec, that.spec);
72     }
73
74     @Override
75     public int hashCode() {
76         return Objects.hash(kind, apiVersion, status, metadata, spec);
77     }
78     */
79 }