Issue-id: OCS-9
[msb/apigateway.git] / msb-core / apiroute / apiroute-service / src / main / java / org / openo / msb / api / ApiRouteInfo.java
1 /**
2  * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
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.openo.msb.api;
17
18 import io.swagger.annotations.ApiModelProperty;
19
20 import java.io.Serializable;
21
22 import com.fasterxml.jackson.annotation.JsonInclude;
23 import com.fasterxml.jackson.annotation.JsonInclude.Include;
24
25
26 public class ApiRouteInfo implements Serializable{
27         private static final long serialVersionUID = 1L;
28         @ApiModelProperty(required = true)
29         private String  serviceName;    
30         
31         @ApiModelProperty(example = "v1", required = true)
32         private String  version;  
33         
34         @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)
35         private String  url;       
36         
37         private String  apiJson="";  //swagger json Path
38         
39          @ApiModelProperty(value = "[apiJson Type] 0:local file  1: remote file", allowableValues = "0,1", example = "1")
40         private String apiJsonType="1";  
41         private String  metricsUrl="";     
42     
43         @ApiModelProperty(value = "[control Range] 0:default   1:readonly  2:hidden ", allowableValues = "0,1,2", example = "0")
44         private String  control="0";     
45     
46         @ApiModelProperty(value = "[status] 1:abled    0:disabled ", allowableValues = "0,1", example = "1")
47         private String  status="1"; 
48    
49         @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")
50         private String visualRange = "1";   
51    
52         @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")
53     private String useOwnUpstream="0"; //负载均衡策略   
54         
55     @ApiModelProperty(required = true)
56         private RouteServer servers[]; 
57         
58         
59         
60         public String getServiceName() {
61                 return serviceName;
62         }
63         public void setServiceName(String serviceName) {
64                 this.serviceName = serviceName;
65         }
66         public String getVersion() {
67                 return version;
68         }
69         public void setVersion(String version) {
70                 this.version = version;
71         }
72         
73         public String getApiJson() {
74                 return apiJson;
75         }
76         public void setApiJson(String apiJson) {
77                 this.apiJson = apiJson;
78         }
79         
80         public String getUrl() {
81                 return url;
82         }
83         public void setUrl(String url) {
84                 this.url = url;
85         }
86         public RouteServer[] getServers() {
87                 return servers;
88         }
89         public void setServers(RouteServer[] servers) {
90                 this.servers = servers;
91         }
92         
93
94         public String getApiJsonType() {
95                 return apiJsonType;
96         }
97         public void setApiJsonType(String apiJsonType) {
98                 this.apiJsonType = apiJsonType;
99         }
100         public String getMetricsUrl() {
101                 return metricsUrl;
102         }
103         public void setMetricsUrl(String metricsUrl) {
104                 this.metricsUrl = metricsUrl;
105         }
106         public String getControl() {
107                 return control;
108         }
109         public void setControl(String control) {
110                 this.control = control;
111         }
112         public String getStatus() {
113                 return status;
114         }
115         public void setStatus(String status) {
116                 this.status = status;
117         }
118     public String getVisualRange() {
119         return visualRange;
120     }
121     public void setVisualRange(String visualRange) {
122         this.visualRange = visualRange;
123     }
124     public String getUseOwnUpstream() {
125         return useOwnUpstream;
126     }
127
128     public void setUseOwnUpstream(String useOwnUpstream) {
129         this.useOwnUpstream = useOwnUpstream;
130     }
131
132
133         
134         
135
136 }