org.graylog.security.authservice.ldap.AutoValue_LDAPConnectorConfig_LDAPServer Maven / Gradle / Ivy
package org.graylog.security.authservice.ldap;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_LDAPConnectorConfig_LDAPServer extends LDAPConnectorConfig.LDAPServer {
private final String hostname;
private final int port;
AutoValue_LDAPConnectorConfig_LDAPServer(
String hostname,
int port) {
if (hostname == null) {
throw new NullPointerException("Null hostname");
}
this.hostname = hostname;
this.port = port;
}
@JsonProperty("hostname")
@Override
public String hostname() {
return hostname;
}
@JsonProperty("port")
@Override
public int port() {
return port;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof LDAPConnectorConfig.LDAPServer) {
LDAPConnectorConfig.LDAPServer that = (LDAPConnectorConfig.LDAPServer) o;
return this.hostname.equals(that.hostname())
&& this.port == that.port();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= hostname.hashCode();
h$ *= 1000003;
h$ ^= port;
return h$;
}
}