org.graylog2.rest.models.users.responses.AutoValue_UserSummary Maven / Gradle / Ivy
package org.graylog2.rest.models.users.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Generated;
import javax.annotation.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_UserSummary extends UserSummary {
private final String id;
private final String username;
private final String email;
private final String fullName;
private final List permissions;
private final Map preferences;
private final String timezone;
private final Long sessionTimeoutMs;
private final boolean readOnly;
private final boolean external;
private final Map startpage;
private final Set roles;
AutoValue_UserSummary(
@Nullable String id,
String username,
String email,
String fullName,
List permissions,
@Nullable Map preferences,
@Nullable String timezone,
@Nullable Long sessionTimeoutMs,
boolean readOnly,
boolean external,
@Nullable Map startpage,
@Nullable Set roles) {
this.id = id;
if (username == null) {
throw new NullPointerException("Null username");
}
this.username = username;
if (email == null) {
throw new NullPointerException("Null email");
}
this.email = email;
if (fullName == null) {
throw new NullPointerException("Null fullName");
}
this.fullName = fullName;
if (permissions == null) {
throw new NullPointerException("Null permissions");
}
this.permissions = permissions;
this.preferences = preferences;
this.timezone = timezone;
this.sessionTimeoutMs = sessionTimeoutMs;
this.readOnly = readOnly;
this.external = external;
this.startpage = startpage;
this.roles = roles;
}
@JsonProperty
@Nullable
@Override
public String id() {
return id;
}
@JsonProperty
@Override
public String username() {
return username;
}
@JsonProperty
@Override
public String email() {
return email;
}
@JsonProperty
@Override
public String fullName() {
return fullName;
}
@JsonProperty
@Override
public List permissions() {
return permissions;
}
@JsonProperty
@Nullable
@Override
public Map preferences() {
return preferences;
}
@JsonProperty
@Nullable
@Override
public String timezone() {
return timezone;
}
@JsonProperty
@Nullable
@Override
public Long sessionTimeoutMs() {
return sessionTimeoutMs;
}
@JsonProperty
@Override
public boolean readOnly() {
return readOnly;
}
@JsonProperty
@Override
public boolean external() {
return external;
}
@JsonProperty
@Nullable
@Override
public Map startpage() {
return startpage;
}
@JsonProperty
@Nullable
@Override
public Set roles() {
return roles;
}
@Override
public String toString() {
return "UserSummary{"
+ "id=" + id + ", "
+ "username=" + username + ", "
+ "email=" + email + ", "
+ "fullName=" + fullName + ", "
+ "permissions=" + permissions + ", "
+ "preferences=" + preferences + ", "
+ "timezone=" + timezone + ", "
+ "sessionTimeoutMs=" + sessionTimeoutMs + ", "
+ "readOnly=" + readOnly + ", "
+ "external=" + external + ", "
+ "startpage=" + startpage + ", "
+ "roles=" + roles
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof UserSummary) {
UserSummary that = (UserSummary) o;
return ((this.id == null) ? (that.id() == null) : this.id.equals(that.id()))
&& (this.username.equals(that.username()))
&& (this.email.equals(that.email()))
&& (this.fullName.equals(that.fullName()))
&& (this.permissions.equals(that.permissions()))
&& ((this.preferences == null) ? (that.preferences() == null) : this.preferences.equals(that.preferences()))
&& ((this.timezone == null) ? (that.timezone() == null) : this.timezone.equals(that.timezone()))
&& ((this.sessionTimeoutMs == null) ? (that.sessionTimeoutMs() == null) : this.sessionTimeoutMs.equals(that.sessionTimeoutMs()))
&& (this.readOnly == that.readOnly())
&& (this.external == that.external())
&& ((this.startpage == null) ? (that.startpage() == null) : this.startpage.equals(that.startpage()))
&& ((this.roles == null) ? (that.roles() == null) : this.roles.equals(that.roles()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= (id == null) ? 0 : this.id.hashCode();
h *= 1000003;
h ^= this.username.hashCode();
h *= 1000003;
h ^= this.email.hashCode();
h *= 1000003;
h ^= this.fullName.hashCode();
h *= 1000003;
h ^= this.permissions.hashCode();
h *= 1000003;
h ^= (preferences == null) ? 0 : this.preferences.hashCode();
h *= 1000003;
h ^= (timezone == null) ? 0 : this.timezone.hashCode();
h *= 1000003;
h ^= (sessionTimeoutMs == null) ? 0 : this.sessionTimeoutMs.hashCode();
h *= 1000003;
h ^= this.readOnly ? 1231 : 1237;
h *= 1000003;
h ^= this.external ? 1231 : 1237;
h *= 1000003;
h ^= (startpage == null) ? 0 : this.startpage.hashCode();
h *= 1000003;
h ^= (roles == null) ? 0 : this.roles.hashCode();
return h;
}
}