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.11.0-rc3
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 html;

  private final Boolean enabled;

  private final boolean overrideOnly;

  private AutoValue_StoredCommentLinkInfo(
      String name,
      @Nullable String match,
      @Nullable String link,
      @Nullable String html,
      @Nullable Boolean enabled,
      boolean overrideOnly) {
    this.name = name;
    this.match = match;
    this.link = link;
    this.html = html;
    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 getHtml() {
    return html;
  }

  @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 + ", "
        + "html=" + html + ", "
        + "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.html == null ? that.getHtml() == null : this.html.equals(that.getHtml()))
          && (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$ ^= (html == null) ? 0 : html.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 html;
    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 setHtml(@Nullable String html) {
      this.html = html;
      return this;
    }
    @Override
    @Nullable protected String getHtml() {
      return html;
    }
    @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.html,
          this.enabled,
          this.overrideOnly);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy