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

org.graylog2.rest.models.tools.responses.$AutoValue_RegexReplaceTesterResponse Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
package org.graylog2.rest.models.tools.responses;

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

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

  private final boolean matched;

  private final RegexReplaceTesterResponse.Match match;

  private final String regex;

  private final String replacement;

  private final boolean replaceAll;

  private final String string;

  $AutoValue_RegexReplaceTesterResponse(
      boolean matched,
      @Nullable RegexReplaceTesterResponse.Match match,
      String regex,
      String replacement,
      boolean replaceAll,
      String string) {
    this.matched = matched;
    this.match = match;
    if (regex == null) {
      throw new NullPointerException("Null regex");
    }
    this.regex = regex;
    if (replacement == null) {
      throw new NullPointerException("Null replacement");
    }
    this.replacement = replacement;
    this.replaceAll = replaceAll;
    if (string == null) {
      throw new NullPointerException("Null string");
    }
    this.string = string;
  }

  @JsonProperty
  @Override
  public boolean matched() {
    return matched;
  }

  @JsonProperty
  @Nullable
  @Override
  public RegexReplaceTesterResponse.Match match() {
    return match;
  }

  @JsonProperty
  @Override
  public String regex() {
    return regex;
  }

  @JsonProperty
  @Override
  public String replacement() {
    return replacement;
  }

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

  @JsonProperty
  @Override
  public String string() {
    return string;
  }

  @Override
  public String toString() {
    return "RegexReplaceTesterResponse{"
        + "matched=" + matched + ", "
        + "match=" + match + ", "
        + "regex=" + regex + ", "
        + "replacement=" + replacement + ", "
        + "replaceAll=" + replaceAll + ", "
        + "string=" + string
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof RegexReplaceTesterResponse) {
      RegexReplaceTesterResponse that = (RegexReplaceTesterResponse) o;
      return this.matched == that.matched()
          && (this.match == null ? that.match() == null : this.match.equals(that.match()))
          && this.regex.equals(that.regex())
          && this.replacement.equals(that.replacement())
          && this.replaceAll == that.replaceAll()
          && this.string.equals(that.string());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= matched ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= (match == null) ? 0 : match.hashCode();
    h$ *= 1000003;
    h$ ^= regex.hashCode();
    h$ *= 1000003;
    h$ ^= replacement.hashCode();
    h$ *= 1000003;
    h$ ^= replaceAll ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= string.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy