2 * Copyright 2016-2017 ZTE, Inc. and others.
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.onap.msb.sdclient.core;
18 import java.io.Serializable;
21 import com.google.common.base.Objects;
24 public class MicroServiceFullInfo extends Service<NodeInfo> implements Serializable {
25 private static final long serialVersionUID = 1L;
27 // 状态 0:不可用,待审核 1:可用,审核通过 2:审核失败
28 private String status = "1";
30 private boolean is_manual=false; //手动注册:true; 自动注册:false
32 private Set<NodeInfo> nodes;
35 public Set<NodeInfo> getNodes() {
39 public void setNodes(Set<NodeInfo> nodes) {
43 public String getStatus() {
46 public void setStatus(String status) {
51 public boolean isIs_manual() {
55 public void setIs_manual(boolean is_manual) {
56 this.is_manual = is_manual;
60 public int hashCode() {
61 return Objects.hashCode(getServiceName(),getVersion(),getProtocol(),getNamespace(),getUrl(),getVisualRange(),nodes);
65 public boolean equals(Object other)
69 if(other instanceof MicroServiceFullInfo)
71 MicroServiceFullInfo that = (MicroServiceFullInfo)other;
72 return Objects.equal(getServiceName(), that.getServiceName())
73 && Objects.equal(getVersion(), that.getVersion())
74 && Objects.equal(getProtocol(), that.getProtocol())
75 && Objects.equal(getNamespace(), that.getNamespace())
76 && Objects.equal(getUrl(), that.getUrl())
77 && Objects.equal(getVisualRange(), that.getVisualRange())
78 && Objects.equal(nodes.hashCode(), that.nodes.hashCode());