/* * mxisd - Matrix Identity Server Daemon * Copyright (C) 2017 Maxime Dor * * https://max.kamax.io/ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ package io.kamax.mxisd.lookup; import groovy.json.JsonOutput; public class ThreePidMapping { private String medium; private String value; private String mxid; public String getMedium() { return medium; } public void setMedium(String medium) { this.medium = medium; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getMxid() { return mxid; } public void setMxid(String mxid) { this.mxid = mxid; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ThreePidMapping that = (ThreePidMapping) o; if (medium != null ? !medium.equals(that.medium) : that.medium != null) return false; return value != null ? value.equals(that.value) : that.value == null; } @Override public int hashCode() { int result = medium != null ? medium.hashCode() : 0; result = 31 * result + (value != null ? value.hashCode() : 0); return result; } @Override public String toString() { return JsonOutput.toJson(this); } }