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

com.google.gerrit.entities.AutoValue_StoredCommentLinkInfo Maven / Gradle / Ivy

There is a newer version: 3.10.0
Show newest version
package com.google.gerrit.entities;

import com.google.gerrit.common.Nullable;
import javax.annotation.processing.Generated;

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

  private final String name;

  private final String match;

  private final String link;

  private final String prefix;

  private final String suffix;

  private final String text;

  private final Boolean enabled;

  private final boolean overrideOnly;

  private AutoValue_StoredCommentLinkInfo(
      String name,
      @Nullable String match,
      @Nullable String link,
      @Nullable String prefix,
      @Nullable String suffix,
      @Nullable String text,
      @Nullable Boolean enabled,
      boolean overrideOnly) {
    this.name = name;
    this.match = match;
    this.link = link;
    this.prefix = prefix;
    this.suffix = suffix;
    this.text = text;
    this.enabled = enabled;
    this.overrideOnly = overrideOnly;
  }

  @Override
  public String getName() {
    return name;
  }

  @Nullable
  @Override
  public String getMatch() {
    return match;
  }

  @Nullable
  @Override
  public String getLink() {
    return link;
  }

  @Nullable
  @Override
  public String getPrefix() {
    return prefix;
  }

  @Nullable
  @Override
  public String getSuffix() {
    return suffix;
  }

  @Nullable
  @Override
  public String getText() {
    return text;
  }

  @Nullable
  @Override
  public Boolean getEnabled() {
    return enabled;
  }

  @Override
  public boolean getOverrideOnly() {
    return overrideOnly;
  }

  @Override
  public String toString() {
    return "StoredCommentLinkInfo{"
        + "name=" + name + ", "
        + "match=" + match + ", "
        + "link=" + link + ", "
        + "prefix=" + prefix + ", "
        + "suffix=" + suffix + ", "
        + "text=" + text + ", "
        + "enabled=" + enabled + ", "
        + "overrideOnly=" + overrideOnly
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof StoredCommentLinkInfo) {
      StoredCommentLinkInfo that = (StoredCommentLinkInfo) o;
      return this.name.equals(that.getName())
          && (this.match == null ? that.getMatch() == null : this.match.equals(that.getMatch()))
          && (this.link == null ? that.getLink() == null : this.link.equals(that.getLink()))
          && (this.prefix == null ? that.getPrefix() == null : this.prefix.equals(that.getPrefix()))
          && (this.suffix == null ? that.getSuffix() == null : this.suffix.equals(that.getSuffix()))
          && (this.text == null ? that.getText() == null : this.text.equals(that.getText()))
          && (this.enabled == null ? that.getEnabled() == null : this.enabled.equals(that.getEnabled()))
          && this.overrideOnly == that.getOverrideOnly();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= name.hashCode();
    h$ *= 1000003;
    h$ ^= (match == null) ? 0 : match.hashCode();
    h$ *= 1000003;
    h$ ^= (link == null) ? 0 : link.hashCode();
    h$ *= 1000003;
    h$ ^= (prefix == null) ? 0 : prefix.hashCode();
    h$ *= 1000003;
    h$ ^= (suffix == null) ? 0 : suffix.hashCode();
    h$ *= 1000003;
    h$ ^= (text == null) ? 0 : text.hashCode();
    h$ *= 1000003;
    h$ ^= (enabled == null) ? 0 : enabled.hashCode();
    h$ *= 1000003;
    h$ ^= overrideOnly ? 1231 : 1237;
    return h$;
  }

  static final class Builder extends StoredCommentLinkInfo.Builder {
    private String name;
    private String match;
    private String link;
    private String prefix;
    private String suffix;
    private String text;
    private Boolean enabled;
    private Boolean overrideOnly;
    Builder() {
    }
    @Override
    public StoredCommentLinkInfo.Builder setName(String name) {
      if (name == null) {
        throw new NullPointerException("Null name");
      }
      this.name = name;
      return this;
    }
    @Override
    protected String getName() {
      if (name == null) {
        throw new IllegalStateException("Property \"name\" has not been set");
      }
      return name;
    }
    @Override
    public StoredCommentLinkInfo.Builder setMatch(@Nullable String match) {
      this.match = match;
      return this;
    }
    @Override
    @Nullable protected String getMatch() {
      return match;
    }
    @Override
    public StoredCommentLinkInfo.Builder setLink(@Nullable String link) {
      this.link = link;
      return this;
    }
    @Override
    @Nullable protected String getLink() {
      return link;
    }
    @Override
    public StoredCommentLinkInfo.Builder setPrefix(@Nullable String prefix) {
      this.prefix = prefix;
      return this;
    }
    @Override
    @Nullable protected String getPrefix() {
      return prefix;
    }
    @Override
    public StoredCommentLinkInfo.Builder setSuffix(@Nullable String suffix) {
      this.suffix = suffix;
      return this;
    }
    @Override
    @Nullable protected String getSuffix() {
      return suffix;
    }
    @Override
    public StoredCommentLinkInfo.Builder setText(@Nullable String text) {
      this.text = text;
      return this;
    }
    @Override
    @Nullable protected String getText() {
      return text;
    }
    @Override
    public StoredCommentLinkInfo.Builder setEnabled(@Nullable Boolean enabled) {
      this.enabled = enabled;
      return this;
    }
    @Override
    public StoredCommentLinkInfo.Builder setOverrideOnly(boolean overrideOnly) {
      this.overrideOnly = overrideOnly;
      return this;
    }
    @Override
    protected boolean getOverrideOnly() {
      if (overrideOnly == null) {
        throw new IllegalStateException("Property \"overrideOnly\" has not been set");
      }
      return overrideOnly;
    }
    @Override
    protected StoredCommentLinkInfo autoBuild() {
      String missing = "";
      if (this.name == null) {
        missing += " name";
      }
      if (this.overrideOnly == null) {
        missing += " overrideOnly";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_StoredCommentLinkInfo(
          this.name,
          this.match,
          this.link,
          this.prefix,
          this.suffix,
          this.text,
          this.enabled,
          this.overrideOnly);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy