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

com.google.gerrit.server.schema.AutoValue_Schema_139_ProjectWatch Maven / Gradle / Ivy

There is a newer version: 3.10.0-rc4
Show newest version


package com.google.gerrit.server.schema;

import com.google.gerrit.common.Nullable;
import com.google.gerrit.reviewdb.client.Project;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_Schema_139_ProjectWatch extends Schema_139.ProjectWatch {

  private final Project.NameKey project;

  private final String filter;

  private final boolean notifyAbandonedChanges;

  private final boolean notifyAllComments;

  private final boolean notifyNewChanges;

  private final boolean notifyNewPatchSets;

  private final boolean notifySubmittedChanges;

  private AutoValue_Schema_139_ProjectWatch(
      Project.NameKey project,
      @Nullable String filter,
      boolean notifyAbandonedChanges,
      boolean notifyAllComments,
      boolean notifyNewChanges,
      boolean notifyNewPatchSets,
      boolean notifySubmittedChanges) {
    this.project = project;
    this.filter = filter;
    this.notifyAbandonedChanges = notifyAbandonedChanges;
    this.notifyAllComments = notifyAllComments;
    this.notifyNewChanges = notifyNewChanges;
    this.notifyNewPatchSets = notifyNewPatchSets;
    this.notifySubmittedChanges = notifySubmittedChanges;
  }

  @Override
  Project.NameKey project() {
    return project;
  }

  @Nullable
  @Override
  String filter() {
    return filter;
  }

  @Override
  boolean notifyAbandonedChanges() {
    return notifyAbandonedChanges;
  }

  @Override
  boolean notifyAllComments() {
    return notifyAllComments;
  }

  @Override
  boolean notifyNewChanges() {
    return notifyNewChanges;
  }

  @Override
  boolean notifyNewPatchSets() {
    return notifyNewPatchSets;
  }

  @Override
  boolean notifySubmittedChanges() {
    return notifySubmittedChanges;
  }

  @Override
  public String toString() {
    return "ProjectWatch{"
         + "project=" + project + ", "
         + "filter=" + filter + ", "
         + "notifyAbandonedChanges=" + notifyAbandonedChanges + ", "
         + "notifyAllComments=" + notifyAllComments + ", "
         + "notifyNewChanges=" + notifyNewChanges + ", "
         + "notifyNewPatchSets=" + notifyNewPatchSets + ", "
         + "notifySubmittedChanges=" + notifySubmittedChanges
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Schema_139.ProjectWatch) {
      Schema_139.ProjectWatch that = (Schema_139.ProjectWatch) o;
      return (this.project.equals(that.project()))
           && ((this.filter == null) ? (that.filter() == null) : this.filter.equals(that.filter()))
           && (this.notifyAbandonedChanges == that.notifyAbandonedChanges())
           && (this.notifyAllComments == that.notifyAllComments())
           && (this.notifyNewChanges == that.notifyNewChanges())
           && (this.notifyNewPatchSets == that.notifyNewPatchSets())
           && (this.notifySubmittedChanges == that.notifySubmittedChanges());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= project.hashCode();
    h$ *= 1000003;
    h$ ^= (filter == null) ? 0 : filter.hashCode();
    h$ *= 1000003;
    h$ ^= notifyAbandonedChanges ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= notifyAllComments ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= notifyNewChanges ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= notifyNewPatchSets ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= notifySubmittedChanges ? 1231 : 1237;
    return h$;
  }

  static final class Builder extends Schema_139.ProjectWatch.Builder {
    private Project.NameKey project;
    private String filter;
    private Boolean notifyAbandonedChanges;
    private Boolean notifyAllComments;
    private Boolean notifyNewChanges;
    private Boolean notifyNewPatchSets;
    private Boolean notifySubmittedChanges;
    Builder() {
    }
    @Override
    Schema_139.ProjectWatch.Builder project(Project.NameKey project) {
      if (project == null) {
        throw new NullPointerException("Null project");
      }
      this.project = project;
      return this;
    }
    @Override
    Schema_139.ProjectWatch.Builder filter(@Nullable String filter) {
      this.filter = filter;
      return this;
    }
    @Override
    Schema_139.ProjectWatch.Builder notifyAbandonedChanges(boolean notifyAbandonedChanges) {
      this.notifyAbandonedChanges = notifyAbandonedChanges;
      return this;
    }
    @Override
    Schema_139.ProjectWatch.Builder notifyAllComments(boolean notifyAllComments) {
      this.notifyAllComments = notifyAllComments;
      return this;
    }
    @Override
    Schema_139.ProjectWatch.Builder notifyNewChanges(boolean notifyNewChanges) {
      this.notifyNewChanges = notifyNewChanges;
      return this;
    }
    @Override
    Schema_139.ProjectWatch.Builder notifyNewPatchSets(boolean notifyNewPatchSets) {
      this.notifyNewPatchSets = notifyNewPatchSets;
      return this;
    }
    @Override
    Schema_139.ProjectWatch.Builder notifySubmittedChanges(boolean notifySubmittedChanges) {
      this.notifySubmittedChanges = notifySubmittedChanges;
      return this;
    }
    @Override
    Schema_139.ProjectWatch build() {
      String missing = "";
      if (this.project == null) {
        missing += " project";
      }
      if (this.notifyAbandonedChanges == null) {
        missing += " notifyAbandonedChanges";
      }
      if (this.notifyAllComments == null) {
        missing += " notifyAllComments";
      }
      if (this.notifyNewChanges == null) {
        missing += " notifyNewChanges";
      }
      if (this.notifyNewPatchSets == null) {
        missing += " notifyNewPatchSets";
      }
      if (this.notifySubmittedChanges == null) {
        missing += " notifySubmittedChanges";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_Schema_139_ProjectWatch(
          this.project,
          this.filter,
          this.notifyAbandonedChanges,
          this.notifyAllComments,
          this.notifyNewChanges,
          this.notifyNewPatchSets,
          this.notifySubmittedChanges);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy