2 * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
16 package org.openo.msb.api;
\r
18 import io.swagger.annotations.ApiModelProperty;
\r
20 import java.io.Serializable;
\r
22 import com.fasterxml.jackson.annotation.JsonInclude;
\r
23 import com.fasterxml.jackson.annotation.JsonInclude.Include;
\r
26 public class ApiRouteInfo implements Serializable{
\r
27 private static final long serialVersionUID = 1L;
\r
28 @ApiModelProperty(required = true)
\r
29 private String serviceName;
\r
31 @ApiModelProperty(example = "v1", required = true)
\r
32 private String version;
\r
34 @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)
\r
35 private String url;
\r
37 private String apiJson=""; //swagger json Path
\r
39 @ApiModelProperty(value = "[apiJson Type] 0:local file 1: remote file", allowableValues = "0,1", example = "1")
\r
40 private String apiJsonType="1";
\r
41 private String metricsUrl="";
\r
43 @ApiModelProperty(value = "[control Range] 0:default 1:readonly 2:hidden ", allowableValues = "0,1,2", example = "0")
\r
44 private String control="0";
\r
46 @ApiModelProperty(value = "[status] 1:abled 0:disabled ", allowableValues = "0,1", example = "1")
\r
47 private String status="1";
\r
49 @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")
\r
50 private String visualRange = "1";
\r
52 @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")
\r
53 private String useOwnUpstream="0"; //负载均衡策略
\r
55 @ApiModelProperty(required = true)
\r
56 private RouteServer servers[];
\r
60 public String getServiceName() {
\r
63 public void setServiceName(String serviceName) {
\r
64 this.serviceName = serviceName;
\r
66 public String getVersion() {
\r
69 public void setVersion(String version) {
\r
70 this.version = version;
\r
73 public String getApiJson() {
\r
76 public void setApiJson(String apiJson) {
\r
77 this.apiJson = apiJson;
\r
80 public String getUrl() {
\r
83 public void setUrl(String url) {
\r
86 public RouteServer[] getServers() {
\r
89 public void setServers(RouteServer[] servers) {
\r
90 this.servers = servers;
\r
94 public String getApiJsonType() {
\r
97 public void setApiJsonType(String apiJsonType) {
\r
98 this.apiJsonType = apiJsonType;
\r
100 public String getMetricsUrl() {
\r
103 public void setMetricsUrl(String metricsUrl) {
\r
104 this.metricsUrl = metricsUrl;
\r
106 public String getControl() {
\r
109 public void setControl(String control) {
\r
110 this.control = control;
\r
112 public String getStatus() {
\r
115 public void setStatus(String status) {
\r
116 this.status = status;
\r
118 public String getVisualRange() {
\r
119 return visualRange;
\r
121 public void setVisualRange(String visualRange) {
\r
122 this.visualRange = visualRange;
\r
124 public String getUseOwnUpstream() {
\r
125 return useOwnUpstream;
\r
128 public void setUseOwnUpstream(String useOwnUpstream) {
\r
129 this.useOwnUpstream = useOwnUpstream;
\r