org.graylog.plugins.pipelineprocessor.ast.$AutoValue_Pipeline Maven / Gradle / Ivy
package org.graylog.plugins.pipelineprocessor.ast;
import java.util.SortedSet;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_Pipeline extends Pipeline {
private final String id;
private final String name;
private final SortedSet stages;
$AutoValue_Pipeline(
@Nullable String id,
String name,
SortedSet stages) {
this.id = id;
if (name == null) {
throw new NullPointerException("Null name");
}
this.name = name;
if (stages == null) {
throw new NullPointerException("Null stages");
}
this.stages = stages;
}
@Nullable
@Override
public String id() {
return id;
}
@Override
public String name() {
return name;
}
@Override
public SortedSet stages() {
return stages;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Pipeline) {
Pipeline that = (Pipeline) o;
return (this.id == null ? that.id() == null : this.id.equals(that.id()))
&& this.name.equals(that.name())
&& this.stages.equals(that.stages());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= (id == null) ? 0 : id.hashCode();
h$ *= 1000003;
h$ ^= name.hashCode();
h$ *= 1000003;
h$ ^= stages.hashCode();
return h$;
}
@Override
public Pipeline.Builder toBuilder() {
return new Builder(this);
}
static class Builder extends Pipeline.Builder {
private String id;
private String name;
private SortedSet stages;
Builder() {
}
private Builder(Pipeline source) {
this.id = source.id();
this.name = source.name();
this.stages = source.stages();
}
@Override
public Pipeline.Builder id(String id) {
this.id = id;
return this;
}
@Override
public Pipeline.Builder name(String name) {
if (name == null) {
throw new NullPointerException("Null name");
}
this.name = name;
return this;
}
@Override
public Pipeline.Builder stages(SortedSet stages) {
if (stages == null) {
throw new NullPointerException("Null stages");
}
this.stages = stages;
return this;
}
@Override
public Pipeline build() {
String missing = "";
if (this.name == null) {
missing += " name";
}
if (this.stages == null) {
missing += " stages";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_Pipeline(
this.id,
this.name,
this.stages);
}
}
}