package lc.mecha.aaa;

import java.util.Objects;

public class ActiveDirectoryConfig {
    private final String domain;
    private final String ldapHost;
    private final String searchBase;


    private final String username;

    private final String password;

    public ActiveDirectoryConfig(String domain, String ldapHost, String searchBase, String username, String password) {
        this.domain = domain;
        this.ldapHost = ldapHost;
        this.searchBase = searchBase;
        this.username = username;
        this.password = password;
    }

    public String getDomain() {
        return domain;
    }

    public String getLdapHost() {
        return ldapHost;
    }

    public String getSearchBase() {
        return searchBase;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ActiveDirectoryConfig that = (ActiveDirectoryConfig) o;
        return Objects.equals(domain, that.domain) && Objects.equals(ldapHost, that.ldapHost) && Objects.equals(searchBase, that.searchBase) && Objects.equals(username, that.username) && Objects.equals(password, that.password);
    }

    @Override
    public int hashCode() {
        return Objects.hash(domain, ldapHost, searchBase, username, password);
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }

}
