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

org.graylog.events.fields.providers.AutoValue_TemplateFieldValueProvider_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_TemplateFieldValueProvider_Config extends TemplateFieldValueProvider.Config {

  private final String type;

  private final String template;

  private final boolean requireValues;

  private AutoValue_TemplateFieldValueProvider_Config(
      String type,
      String template,
      boolean requireValues) {
    this.type = type;
    this.template = template;
    this.requireValues = requireValues;
  }

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

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

  @JsonProperty("require_values")
  @Override
  public boolean requireValues() {
    return requireValues;
  }

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

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

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= type.hashCode();
    h$ *= 1000003;
    h$ ^= template.hashCode();
    h$ *= 1000003;
    h$ ^= requireValues ? 1231 : 1237;
    return h$;
  }

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy