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

org.graylog2.system.urlwhitelist.$AutoValue_UrlWhitelist Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog2.system.urlwhitelist;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_UrlWhitelist extends UrlWhitelist {

  private final List entries;

  private final boolean disabled;

  $AutoValue_UrlWhitelist(
      List entries,
      boolean disabled) {
    if (entries == null) {
      throw new NullPointerException("Null entries");
    }
    this.entries = entries;
    this.disabled = disabled;
  }

  @JsonProperty("entries")
  @Override
  public List entries() {
    return entries;
  }

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

  @Override
  public String toString() {
    return "UrlWhitelist{"
        + "entries=" + entries + ", "
        + "disabled=" + disabled
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof UrlWhitelist) {
      UrlWhitelist that = (UrlWhitelist) o;
      return this.entries.equals(that.entries())
          && this.disabled == that.disabled();
    }
    return false;
  }

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

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

  static class Builder extends UrlWhitelist.Builder {
    private List entries;
    private Boolean disabled;
    Builder() {
    }
    private Builder(UrlWhitelist source) {
      this.entries = source.entries();
      this.disabled = source.disabled();
    }
    @Override
    public UrlWhitelist.Builder entries(List entries) {
      if (entries == null) {
        throw new NullPointerException("Null entries");
      }
      this.entries = entries;
      return this;
    }
    @Override
    public UrlWhitelist.Builder disabled(boolean disabled) {
      this.disabled = disabled;
      return this;
    }
    @Override
    public UrlWhitelist autoBuild() {
      String missing = "";
      if (this.entries == null) {
        missing += " entries";
      }
      if (this.disabled == null) {
        missing += " disabled";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_UrlWhitelist(
          this.entries,
          this.disabled);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy