package org.opennaas.extensions.ofertie.ncl.provisioner.model; /* * #%L * OpenNaaS :: Generic Network * %% * Copyright (C) 2007 - 2014 Fundació Privada i2CAT, Internet i Innovació a Catalunya * %% * 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 * * 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. * #L% */ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; /** * * @author Adrián Roselló Rey (i2CAT) * */ @XmlRootElement(namespace = "opennaas.api") @XmlAccessorType(XmlAccessType.FIELD) public class User { private String username; private String password; private String sdnModuleUri; public String getUsername() { return username; } public void setUsername(String name) { this.username = name; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getSdnModuleUri() { return sdnModuleUri; } public void setSdnModuleUri(String sdnModuleUri) { this.sdnModuleUri = sdnModuleUri; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((password == null) ? 0 : password.hashCode()); result = prime * result + ((sdnModuleUri == null) ? 0 : sdnModuleUri.hashCode()); result = prime * result + ((username == null) ? 0 : username.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; User other = (User) obj; if (password == null) { if (other.password != null) return false; } else if (!password.equals(other.password)) return false; if (sdnModuleUri == null) { if (other.sdnModuleUri != null) return false; } else if (!sdnModuleUri.equals(other.sdnModuleUri)) return false; if (username == null) { if (other.username != null) return false; } else if (!username.equals(other.username)) return false; return true; } @Override public String toString() { return "User [username=" + username + ", password=" + password + ", sdnModuleUri=" + sdnModuleUri + "]"; } }