2 * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.openo.msb.api;
18 import io.swagger.annotations.ApiModelProperty;
20 import java.io.Serializable;
22 import com.fasterxml.jackson.annotation.JsonInclude;
23 import com.fasterxml.jackson.annotation.JsonInclude.Include;
26 public class ApiRouteInfo implements Serializable{
27 private static final long serialVersionUID = 1L;
28 @ApiModelProperty(required = true)
29 private String serviceName;
31 @ApiModelProperty(example = "v1", required = true)
32 private String version;
34 @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)
37 private String apiJson=""; //swagger json Path
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="";
43 @ApiModelProperty(value = "[control Range] 0:default 1:readonly 2:hidden ", allowableValues = "0,1,2", example = "0")
44 private String control="0";
46 @ApiModelProperty(value = "[status] 1:abled 0:disabled ", allowableValues = "0,1", example = "1")
47 private String status="1";
49 @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")
50 private String visualRange = "1";
52 @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")
53 private String useOwnUpstream="0"; //负载均衡策略
55 @ApiModelProperty(required = true)
56 private RouteServer servers[];
60 public String getServiceName() {
63 public void setServiceName(String serviceName) {
64 this.serviceName = serviceName;
66 public String getVersion() {
69 public void setVersion(String version) {
70 this.version = version;
73 public String getApiJson() {
76 public void setApiJson(String apiJson) {
77 this.apiJson = apiJson;
80 public String getUrl() {
83 public void setUrl(String url) {
86 public RouteServer[] getServers() {
89 public void setServers(RouteServer[] servers) {
90 this.servers = servers;
94 public String getApiJsonType() {
97 public void setApiJsonType(String apiJsonType) {
98 this.apiJsonType = apiJsonType;
100 public String getMetricsUrl() {
103 public void setMetricsUrl(String metricsUrl) {
104 this.metricsUrl = metricsUrl;
106 public String getControl() {
109 public void setControl(String control) {
110 this.control = control;
112 public String getStatus() {
115 public void setStatus(String status) {
116 this.status = status;
118 public String getVisualRange() {
121 public void setVisualRange(String visualRange) {
122 this.visualRange = visualRange;
124 public String getUseOwnUpstream() {
125 return useOwnUpstream;
128 public void setUseOwnUpstream(String useOwnUpstream) {
129 this.useOwnUpstream = useOwnUpstream;