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