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

org.graylog.events.fields.providers.AutoValue_LookupTableFieldValueProvider_Config Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.events.fields.providers;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_LookupTableFieldValueProvider_Config extends LookupTableFieldValueProvider.Config {

  private final String type;

  private final String tableName;

  private final String keyField;

  private AutoValue_LookupTableFieldValueProvider_Config(
      String type,
      String tableName,
      String keyField) {
    this.type = type;
    this.tableName = tableName;
    this.keyField = keyField;
  }

  @JsonProperty("type")
  @Override
  public String type() {
    return type;
  }

  @JsonProperty("table_name")
  @Override
  public String tableName() {
    return tableName;
  }

  @JsonProperty("key_field")
  @Override
  public String keyField() {
    return keyField;
  }

  @Override
  public String toString() {
    return "Config{"
        + "type=" + type + ", "
        + "tableName=" + tableName + ", "
        + "keyField=" + keyField
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof LookupTableFieldValueProvider.Config) {
      LookupTableFieldValueProvider.Config that = (LookupTableFieldValueProvider.Config) o;
      return this.type.equals(that.type())
          && this.tableName.equals(that.tableName())
          && this.keyField.equals(that.keyField());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= type.hashCode();
    h$ *= 1000003;
    h$ ^= tableName.hashCode();
    h$ *= 1000003;
    h$ ^= keyField.hashCode();
    return h$;
  }

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

  static final class Builder extends LookupTableFieldValueProvider.Config.Builder {
    private String type;
    private String tableName;
    private String keyField;
    Builder() {
    }
    private Builder(LookupTableFieldValueProvider.Config source) {
      this.type = source.type();
      this.tableName = source.tableName();
      this.keyField = source.keyField();
    }
    @Override
    public LookupTableFieldValueProvider.Config.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public LookupTableFieldValueProvider.Config.Builder tableName(String tableName) {
      if (tableName == null) {
        throw new NullPointerException("Null tableName");
      }
      this.tableName = tableName;
      return this;
    }
    @Override
    public LookupTableFieldValueProvider.Config.Builder keyField(String keyField) {
      if (keyField == null) {
        throw new NullPointerException("Null keyField");
      }
      this.keyField = keyField;
      return this;
    }
    @Override
    public LookupTableFieldValueProvider.Config build() {
      String missing = "";
      if (this.type == null) {
        missing += " type";
      }
      if (this.tableName == null) {
        missing += " tableName";
      }
      if (this.keyField == null) {
        missing += " keyField";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_LookupTableFieldValueProvider_Config(
          this.type,
          this.tableName,
          this.keyField);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy