Add license header for java files
[msb/apigateway.git] / apiroute / apiroute-service / src / main / java / org / onap / msb / apiroute / wrapper / dao / route / bean / RouteInfo.java
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.route.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 RouteInfo {
30     private String kind = DAOConstants.ROUTE_KIND;
31     private String apiVersion = "";
32     private String status = "";
33     private Metadata metadata;
34     private Spec spec;
35
36     /**
37  Example route:
38  {
39         "kind" : "route",
40         "apiVersion" : "v1",
41      "status" : "1"
42         "metadata" : {
43                 "name" : "kubernetes",
44                 "namespace" : "default",
45                 "uid" : "0b6f198e-c6ab-11e6-86aa-fa163ee2118b",
46                 "creationTimestamp" : "2016-12-20T11:54:21Z",
47                 "updateTimestamp" : "",
48                 "labels" : {
49                         "component" : "apiserver",
50                         "provider" : "kubernetes"
51                 },
52                 "annotations" : {}
53         },
54         "spec" : {
55                 "visualRange" : 0,
56                 "url" : "",
57                 "publish_port" : "",
58                 "host" : "",
59                 "apijson" : "",
60                 "apijsontype" : ""
61                 "metricsUrl" : ""
62                 "consulServiceName" : ""
63                 "useOwnUpstream" : "" //是否使用该服务独立的upstream转发
64                 "publishProtocol" : "", //发布地址使用http还是http协议
65                 "enable_ssl" : "0|1", //转发时,使用http还是http转发。http:0/https:1
66                 "controll" : "", //是否可以修改
67                 "nodes" : [{
68                                 "ip" : 10.10.10.2,
69                                 "port" : 8080,
70                                 "weight" : ""
71                         }
72                 ],
73         }
74 }
75      */
76         /*
77     @Override
78     public boolean equals(Object o) {
79         if (this == o) return true;
80         if (o == null || getClass() != o.getClass()) return false;
81         RouteInfo that = (RouteInfo) o;
82         return Objects.equals(kind, that.kind) &&
83                 Objects.equals(apiVersion, that.apiVersion) &&
84                 Objects.equals(status, that.status) &&
85                 Objects.equals(metadata, that.metadata) &&
86                 Objects.equals(spec, that.spec);
87     }
88
89     @Override
90     public int hashCode() {
91         return Objects.hash(kind, apiVersion, status, metadata, spec);
92     }
93     */
94 }