org.graylog2.rest.models.system.sessions.responses.$AutoValue_DefaultSessionResponse Maven / Gradle / Ivy
package org.graylog2.rest.models.system.sessions.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_DefaultSessionResponse extends DefaultSessionResponse {
private final Date validUntil;
private final String sessionId;
private final String username;
$AutoValue_DefaultSessionResponse(
Date validUntil,
String sessionId,
String username) {
if (validUntil == null) {
throw new NullPointerException("Null validUntil");
}
this.validUntil = validUntil;
if (sessionId == null) {
throw new NullPointerException("Null sessionId");
}
this.sessionId = sessionId;
if (username == null) {
throw new NullPointerException("Null username");
}
this.username = username;
}
@JsonProperty("valid_until")
@Override
public Date validUntil() {
return validUntil;
}
@JsonProperty("session_id")
@Override
public String sessionId() {
return sessionId;
}
@JsonProperty("username")
@Override
public String username() {
return username;
}
@Override
public String toString() {
return "DefaultSessionResponse{"
+ "validUntil=" + validUntil + ", "
+ "sessionId=" + sessionId + ", "
+ "username=" + username
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof DefaultSessionResponse) {
DefaultSessionResponse that = (DefaultSessionResponse) o;
return this.validUntil.equals(that.validUntil())
&& this.sessionId.equals(that.sessionId())
&& this.username.equals(that.username());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= validUntil.hashCode();
h$ *= 1000003;
h$ ^= sessionId.hashCode();
h$ *= 1000003;
h$ ^= username.hashCode();
return h$;
}
}