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

com.google.gerrit.server.index.scheduler.AutoValue_PeriodicIndexerConfig Maven / Gradle / Ivy

The newest version!
package com.google.gerrit.server.index.scheduler;

import com.google.gerrit.server.config.ScheduleConfig;
import javax.annotation.processing.Generated;

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

  private final boolean runOnStartup;

  private final boolean enabled;

  private final ScheduleConfig.Schedule schedule;

  AutoValue_PeriodicIndexerConfig(
      boolean runOnStartup,
      boolean enabled,
      ScheduleConfig.Schedule schedule) {
    this.runOnStartup = runOnStartup;
    this.enabled = enabled;
    if (schedule == null) {
      throw new NullPointerException("Null schedule");
    }
    this.schedule = schedule;
  }

  @Override
  public boolean runOnStartup() {
    return runOnStartup;
  }

  @Override
  public boolean enabled() {
    return enabled;
  }

  @Override
  public ScheduleConfig.Schedule schedule() {
    return schedule;
  }

  @Override
  public String toString() {
    return "PeriodicIndexerConfig{"
        + "runOnStartup=" + runOnStartup + ", "
        + "enabled=" + enabled + ", "
        + "schedule=" + schedule
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PeriodicIndexerConfig) {
      PeriodicIndexerConfig that = (PeriodicIndexerConfig) o;
      return this.runOnStartup == that.runOnStartup()
          && this.enabled == that.enabled()
          && this.schedule.equals(that.schedule());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy