org.graylog.scheduler.AutoValue_JobTriggerDto Maven / Gradle / Ivy
package org.graylog.scheduler;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Optional;
import java.util.Set;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import org.joda.time.DateTime;
import org.mongojack.Id;
import org.mongojack.ObjectId;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_JobTriggerDto extends JobTriggerDto {
@Nullable
private final String id;
private final String jobDefinitionType;
private final String jobDefinitionId;
private final DateTime startTime;
private final Optional endTime;
private final DateTime nextTime;
private final DateTime createdAt;
private final DateTime updatedAt;
private final Optional triggeredAt;
private final Optional executionDurationMs;
private final JobTriggerStatus status;
private final JobTriggerLock lock;
private final JobSchedule schedule;
private final Optional data;
private final Set constraints;
private final boolean isCancelled;
private AutoValue_JobTriggerDto(
@Nullable String id,
String jobDefinitionType,
String jobDefinitionId,
DateTime startTime,
Optional endTime,
DateTime nextTime,
DateTime createdAt,
DateTime updatedAt,
Optional triggeredAt,
Optional executionDurationMs,
JobTriggerStatus status,
JobTriggerLock lock,
JobSchedule schedule,
Optional data,
Set constraints,
boolean isCancelled) {
this.id = id;
this.jobDefinitionType = jobDefinitionType;
this.jobDefinitionId = jobDefinitionId;
this.startTime = startTime;
this.endTime = endTime;
this.nextTime = nextTime;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
this.triggeredAt = triggeredAt;
this.executionDurationMs = executionDurationMs;
this.status = status;
this.lock = lock;
this.schedule = schedule;
this.data = data;
this.constraints = constraints;
this.isCancelled = isCancelled;
}
@JsonProperty("id")
@Nullable
@Id
@ObjectId
@Override
public String id() {
return id;
}
@JsonProperty("job_definition_type")
@Override
public String jobDefinitionType() {
return jobDefinitionType;
}
@JsonProperty("job_definition_id")
@Override
public String jobDefinitionId() {
return jobDefinitionId;
}
@JsonProperty("start_time")
@Override
public DateTime startTime() {
return startTime;
}
@JsonProperty("end_time")
@Override
public Optional endTime() {
return endTime;
}
@JsonProperty("next_time")
@Override
public DateTime nextTime() {
return nextTime;
}
@JsonProperty("created_at")
@Override
public DateTime createdAt() {
return createdAt;
}
@JsonProperty("updated_at")
@Override
public DateTime updatedAt() {
return updatedAt;
}
@JsonProperty("triggered_at")
@Override
public Optional triggeredAt() {
return triggeredAt;
}
@JsonProperty("execution_duration")
@Override
public Optional executionDurationMs() {
return executionDurationMs;
}
@JsonProperty("status")
@Override
public JobTriggerStatus status() {
return status;
}
@JsonProperty("lock")
@Override
public JobTriggerLock lock() {
return lock;
}
@JsonProperty("schedule")
@Override
public JobSchedule schedule() {
return schedule;
}
@JsonProperty("data")
@Override
public Optional data() {
return data;
}
@JsonProperty("constraints")
@Override
public Set constraints() {
return constraints;
}
@JsonProperty("is_cancelled")
@Override
public boolean isCancelled() {
return isCancelled;
}
@Override
public String toString() {
return "JobTriggerDto{"
+ "id=" + id + ", "
+ "jobDefinitionType=" + jobDefinitionType + ", "
+ "jobDefinitionId=" + jobDefinitionId + ", "
+ "startTime=" + startTime + ", "
+ "endTime=" + endTime + ", "
+ "nextTime=" + nextTime + ", "
+ "createdAt=" + createdAt + ", "
+ "updatedAt=" + updatedAt + ", "
+ "triggeredAt=" + triggeredAt + ", "
+ "executionDurationMs=" + executionDurationMs + ", "
+ "status=" + status + ", "
+ "lock=" + lock + ", "
+ "schedule=" + schedule + ", "
+ "data=" + data + ", "
+ "constraints=" + constraints + ", "
+ "isCancelled=" + isCancelled
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof JobTriggerDto) {
JobTriggerDto that = (JobTriggerDto) o;
return (this.id == null ? that.id() == null : this.id.equals(that.id()))
&& this.jobDefinitionType.equals(that.jobDefinitionType())
&& this.jobDefinitionId.equals(that.jobDefinitionId())
&& this.startTime.equals(that.startTime())
&& this.endTime.equals(that.endTime())
&& this.nextTime.equals(that.nextTime())
&& this.createdAt.equals(that.createdAt())
&& this.updatedAt.equals(that.updatedAt())
&& this.triggeredAt.equals(that.triggeredAt())
&& this.executionDurationMs.equals(that.executionDurationMs())
&& this.status.equals(that.status())
&& this.lock.equals(that.lock())
&& this.schedule.equals(that.schedule())
&& this.data.equals(that.data())
&& this.constraints.equals(that.constraints())
&& this.isCancelled == that.isCancelled();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= (id == null) ? 0 : id.hashCode();
h$ *= 1000003;
h$ ^= jobDefinitionType.hashCode();
h$ *= 1000003;
h$ ^= jobDefinitionId.hashCode();
h$ *= 1000003;
h$ ^= startTime.hashCode();
h$ *= 1000003;
h$ ^= endTime.hashCode();
h$ *= 1000003;
h$ ^= nextTime.hashCode();
h$ *= 1000003;
h$ ^= createdAt.hashCode();
h$ *= 1000003;
h$ ^= updatedAt.hashCode();
h$ *= 1000003;
h$ ^= triggeredAt.hashCode();
h$ *= 1000003;
h$ ^= executionDurationMs.hashCode();
h$ *= 1000003;
h$ ^= status.hashCode();
h$ *= 1000003;
h$ ^= lock.hashCode();
h$ *= 1000003;
h$ ^= schedule.hashCode();
h$ *= 1000003;
h$ ^= data.hashCode();
h$ *= 1000003;
h$ ^= constraints.hashCode();
h$ *= 1000003;
h$ ^= isCancelled ? 1231 : 1237;
return h$;
}
@Override
public JobTriggerDto.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends JobTriggerDto.Builder {
private String id;
private String jobDefinitionType;
private String jobDefinitionId;
private DateTime startTime;
private Optional endTime = Optional.empty();
private DateTime nextTime;
private DateTime createdAt;
private DateTime updatedAt;
private Optional triggeredAt = Optional.empty();
private Optional executionDurationMs = Optional.empty();
private JobTriggerStatus status;
private JobTriggerLock lock;
private JobSchedule schedule;
private Optional data = Optional.empty();
private Set constraints;
private boolean isCancelled;
private byte set$0;
Builder() {
}
private Builder(JobTriggerDto source) {
this.id = source.id();
this.jobDefinitionType = source.jobDefinitionType();
this.jobDefinitionId = source.jobDefinitionId();
this.startTime = source.startTime();
this.endTime = source.endTime();
this.nextTime = source.nextTime();
this.createdAt = source.createdAt();
this.updatedAt = source.updatedAt();
this.triggeredAt = source.triggeredAt();
this.executionDurationMs = source.executionDurationMs();
this.status = source.status();
this.lock = source.lock();
this.schedule = source.schedule();
this.data = source.data();
this.constraints = source.constraints();
this.isCancelled = source.isCancelled();
set$0 = (byte) 1;
}
@Override
public JobTriggerDto.Builder id(String id) {
this.id = id;
return this;
}
@Override
public JobTriggerDto.Builder jobDefinitionType(String jobDefinitionType) {
if (jobDefinitionType == null) {
throw new NullPointerException("Null jobDefinitionType");
}
this.jobDefinitionType = jobDefinitionType;
return this;
}
@Override
public JobTriggerDto.Builder jobDefinitionId(String jobDefinitionId) {
if (jobDefinitionId == null) {
throw new NullPointerException("Null jobDefinitionId");
}
this.jobDefinitionId = jobDefinitionId;
return this;
}
@Override
public JobTriggerDto.Builder startTime(DateTime startTime) {
if (startTime == null) {
throw new NullPointerException("Null startTime");
}
this.startTime = startTime;
return this;
}
@Override
public JobTriggerDto.Builder endTime(@Nullable DateTime endTime) {
this.endTime = Optional.ofNullable(endTime);
return this;
}
@Override
public JobTriggerDto.Builder nextTime(DateTime nextTime) {
if (nextTime == null) {
throw new NullPointerException("Null nextTime");
}
this.nextTime = nextTime;
return this;
}
@Override
public JobTriggerDto.Builder createdAt(DateTime createdAt) {
if (createdAt == null) {
throw new NullPointerException("Null createdAt");
}
this.createdAt = createdAt;
return this;
}
@Override
public JobTriggerDto.Builder updatedAt(DateTime updatedAt) {
if (updatedAt == null) {
throw new NullPointerException("Null updatedAt");
}
this.updatedAt = updatedAt;
return this;
}
@Override
public JobTriggerDto.Builder triggeredAt(@Nullable DateTime triggeredAt) {
this.triggeredAt = Optional.ofNullable(triggeredAt);
return this;
}
@Override
public JobTriggerDto.Builder executionDurationMs(@Nullable Long executionDurationMs) {
this.executionDurationMs = Optional.ofNullable(executionDurationMs);
return this;
}
@Override
public JobTriggerDto.Builder status(JobTriggerStatus status) {
if (status == null) {
throw new NullPointerException("Null status");
}
this.status = status;
return this;
}
@Override
public JobTriggerDto.Builder lock(JobTriggerLock lock) {
if (lock == null) {
throw new NullPointerException("Null lock");
}
this.lock = lock;
return this;
}
@Override
public JobTriggerDto.Builder schedule(JobSchedule schedule) {
if (schedule == null) {
throw new NullPointerException("Null schedule");
}
this.schedule = schedule;
return this;
}
@Override
public JobTriggerDto.Builder data(@Nullable JobTriggerData data) {
this.data = Optional.ofNullable(data);
return this;
}
@Override
public JobTriggerDto.Builder constraints(Set constraints) {
if (constraints == null) {
throw new NullPointerException("Null constraints");
}
this.constraints = constraints;
return this;
}
@Override
public JobTriggerDto.Builder isCancelled(boolean isCancelled) {
this.isCancelled = isCancelled;
set$0 |= (byte) 1;
return this;
}
@Override
public JobTriggerDto build() {
if (set$0 != 1
|| this.jobDefinitionType == null
|| this.jobDefinitionId == null
|| this.startTime == null
|| this.nextTime == null
|| this.createdAt == null
|| this.updatedAt == null
|| this.status == null
|| this.lock == null
|| this.schedule == null
|| this.constraints == null) {
StringBuilder missing = new StringBuilder();
if (this.jobDefinitionType == null) {
missing.append(" jobDefinitionType");
}
if (this.jobDefinitionId == null) {
missing.append(" jobDefinitionId");
}
if (this.startTime == null) {
missing.append(" startTime");
}
if (this.nextTime == null) {
missing.append(" nextTime");
}
if (this.createdAt == null) {
missing.append(" createdAt");
}
if (this.updatedAt == null) {
missing.append(" updatedAt");
}
if (this.status == null) {
missing.append(" status");
}
if (this.lock == null) {
missing.append(" lock");
}
if (this.schedule == null) {
missing.append(" schedule");
}
if (this.constraints == null) {
missing.append(" constraints");
}
if ((set$0 & 1) == 0) {
missing.append(" isCancelled");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_JobTriggerDto(
this.id,
this.jobDefinitionType,
this.jobDefinitionId,
this.startTime,
this.endTime,
this.nextTime,
this.createdAt,
this.updatedAt,
this.triggeredAt,
this.executionDurationMs,
this.status,
this.lock,
this.schedule,
this.data,
this.constraints,
this.isCancelled);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy