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

org.graylog.scheduler.$AutoValue_JobTriggerLock Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import org.joda.time.DateTime;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_JobTriggerLock extends JobTriggerLock {

  private final String owner;

  private final DateTime lastLockTime;

  private final long clock;

  private final int progress;

  $AutoValue_JobTriggerLock(
      @Nullable String owner,
      @Nullable DateTime lastLockTime,
      long clock,
      int progress) {
    this.owner = owner;
    this.lastLockTime = lastLockTime;
    this.clock = clock;
    this.progress = progress;
  }

  @JsonProperty("owner")
  @Nullable
  @Override
  public String owner() {
    return owner;
  }

  @JsonProperty("last_lock_time")
  @Nullable
  @Override
  public DateTime lastLockTime() {
    return lastLockTime;
  }

  @JsonProperty("clock")
  @Override
  public long clock() {
    return clock;
  }

  @JsonProperty("progress")
  @Override
  public int progress() {
    return progress;
  }

  @Override
  public String toString() {
    return "JobTriggerLock{"
        + "owner=" + owner + ", "
        + "lastLockTime=" + lastLockTime + ", "
        + "clock=" + clock + ", "
        + "progress=" + progress
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof JobTriggerLock) {
      JobTriggerLock that = (JobTriggerLock) o;
      return (this.owner == null ? that.owner() == null : this.owner.equals(that.owner()))
          && (this.lastLockTime == null ? that.lastLockTime() == null : this.lastLockTime.equals(that.lastLockTime()))
          && this.clock == that.clock()
          && this.progress == that.progress();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (owner == null) ? 0 : owner.hashCode();
    h$ *= 1000003;
    h$ ^= (lastLockTime == null) ? 0 : lastLockTime.hashCode();
    h$ *= 1000003;
    h$ ^= (int) ((clock >>> 32) ^ clock);
    h$ *= 1000003;
    h$ ^= progress;
    return h$;
  }

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

  static class Builder extends JobTriggerLock.Builder {
    private String owner;
    private DateTime lastLockTime;
    private Long clock;
    private Integer progress;
    Builder() {
    }
    private Builder(JobTriggerLock source) {
      this.owner = source.owner();
      this.lastLockTime = source.lastLockTime();
      this.clock = source.clock();
      this.progress = source.progress();
    }
    @Override
    public JobTriggerLock.Builder owner(@Nullable String owner) {
      this.owner = owner;
      return this;
    }
    @Override
    public JobTriggerLock.Builder lastLockTime(@Nullable DateTime lastLockTime) {
      this.lastLockTime = lastLockTime;
      return this;
    }
    @Override
    public JobTriggerLock.Builder clock(long clock) {
      this.clock = clock;
      return this;
    }
    @Override
    public JobTriggerLock.Builder progress(int progress) {
      this.progress = progress;
      return this;
    }
    @Override
    public JobTriggerLock build() {
      String missing = "";
      if (this.clock == null) {
        missing += " clock";
      }
      if (this.progress == null) {
        missing += " progress";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_JobTriggerLock(
          this.owner,
          this.lastLockTime,
          this.clock,
          this.progress);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy