org.graylog2.rest.models.system.$AutoValue_SystemJobSummary Maven / Gradle / Ivy
package org.graylog2.rest.models.system;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.Duration;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import org.graylog.scheduler.JobTriggerStatus;
import org.joda.time.DateTime;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_SystemJobSummary extends SystemJobSummary {
private final String id;
private final String description;
private final String name;
private final String info;
private final String nodeId;
@Nullable
private final DateTime startedAt;
@Nullable
private final Duration executionDuration;
private final int percentComplete;
private final boolean isCancelable;
private final boolean providesProgress;
private final JobTriggerStatus jobStatus;
$AutoValue_SystemJobSummary(
String id,
String description,
String name,
String info,
String nodeId,
@Nullable DateTime startedAt,
@Nullable Duration executionDuration,
int percentComplete,
boolean isCancelable,
boolean providesProgress,
JobTriggerStatus jobStatus) {
if (id == null) {
throw new NullPointerException("Null id");
}
this.id = id;
if (description == null) {
throw new NullPointerException("Null description");
}
this.description = description;
if (name == null) {
throw new NullPointerException("Null name");
}
this.name = name;
if (info == null) {
throw new NullPointerException("Null info");
}
this.info = info;
if (nodeId == null) {
throw new NullPointerException("Null nodeId");
}
this.nodeId = nodeId;
this.startedAt = startedAt;
this.executionDuration = executionDuration;
this.percentComplete = percentComplete;
this.isCancelable = isCancelable;
this.providesProgress = providesProgress;
if (jobStatus == null) {
throw new NullPointerException("Null jobStatus");
}
this.jobStatus = jobStatus;
}
@JsonProperty
@Override
public String id() {
return id;
}
@JsonProperty
@Override
public String description() {
return description;
}
@JsonProperty
@Override
public String name() {
return name;
}
@JsonProperty
@Override
public String info() {
return info;
}
@JsonProperty("node_id")
@Override
public String nodeId() {
return nodeId;
}
@JsonProperty("started_at")
@Nullable
@Override
public DateTime startedAt() {
return startedAt;
}
@JsonProperty("execution_duration")
@Nullable
@Override
public Duration executionDuration() {
return executionDuration;
}
@JsonProperty("percent_complete")
@Override
public int percentComplete() {
return percentComplete;
}
@JsonProperty("is_cancelable")
@Override
public boolean isCancelable() {
return isCancelable;
}
@JsonProperty("provides_progress")
@Override
public boolean providesProgress() {
return providesProgress;
}
@JsonProperty("job_status")
@Override
public JobTriggerStatus jobStatus() {
return jobStatus;
}
@Override
public String toString() {
return "SystemJobSummary{"
+ "id=" + id + ", "
+ "description=" + description + ", "
+ "name=" + name + ", "
+ "info=" + info + ", "
+ "nodeId=" + nodeId + ", "
+ "startedAt=" + startedAt + ", "
+ "executionDuration=" + executionDuration + ", "
+ "percentComplete=" + percentComplete + ", "
+ "isCancelable=" + isCancelable + ", "
+ "providesProgress=" + providesProgress + ", "
+ "jobStatus=" + jobStatus
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof SystemJobSummary) {
SystemJobSummary that = (SystemJobSummary) o;
return this.id.equals(that.id())
&& this.description.equals(that.description())
&& this.name.equals(that.name())
&& this.info.equals(that.info())
&& this.nodeId.equals(that.nodeId())
&& (this.startedAt == null ? that.startedAt() == null : this.startedAt.equals(that.startedAt()))
&& (this.executionDuration == null ? that.executionDuration() == null : this.executionDuration.equals(that.executionDuration()))
&& this.percentComplete == that.percentComplete()
&& this.isCancelable == that.isCancelable()
&& this.providesProgress == that.providesProgress()
&& this.jobStatus.equals(that.jobStatus());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= id.hashCode();
h$ *= 1000003;
h$ ^= description.hashCode();
h$ *= 1000003;
h$ ^= name.hashCode();
h$ *= 1000003;
h$ ^= info.hashCode();
h$ *= 1000003;
h$ ^= nodeId.hashCode();
h$ *= 1000003;
h$ ^= (startedAt == null) ? 0 : startedAt.hashCode();
h$ *= 1000003;
h$ ^= (executionDuration == null) ? 0 : executionDuration.hashCode();
h$ *= 1000003;
h$ ^= percentComplete;
h$ *= 1000003;
h$ ^= isCancelable ? 1231 : 1237;
h$ *= 1000003;
h$ ^= providesProgress ? 1231 : 1237;
h$ *= 1000003;
h$ ^= jobStatus.hashCode();
return h$;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy