800c77f51758e0018738973cb180d2de58ff0baa
[msb/apigateway.git] /
1 /*******************************************************************************
2  * Copyright 2016-2017 ZTE, Inc. and others.
3  * 
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
7  * 
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  * 
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.
15  ******************************************************************************/
16 package org.onap.msb.apiroute.wrapper.dao.service.bean;
17
18 import org.onap.msb.apiroute.wrapper.dao.DAOConstants;
19
20 import lombok.AllArgsConstructor;
21 import lombok.Getter;
22 import lombok.NoArgsConstructor;
23 import lombok.Setter;
24
25 @AllArgsConstructor
26 @NoArgsConstructor
27 @Getter
28 @Setter
29 public class ServiceInfo {
30     private String kind = DAOConstants.SERVICE_KIND;
31     private String apiVersion = "";
32     private String status = "";
33     private Metadata metadata;
34     private Spec spec;
35
36     /**
37  Example Service:
38          {
39          "kind" : "service",
40          "apiVersion" : "v1",
41          "metadata" : {
42          "name" : "kubernetes",
43          "namespace" : "default",
44          "uid" : "0b6f198e-c6ab-11e6-86aa-fa163ee2118b",
45          "creationTimestamp" : "2016-12-20T11:54:21Z",
46          "labels" : {
47          "component" : "apiserver",
48          "provider" : "kubernetes"
49          },
50          "annotations" : {}
51          },
52          "spec" : {
53          "visualRange" : 0,
54          "url" : "",
55          "path" : "",
56          "publish_port" : "",
57          "host" : "",
58          "protocol" : "",
59          "lb_policy" : "",
60          "enable_ssl" : "0|1", //转发时,使用http还是http转发。http:0/https:1
61          "nodes" : [{
62          "ip" : 10.10.10.2,
63          "port" : 8080,
64          "ttl" :
65          }
66          ],
67          }
68          "status" : ""
69          }
70
71      */
72
73         /*
74         @Override
75         public boolean equals(Object o) {
76                 if (this == o) return true;
77                 if (o == null || getClass() != o.getClass()) return false;
78                 ServiceInfo that = (ServiceInfo) o;
79                 return Objects.equals(kind, that.kind) &&
80                                 Objects.equals(apiVersion, that.apiVersion) &&
81                                 Objects.equals(status, that.status) &&
82                                 Objects.equals(metadata, that.metadata) &&
83                                 Objects.equals(spec, that.spec);
84         }
85
86         @Override
87         public int hashCode() {
88                 return Objects.hash(kind, apiVersion, status, metadata, spec);
89         }
90         */
91 }