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

org.graylog.scheduler.AutoValue_JobTriggerUpdate Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog.scheduler;

import java.util.Optional;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import org.joda.time.DateTime;

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

  private final Optional nextTime;

  private final Optional data;

  private final Optional status;

  private final boolean concurrencyReschedule;

  private AutoValue_JobTriggerUpdate(
      Optional nextTime,
      Optional data,
      Optional status,
      boolean concurrencyReschedule) {
    this.nextTime = nextTime;
    this.data = data;
    this.status = status;
    this.concurrencyReschedule = concurrencyReschedule;
  }

  @Override
  public Optional nextTime() {
    return nextTime;
  }

  @Override
  public Optional data() {
    return data;
  }

  @Override
  public Optional status() {
    return status;
  }

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

  @Override
  public String toString() {
    return "JobTriggerUpdate{"
        + "nextTime=" + nextTime + ", "
        + "data=" + data + ", "
        + "status=" + status + ", "
        + "concurrencyReschedule=" + concurrencyReschedule
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof JobTriggerUpdate) {
      JobTriggerUpdate that = (JobTriggerUpdate) o;
      return this.nextTime.equals(that.nextTime())
          && this.data.equals(that.data())
          && this.status.equals(that.status())
          && this.concurrencyReschedule == that.concurrencyReschedule();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= nextTime.hashCode();
    h$ *= 1000003;
    h$ ^= data.hashCode();
    h$ *= 1000003;
    h$ ^= status.hashCode();
    h$ *= 1000003;
    h$ ^= concurrencyReschedule ? 1231 : 1237;
    return h$;
  }

  @Override
  public JobTriggerUpdate.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends JobTriggerUpdate.Builder {
    private Optional nextTime = Optional.empty();
    private Optional data = Optional.empty();
    private Optional status = Optional.empty();
    private boolean concurrencyReschedule;
    private byte set$0;
    Builder() {
    }
    private Builder(JobTriggerUpdate source) {
      this.nextTime = source.nextTime();
      this.data = source.data();
      this.status = source.status();
      this.concurrencyReschedule = source.concurrencyReschedule();
      set$0 = (byte) 1;
    }
    @Override
    public JobTriggerUpdate.Builder nextTime(@Nullable DateTime nextTime) {
      this.nextTime = Optional.ofNullable(nextTime);
      return this;
    }
    @Override
    public JobTriggerUpdate.Builder data(@Nullable JobTriggerData data) {
      this.data = Optional.ofNullable(data);
      return this;
    }
    @Override
    public JobTriggerUpdate.Builder status(@Nullable JobTriggerStatus status) {
      this.status = Optional.ofNullable(status);
      return this;
    }
    @Override
    public JobTriggerUpdate.Builder concurrencyReschedule(boolean concurrencyReschedule) {
      this.concurrencyReschedule = concurrencyReschedule;
      set$0 |= (byte) 1;
      return this;
    }
    @Override
    public JobTriggerUpdate build() {
      if (set$0 != 1) {
        String missing = " concurrencyReschedule";
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_JobTriggerUpdate(
          this.nextTime,
          this.data,
          this.status,
          this.concurrencyReschedule);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy