Divide the MSB source codes into two repos
[msb/apigateway.git] / apiroute / apiroute-service / src / main / java / org / onap / msb / apiroute / wrapper / dao / service / bean / ServiceInfo.java
1 package org.onap.msb.apiroute.wrapper.dao.service.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 ServiceInfo {
15     private String kind = DAOConstants.SERVICE_KIND;
16     private String apiVersion = "";
17     private String status = "";
18     private Metadata metadata;
19     private Spec spec;
20
21     /**
22  Example Service:
23          {
24          "kind" : "service",
25          "apiVersion" : "v1",
26          "metadata" : {
27          "name" : "kubernetes",
28          "namespace" : "default",
29          "uid" : "0b6f198e-c6ab-11e6-86aa-fa163ee2118b",
30          "creationTimestamp" : "2016-12-20T11:54:21Z",
31          "labels" : {
32          "component" : "apiserver",
33          "provider" : "kubernetes"
34          },
35          "annotations" : {}
36          },
37          "spec" : {
38          "visualRange" : 0,
39          "url" : "",
40          "path" : "",
41          "publish_port" : "",
42          "host" : "",
43          "protocol" : "",
44          "lb_policy" : "",
45          "enable_ssl" : "0|1", //转发时,使用http还是http转发。http:0/https:1
46          "nodes" : [{
47          "ip" : 10.10.10.2,
48          "port" : 8080,
49          "ttl" :
50          }
51          ],
52          }
53          "status" : ""
54          }
55
56      */
57
58         /*
59         @Override
60         public boolean equals(Object o) {
61                 if (this == o) return true;
62                 if (o == null || getClass() != o.getClass()) return false;
63                 ServiceInfo that = (ServiceInfo) o;
64                 return Objects.equals(kind, that.kind) &&
65                                 Objects.equals(apiVersion, that.apiVersion) &&
66                                 Objects.equals(status, that.status) &&
67                                 Objects.equals(metadata, that.metadata) &&
68                                 Objects.equals(spec, that.spec);
69         }
70
71         @Override
72         public int hashCode() {
73                 return Objects.hash(kind, apiVersion, status, metadata, spec);
74         }
75         */
76 }