rapture.common.model.RaptureUser Maven / Gradle / Ivy
/**
* The MIT License (MIT)
*
* Copyright (C) 2011-2016 Incapture Technologies LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* This file is autogenerated and any changes will be overwritten.
*/
package rapture.common.model;
import rapture.common.*;
import rapture.object.Searchable;
import rapture.object.Storable;
import rapture.object.Debugable;
import rapture.common.version.ApiVersion;
import rapture.common.impl.jackson.JacksonUtil;
import rapture.common.Scheme;
import rapture.object.Addressable;
import rapture.common.model.IndexConfig;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
*
**/
@SuppressWarnings("all")
public class RaptureUser implements RaptureTransferObject, Debugable ,Storable , Addressable {
/*
* Start of field 'username' (String)
*/
private String username;
@JsonProperty("username")
public String getUsername() {
return username;
}
@JsonProperty("username")
public void setUsername(String username) {
this.username = username ;
}
/*
* end of field 'username' (String)
*/
/*
* Start of field 'userId' (String)
*/
private String userId;
@JsonProperty("userId")
public String getUserId() {
return userId;
}
@JsonProperty("userId")
public void setUserId(String userId) {
this.userId = userId ;
}
/*
* end of field 'userId' (String)
*/
/*
* Start of field 'emailAddress' (String)
*/
private String emailAddress;
@JsonProperty("emailAddress")
public String getEmailAddress() {
return emailAddress;
}
@JsonProperty("emailAddress")
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress ;
}
/*
* end of field 'emailAddress' (String)
*/
/*
* Start of field 'salt' (String)
*/
private String salt = "";
@JsonProperty("salt")
public String getSalt() {
return salt;
}
@JsonProperty("salt")
public void setSalt(String salt) {
this.salt = salt ;
}
/*
* end of field 'salt' (String)
*/
/*
* Start of field 'hashPassword' (String)
*/
private String hashPassword;
@JsonProperty("hashPassword")
public String getHashPassword() {
return hashPassword;
}
@JsonProperty("hashPassword")
public void setHashPassword(String hashPassword) {
this.hashPassword = hashPassword ;
}
/*
* end of field 'hashPassword' (String)
*/
/*
* Start of field 'description' (String)
*/
private String description = "";
@JsonProperty("description")
public String getDescription() {
return description;
}
@JsonProperty("description")
public void setDescription(String description) {
this.description = description ;
}
/*
* end of field 'description' (String)
*/
/*
* Start of field 'inactive' (Boolean)
*/
private Boolean inactive = false;
@JsonProperty("inactive")
public Boolean getInactive() {
return inactive;
}
@JsonProperty("inactive")
public void setInactive(Boolean inactive) {
this.inactive = inactive ;
}
/*
* end of field 'inactive' (Boolean)
*/
/*
* Start of field 'apiKey' (Boolean)
*/
private Boolean apiKey = false;
@JsonProperty("apiKey")
public Boolean getApiKey() {
return apiKey;
}
@JsonProperty("apiKey")
public void setApiKey(Boolean apiKey) {
this.apiKey = apiKey ;
}
/*
* end of field 'apiKey' (Boolean)
*/
/*
* Start of field 'hasRoot' (Boolean)
*/
private Boolean hasRoot = false;
@JsonProperty("hasRoot")
public Boolean getHasRoot() {
return hasRoot;
}
@JsonProperty("hasRoot")
public void setHasRoot(Boolean hasRoot) {
this.hasRoot = hasRoot ;
}
/*
* end of field 'hasRoot' (Boolean)
*/
/*
* Start of field 'passwordResetToken' (String)
*/
private String passwordResetToken;
@JsonProperty("passwordResetToken")
public String getPasswordResetToken() {
return passwordResetToken;
}
@JsonProperty("passwordResetToken")
public void setPasswordResetToken(String passwordResetToken) {
this.passwordResetToken = passwordResetToken ;
}
/*
* end of field 'passwordResetToken' (String)
*/
/*
* Start of field 'tokenExpirationTime' (Long)
*/
private Long tokenExpirationTime;
@JsonProperty("tokenExpirationTime")
public Long getTokenExpirationTime() {
return tokenExpirationTime;
}
@JsonProperty("tokenExpirationTime")
public void setTokenExpirationTime(Long tokenExpirationTime) {
this.tokenExpirationTime = tokenExpirationTime ;
}
/*
* end of field 'tokenExpirationTime' (Long)
*/
/*
* Start of field 'registrationToken' (String)
*/
private String registrationToken;
@JsonProperty("registrationToken")
public String getRegistrationToken() {
return registrationToken;
}
@JsonProperty("registrationToken")
public void setRegistrationToken(String registrationToken) {
this.registrationToken = registrationToken ;
}
/*
* end of field 'registrationToken' (String)
*/
/*
* Start of field 'verified' (Boolean)
*/
private Boolean verified = true;
@JsonProperty("verified")
public Boolean getVerified() {
return verified;
}
@JsonProperty("verified")
public void setVerified(Boolean verified) {
this.verified = verified ;
}
/*
* end of field 'verified' (Boolean)
*/
//@Override
public RaptureURI getAddressURI() {
return new RaptureURI(getStoragePath(), Scheme.USER);
// return new USERURI(getStoragePath());
}
public static final Scheme scheme = Scheme.USER;
//@Override
public Scheme getScheme() {
return scheme;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((salt == null) ? 0 : salt.hashCode());
result = prime * result + ((apiKey == null) ? 0 : apiKey.hashCode());
result = prime * result + ((hashPassword == null) ? 0 : hashPassword.hashCode());
result = prime * result + ((verified == null) ? 0 : verified.hashCode());
result = prime * result + ((description == null) ? 0 : description.hashCode());
result = prime * result + ((passwordResetToken == null) ? 0 : passwordResetToken.hashCode());
result = prime * result + ((userId == null) ? 0 : userId.hashCode());
result = prime * result + ((tokenExpirationTime == null) ? 0 : tokenExpirationTime.hashCode());
result = prime * result + ((registrationToken == null) ? 0 : registrationToken.hashCode());
result = prime * result + ((emailAddress == null) ? 0 : emailAddress.hashCode());
result = prime * result + ((inactive == null) ? 0 : inactive.hashCode());
result = prime * result + ((hasRoot == null) ? 0 : hasRoot.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;
RaptureUser other = (RaptureUser) obj;
if (salt == null) {
if (other.salt != null) {
return false;
}
} else if (!salt.equals(other.salt)) {
return false;
}
if (apiKey == null) {
if (other.apiKey != null) {
return false;
}
} else if (!apiKey.equals(other.apiKey)) {
return false;
}
if (hashPassword == null) {
if (other.hashPassword != null) {
return false;
}
} else if (!hashPassword.equals(other.hashPassword)) {
return false;
}
if (verified == null) {
if (other.verified != null) {
return false;
}
} else if (!verified.equals(other.verified)) {
return false;
}
if (description == null) {
if (other.description != null) {
return false;
}
} else if (!description.equals(other.description)) {
return false;
}
if (passwordResetToken == null) {
if (other.passwordResetToken != null) {
return false;
}
} else if (!passwordResetToken.equals(other.passwordResetToken)) {
return false;
}
if (userId == null) {
if (other.userId != null) {
return false;
}
} else if (!userId.equals(other.userId)) {
return false;
}
if (tokenExpirationTime == null) {
if (other.tokenExpirationTime != null) {
return false;
}
} else if (!tokenExpirationTime.equals(other.tokenExpirationTime)) {
return false;
}
if (registrationToken == null) {
if (other.registrationToken != null) {
return false;
}
} else if (!registrationToken.equals(other.registrationToken)) {
return false;
}
if (emailAddress == null) {
if (other.emailAddress != null) {
return false;
}
} else if (!emailAddress.equals(other.emailAddress)) {
return false;
}
if (inactive == null) {
if (other.inactive != null) {
return false;
}
} else if (!inactive.equals(other.inactive)) {
return false;
}
if (hasRoot == null) {
if (other.hasRoot != null) {
return false;
}
} else if (!hasRoot.equals(other.hasRoot)) {
return false;
}
if (username == null) {
if (other.username != null) {
return false;
}
} else if (!username.equals(other.username)) {
return false;
}
return true;
}
/**/
public String debug() {
StringBuilder sb = new StringBuilder();
{
sb.append(" salt= ");
Object o = salt;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" apiKey= ");
Object o = apiKey;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" hashPassword= ");
Object o = hashPassword;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" verified= ");
Object o = verified;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" description= ");
Object o = description;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" passwordResetToken= ");
Object o = passwordResetToken;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" userId= ");
Object o = userId;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" tokenExpirationTime= ");
Object o = tokenExpirationTime;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" registrationToken= ");
Object o = registrationToken;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" emailAddress= ");
Object o = emailAddress;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" inactive= ");
Object o = inactive;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" hasRoot= ");
Object o = hasRoot;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" username= ");
Object o = username;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
return sb.append("\n").toString();
}
@Override
public String getStoragePath() {
// Add key fields
return new RaptureUserPathBuilder()
.username(getUsername())
.buildStoragePath();
}
@Override
public RaptureURI getStorageLocation() {
return new RaptureUserPathBuilder()
.username(getUsername())
.buildStorageLocation();
}
@Override
public String toString() {
return JacksonUtil.jsonFromObject(this);
}
private ApiVersion _raptureVersion;
@JsonProperty("_raptureVersion")
public ApiVersion get_raptureVersion() {
return _raptureVersion;
}
@JsonProperty("_raptureVersion")
public void set_raptureVersion(ApiVersion _raptureVersion) {
this._raptureVersion = _raptureVersion;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy