All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.graylog.security.authservice.ldap.AutoValue_UnboundLDAPConfig Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog.security.authservice.ldap;

import java.util.List;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_UnboundLDAPConfig extends UnboundLDAPConfig {

  private final String userSearchBase;

  private final String userSearchPattern;

  private final String userUniqueIdAttribute;

  private final String userNameAttribute;

  private final String userFullNameAttribute;

  private final List emailAttributes;

  private AutoValue_UnboundLDAPConfig(
      String userSearchBase,
      String userSearchPattern,
      String userUniqueIdAttribute,
      String userNameAttribute,
      String userFullNameAttribute,
      List emailAttributes) {
    this.userSearchBase = userSearchBase;
    this.userSearchPattern = userSearchPattern;
    this.userUniqueIdAttribute = userUniqueIdAttribute;
    this.userNameAttribute = userNameAttribute;
    this.userFullNameAttribute = userFullNameAttribute;
    this.emailAttributes = emailAttributes;
  }

  @Override
  public String userSearchBase() {
    return userSearchBase;
  }

  @Override
  public String userSearchPattern() {
    return userSearchPattern;
  }

  @Override
  public String userUniqueIdAttribute() {
    return userUniqueIdAttribute;
  }

  @Override
  public String userNameAttribute() {
    return userNameAttribute;
  }

  @Override
  public String userFullNameAttribute() {
    return userFullNameAttribute;
  }

  @Override
  public List emailAttributes() {
    return emailAttributes;
  }

  @Override
  public String toString() {
    return "UnboundLDAPConfig{"
        + "userSearchBase=" + userSearchBase + ", "
        + "userSearchPattern=" + userSearchPattern + ", "
        + "userUniqueIdAttribute=" + userUniqueIdAttribute + ", "
        + "userNameAttribute=" + userNameAttribute + ", "
        + "userFullNameAttribute=" + userFullNameAttribute + ", "
        + "emailAttributes=" + emailAttributes
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof UnboundLDAPConfig) {
      UnboundLDAPConfig that = (UnboundLDAPConfig) o;
      return this.userSearchBase.equals(that.userSearchBase())
          && this.userSearchPattern.equals(that.userSearchPattern())
          && this.userUniqueIdAttribute.equals(that.userUniqueIdAttribute())
          && this.userNameAttribute.equals(that.userNameAttribute())
          && this.userFullNameAttribute.equals(that.userFullNameAttribute())
          && this.emailAttributes.equals(that.emailAttributes());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= userSearchBase.hashCode();
    h$ *= 1000003;
    h$ ^= userSearchPattern.hashCode();
    h$ *= 1000003;
    h$ ^= userUniqueIdAttribute.hashCode();
    h$ *= 1000003;
    h$ ^= userNameAttribute.hashCode();
    h$ *= 1000003;
    h$ ^= userFullNameAttribute.hashCode();
    h$ *= 1000003;
    h$ ^= emailAttributes.hashCode();
    return h$;
  }

  @Override
  public UnboundLDAPConfig.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends UnboundLDAPConfig.Builder {
    private String userSearchBase;
    private String userSearchPattern;
    private String userUniqueIdAttribute;
    private String userNameAttribute;
    private String userFullNameAttribute;
    private List emailAttributes;
    Builder() {
    }
    private Builder(UnboundLDAPConfig source) {
      this.userSearchBase = source.userSearchBase();
      this.userSearchPattern = source.userSearchPattern();
      this.userUniqueIdAttribute = source.userUniqueIdAttribute();
      this.userNameAttribute = source.userNameAttribute();
      this.userFullNameAttribute = source.userFullNameAttribute();
      this.emailAttributes = source.emailAttributes();
    }
    @Override
    public UnboundLDAPConfig.Builder userSearchBase(String userSearchBase) {
      if (userSearchBase == null) {
        throw new NullPointerException("Null userSearchBase");
      }
      this.userSearchBase = userSearchBase;
      return this;
    }
    @Override
    public UnboundLDAPConfig.Builder userSearchPattern(String userSearchPattern) {
      if (userSearchPattern == null) {
        throw new NullPointerException("Null userSearchPattern");
      }
      this.userSearchPattern = userSearchPattern;
      return this;
    }
    @Override
    public UnboundLDAPConfig.Builder userUniqueIdAttribute(String userUniqueIdAttribute) {
      if (userUniqueIdAttribute == null) {
        throw new NullPointerException("Null userUniqueIdAttribute");
      }
      this.userUniqueIdAttribute = userUniqueIdAttribute;
      return this;
    }
    @Override
    public UnboundLDAPConfig.Builder userNameAttribute(String userNameAttribute) {
      if (userNameAttribute == null) {
        throw new NullPointerException("Null userNameAttribute");
      }
      this.userNameAttribute = userNameAttribute;
      return this;
    }
    @Override
    public UnboundLDAPConfig.Builder userFullNameAttribute(String userFullNameAttribute) {
      if (userFullNameAttribute == null) {
        throw new NullPointerException("Null userFullNameAttribute");
      }
      this.userFullNameAttribute = userFullNameAttribute;
      return this;
    }
    @Override
    public UnboundLDAPConfig.Builder emailAttributes(List emailAttributes) {
      if (emailAttributes == null) {
        throw new NullPointerException("Null emailAttributes");
      }
      this.emailAttributes = emailAttributes;
      return this;
    }
    @Override
    public UnboundLDAPConfig build() {
      if (this.userSearchBase == null
          || this.userSearchPattern == null
          || this.userUniqueIdAttribute == null
          || this.userNameAttribute == null
          || this.userFullNameAttribute == null
          || this.emailAttributes == null) {
        StringBuilder missing = new StringBuilder();
        if (this.userSearchBase == null) {
          missing.append(" userSearchBase");
        }
        if (this.userSearchPattern == null) {
          missing.append(" userSearchPattern");
        }
        if (this.userUniqueIdAttribute == null) {
          missing.append(" userUniqueIdAttribute");
        }
        if (this.userNameAttribute == null) {
          missing.append(" userNameAttribute");
        }
        if (this.userFullNameAttribute == null) {
          missing.append(" userFullNameAttribute");
        }
        if (this.emailAttributes == null) {
          missing.append(" emailAttributes");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_UnboundLDAPConfig(
          this.userSearchBase,
          this.userSearchPattern,
          this.userUniqueIdAttribute,
          this.userNameAttribute,
          this.userFullNameAttribute,
          this.emailAttributes);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy