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

org.graylog.plugins.views.search.AutoValue_QueryMetadata Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog.plugins.views.search;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.ImmutableSet;
import java.util.Set;
import javax.annotation.processing.Generated;
import org.graylog.plugins.views.search.elasticsearch.QueryParam;

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

  private final ImmutableSet usedParameters;

  private AutoValue_QueryMetadata(
      ImmutableSet usedParameters) {
    this.usedParameters = usedParameters;
  }

  @JsonIgnore
  @Override
  public ImmutableSet usedParameters() {
    return usedParameters;
  }

  @Override
  public String toString() {
    return "QueryMetadata{"
        + "usedParameters=" + usedParameters
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof QueryMetadata) {
      QueryMetadata that = (QueryMetadata) o;
      return this.usedParameters.equals(that.usedParameters());
    }
    return false;
  }

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

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

  static final class Builder extends QueryMetadata.Builder {
    private ImmutableSet usedParameters;
    Builder() {
    }
    private Builder(QueryMetadata source) {
      this.usedParameters = source.usedParameters();
    }
    @Override
    public QueryMetadata.Builder usedParameters(Set usedParameters) {
      this.usedParameters = ImmutableSet.copyOf(usedParameters);
      return this;
    }
    @Override
    public QueryMetadata build() {
      if (this.usedParameters == null) {
        String missing = " usedParameters";
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_QueryMetadata(
          this.usedParameters);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy