package org.kne.cloud.network.srv6; import java.util.UUID; public class KLALBRoutingProtocolJsonData { public static final String NODE_INFO_TINY_REQ="nodeinfotinyreq";// 精简查询:仅设备名称 public static final String NODE_INFO_TINY_RESP="nodeinfotinyresp"; public static final String NODE_INFO_FULL_REQ="nodeinfofullreq";// 完整查询:开放线路+设备名称+设备描述 public static final String NODE_INFO_FULL_RESP="nodeinfofullresp"; private String type; private UUID uuid; private Object data; private String deviceName;// 对端设备名称 private String deviceDescription;// 对端设备描述 public String getDeviceName() { return deviceName; } public void setDeviceName(String deviceName) { this.deviceName = deviceName; } public String getDeviceDescription() { return deviceDescription; } public void setDeviceDescription(String deviceDescription) { this.deviceDescription = deviceDescription; } public String getType() { return type; } public Object getData() { return data; } public UUID getUuid() { return uuid; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((data == null) ? 0 : data.hashCode()); result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + ((uuid == null) ? 0 : uuid.hashCode()); result = prime * result + ((deviceName == null) ? 0 : deviceName.hashCode()); result = prime * result + ((deviceDescription == null) ? 0 : deviceDescription.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; KLALBRoutingProtocolJsonData other = (KLALBRoutingProtocolJsonData) obj; if (data == null) { if (other.data != null) return false; } else if (!data.equals(other.data)) return false; if (type == null) { if (other.type != null) return false; } else if (!type.equals(other.type)) return false; if (uuid == null) { if (other.uuid != null) return false; } else if (!uuid.equals(other.uuid)) return false; if (deviceName == null) { if (other.deviceName != null) return false; } else if (!deviceName.equals(other.deviceName)) return false; if (deviceDescription == null) { if (other.deviceDescription != null) return false; } else if (!deviceDescription.equals(other.deviceDescription)) return false; return true; } public KLALBRoutingProtocolJsonData(String type, UUID uuid, Object data) { super(); this.type = type; this.uuid = uuid; this.data = data; } @Override public String toString() { return "KLALBRoutingProtocolJsonData [type=" + type + ", uuid=" + uuid + ", data=" + data + ", deviceName=" + deviceName + ", deviceDescription=" + deviceDescription + "]"; } }