X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=sdclient%2Fdiscovery-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fmsb%2Fsdclient%2Fcore%2FService.java;h=b1586630c939aefb91f0c6b520ccf362e24c793e;hb=c9ca9000bc557bf62f4193163d4306a414e1b2c3;hp=34145b8933311d4531bc187031c466bf452d01b3;hpb=2e7482cf8b50de9fb028ccd736901c3a1a9e3fbe;p=msb%2Fdiscovery.git diff --git a/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/Service.java b/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/Service.java index 34145b8..b158663 100644 --- a/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/Service.java +++ b/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/Service.java @@ -1,17 +1,15 @@ /** * Copyright 2016-2017 ZTE, Inc. and others. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. */ package org.onap.msb.sdclient.core; @@ -19,9 +17,6 @@ import java.io.Serializable; import java.util.List; import java.util.Set; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import io.swagger.annotations.ApiModelProperty; @@ -31,81 +26,81 @@ import io.swagger.annotations.ApiModelProperty; public class Service implements Serializable { private static final long serialVersionUID = 1L; // 服务名 - @ApiModelProperty(example = "test",required = true) + @ApiModelProperty(example = "test", required = true) private String serviceName; // 版本号 @ApiModelProperty(example = "v1", required = true) - private String version=""; + private String version = ""; // 服务url - @ApiModelProperty(value = "Target Service URL,start with /",example = "/api/serviceName/v1", required = true) - private String url=""; - - // 服务对应协议,比如REST、UI、MQ、FTP、SNMP、TCP、UDP - @ApiModelProperty(value = "Service Protocol", allowableValues = "REST,UI, HTTP, TCP,UDP", example = "HTTP",required = true) + @ApiModelProperty(value = "Target Service URL,start with /", example = "/api/serviceName/v1", required = true) + private String url = ""; + + // 服务对应协议,比如REST、UI、MQ、FTP、SNMP、TCP、UDP + @ApiModelProperty(value = "Service Protocol", allowableValues = "REST,UI, HTTP, TCP,UDP", example = "HTTP", + required = true) private String protocol = ""; - - //服务的可见范围 0:系统间 1:系统内 ,可配置多个,以 |分隔 + + // 服务的可见范围 0:系统间 1:系统内 ,可配置多个,以 |分隔 @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1") private String visualRange = "1"; - - //负载均衡策略类型 + + // 负载均衡策略类型 @ApiModelProperty(value = "lb policy", allowableValues = "round-robin,ip_hash", example = "ip_hash") private String lb_policy; - - //TCP/UDP协议监听端口 + + // TCP/UDP协议监听端口 @ApiModelProperty(hidden = true) private String publish_port; - - //命名空间 - private String namespace=""; - //网络平面 + // 命名空间 + private String namespace = ""; + + // 网络平面 @ApiModelProperty(hidden = true) private String network_plane_type; - + @ApiModelProperty(hidden = true) - private String host=""; - + private String host = ""; + @ApiModelProperty(hidden = true) - private String path=""; + private String path = ""; - @ApiModelProperty(required = true) private Set nodes; - - //服务自身属性的键值对 + + // 服务自身属性的键值对 private List metadata; - - //自定义标签 + + // 自定义标签 @ApiModelProperty(value = "custom labels", example = "key1:value1") private List labels; - + public String getHost() { - return host; + return host; } public void setHost(String host) { - this.host = host; + this.host = host; } public String getPath() { - return path; + return path; } public void setPath(String path) { - this.path = path; + this.path = path; } - + public List getLabels() { - return labels; + return labels; } public void setLabels(List labels) { - this.labels = labels; + this.labels = labels; } public Set getNodes() { @@ -115,33 +110,40 @@ public class Service implements Serializable { public void setNodes(Set nodes) { this.nodes = nodes; } - + public String getServiceName() { return serviceName; } + public void setServiceName(String serviceName) { this.serviceName = serviceName; } + public String getVersion() { return version; } + public void setVersion(String version) { this.version = version; } + public String getUrl() { return url; } + public void setUrl(String url) { this.url = url; } + public String getProtocol() { return protocol; } + public void setProtocol(String protocol) { this.protocol = protocol; } - - + + public List getMetadata() { return metadata; @@ -150,7 +152,7 @@ public class Service implements Serializable { public void setMetadata(List metadata) { this.metadata = metadata; } - + public String getVisualRange() { return visualRange; @@ -185,10 +187,10 @@ public class Service implements Serializable { } public String getNetwork_plane_type() { - return network_plane_type; + return network_plane_type; } public void setNetwork_plane_type(String network_plane_type) { - this.network_plane_type = network_plane_type; + this.network_plane_type = network_plane_type; } }