org.graylog.security.authservice.test.AutoValue_AuthServiceBackendTestRequest_UserLogin Maven / Gradle / Ivy
package org.graylog.security.authservice.test;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import org.graylog2.security.encryption.EncryptedValue;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_AuthServiceBackendTestRequest_UserLogin extends AuthServiceBackendTestRequest.UserLogin {
private final String username;
private final EncryptedValue password;
AutoValue_AuthServiceBackendTestRequest_UserLogin(
String username,
EncryptedValue password) {
if (username == null) {
throw new NullPointerException("Null username");
}
this.username = username;
if (password == null) {
throw new NullPointerException("Null password");
}
this.password = password;
}
@JsonProperty("username")
@Override
public String username() {
return username;
}
@JsonProperty("password")
@Override
public EncryptedValue password() {
return password;
}
@Override
public String toString() {
return "UserLogin{"
+ "username=" + username + ", "
+ "password=" + password
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof AuthServiceBackendTestRequest.UserLogin) {
AuthServiceBackendTestRequest.UserLogin that = (AuthServiceBackendTestRequest.UserLogin) o;
return this.username.equals(that.username())
&& this.password.equals(that.password());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= username.hashCode();
h$ *= 1000003;
h$ ^= password.hashCode();
return h$;
}
}