2 * Copyright 2016-2017 ZTE, Inc. and others.
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 * in compliance with the License. You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software distributed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 * or implied. See the License for the specific language governing permissions and limitations under
14 package org.onap.msb.sdclient.core;
16 import java.io.Serializable;
19 import com.google.common.base.Objects;
22 public class MicroServiceFullInfo extends Service<NodeInfo> implements Serializable {
23 private static final long serialVersionUID = 1L;
25 // 状态 0:不可用,待审核 1:可用,审核通过 2:审核失败
26 private String status = "1";
28 private boolean is_manual = false; // 手动注册:true; 自动注册:false
30 private Set<NodeInfo> nodes;
33 public Set<NodeInfo> getNodes() {
37 public void setNodes(Set<NodeInfo> nodes) {
41 public String getStatus() {
45 public void setStatus(String status) {
50 public boolean isIs_manual() {
54 public void setIs_manual(boolean is_manual) {
55 this.is_manual = is_manual;
59 public int hashCode() {
60 return Objects.hashCode(getServiceName(), getVersion(), getProtocol(), getNamespace(), getUrl(),
61 getVisualRange(), nodes);
65 public boolean equals(Object other) {
68 if (other instanceof MicroServiceFullInfo) {
69 MicroServiceFullInfo that = (MicroServiceFullInfo) other;
70 return Objects.equal(getServiceName(), that.getServiceName())
71 && Objects.equal(getVersion(), that.getVersion())
72 && Objects.equal(getProtocol(), that.getProtocol())
73 && Objects.equal(getNamespace(), that.getNamespace())
74 && Objects.equal(getUrl(), that.getUrl())
75 && Objects.equal(getVisualRange(), that.getVisualRange())
76 && Objects.equal(nodes.hashCode(), that.nodes.hashCode());