org.graylog.security.authservice.AutoValue_AuthServiceToken Maven / Gradle / Ivy
package org.graylog.security.authservice;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_AuthServiceToken extends AuthServiceToken {
private final String token;
private final String type;
private AutoValue_AuthServiceToken(
String token,
String type) {
this.token = token;
this.type = type;
}
@Override
public String token() {
return token;
}
@Override
public String type() {
return type;
}
@Override
public String toString() {
return "AuthServiceToken{"
+ "token=" + token + ", "
+ "type=" + type
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof AuthServiceToken) {
AuthServiceToken that = (AuthServiceToken) o;
return this.token.equals(that.token())
&& this.type.equals(that.type());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= token.hashCode();
h$ *= 1000003;
h$ ^= type.hashCode();
return h$;
}
static final class Builder extends AuthServiceToken.Builder {
private String token;
private String type;
Builder() {
}
@Override
public AuthServiceToken.Builder token(String token) {
if (token == null) {
throw new NullPointerException("Null token");
}
this.token = token;
return this;
}
@Override
public AuthServiceToken.Builder type(String type) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
return this;
}
@Override
public AuthServiceToken build() {
if (this.token == null
|| this.type == null) {
StringBuilder missing = new StringBuilder();
if (this.token == null) {
missing.append(" token");
}
if (this.type == null) {
missing.append(" type");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_AuthServiceToken(
this.token,
this.type);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy