org.graylog2.rest.models.users.responses.$AutoValue_TokenSummary Maven / Gradle / Ivy
package org.graylog2.rest.models.users.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import org.joda.time.DateTime;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_TokenSummary extends TokenSummary {
private final String id;
private final String name;
private final DateTime lastAccess;
$AutoValue_TokenSummary(
String id,
String name,
DateTime lastAccess) {
if (id == null) {
throw new NullPointerException("Null id");
}
this.id = id;
if (name == null) {
throw new NullPointerException("Null name");
}
this.name = name;
if (lastAccess == null) {
throw new NullPointerException("Null lastAccess");
}
this.lastAccess = lastAccess;
}
@JsonProperty
@Override
public String id() {
return id;
}
@JsonProperty
@Override
public String name() {
return name;
}
@JsonProperty
@Override
public DateTime lastAccess() {
return lastAccess;
}
@Override
public String toString() {
return "TokenSummary{"
+ "id=" + id + ", "
+ "name=" + name + ", "
+ "lastAccess=" + lastAccess
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof TokenSummary) {
TokenSummary that = (TokenSummary) o;
return this.id.equals(that.id())
&& this.name.equals(that.name())
&& this.lastAccess.equals(that.lastAccess());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= id.hashCode();
h$ *= 1000003;
h$ ^= name.hashCode();
h$ *= 1000003;
h$ ^= lastAccess.hashCode();
return h$;
}
}