org.graylog.scheduler.$AutoValue_JobTriggerLock Maven / Gradle / Ivy
package org.graylog.scheduler;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import org.joda.time.DateTime;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_JobTriggerLock extends JobTriggerLock {
@Nullable
private final String owner;
@Nullable
private final String lastOwner;
@Nullable
private final DateTime lastLockTime;
private final long clock;
private final int progress;
$AutoValue_JobTriggerLock(
@Nullable String owner,
@Nullable String lastOwner,
@Nullable DateTime lastLockTime,
long clock,
int progress) {
this.owner = owner;
this.lastOwner = lastOwner;
this.lastLockTime = lastLockTime;
this.clock = clock;
this.progress = progress;
}
@JsonProperty("owner")
@Nullable
@Override
public String owner() {
return owner;
}
@JsonProperty("last_owner")
@Nullable
@Override
public String lastOwner() {
return lastOwner;
}
@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 + ", "
+ "lastOwner=" + lastOwner + ", "
+ "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.lastOwner == null ? that.lastOwner() == null : this.lastOwner.equals(that.lastOwner()))
&& (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$ ^= (lastOwner == null) ? 0 : lastOwner.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 String lastOwner;
private DateTime lastLockTime;
private long clock;
private int progress;
private byte set$0;
Builder() {
}
private Builder(JobTriggerLock source) {
this.owner = source.owner();
this.lastOwner = source.lastOwner();
this.lastLockTime = source.lastLockTime();
this.clock = source.clock();
this.progress = source.progress();
set$0 = (byte) 3;
}
@Override
public JobTriggerLock.Builder owner(@Nullable String owner) {
this.owner = owner;
return this;
}
@Override
public JobTriggerLock.Builder lastOwner(@Nullable String lastOwner) {
this.lastOwner = lastOwner;
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;
set$0 |= (byte) 1;
return this;
}
@Override
public JobTriggerLock.Builder progress(int progress) {
this.progress = progress;
set$0 |= (byte) 2;
return this;
}
@Override
public JobTriggerLock build() {
if (set$0 != 3) {
StringBuilder missing = new StringBuilder();
if ((set$0 & 1) == 0) {
missing.append(" clock");
}
if ((set$0 & 2) == 0) {
missing.append(" progress");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_JobTriggerLock(
this.owner,
this.lastOwner,
this.lastLockTime,
this.clock,
this.progress);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy