
io.honnix.rkt.launcher.options.StopOptionsBuilder Maven / Gradle / Ivy
package io.honnix.rkt.launcher.options;
import io.norberg.automatter.AutoMatter;
import java.util.Optional;
import javax.annotation.Generated;
@Generated("io.norberg.automatter.processor.AutoMatterProcessor")
public final class StopOptionsBuilder {
private Optional force;
private Optional uuidFile;
public StopOptionsBuilder() {
this.force = Optional.empty();
this.uuidFile = Optional.empty();
}
private StopOptionsBuilder(StopOptions v) {
this.force = v.force();
this.uuidFile = v.uuidFile();
}
private StopOptionsBuilder(StopOptionsBuilder v) {
this.force = v.force;
this.uuidFile = v.uuidFile;
}
public Optional force() {
return force;
}
public StopOptionsBuilder force(Boolean force) {
return force(Optional.ofNullable(force));
}
@SuppressWarnings("unchecked")
public StopOptionsBuilder force(Optional extends Boolean> force) {
if (force == null) {
throw new NullPointerException("force");
}
this.force = (Optional)force;
return this;
}
public Optional uuidFile() {
return uuidFile;
}
public StopOptionsBuilder uuidFile(String uuidFile) {
return uuidFile(Optional.ofNullable(uuidFile));
}
@SuppressWarnings("unchecked")
public StopOptionsBuilder uuidFile(Optional extends String> uuidFile) {
if (uuidFile == null) {
throw new NullPointerException("uuidFile");
}
this.uuidFile = (Optional)uuidFile;
return this;
}
public StopOptions build() {
return new Value(force, uuidFile);
}
public static StopOptionsBuilder from(StopOptions v) {
return new StopOptionsBuilder(v);
}
public static StopOptionsBuilder from(StopOptionsBuilder v) {
return new StopOptionsBuilder(v);
}
private static final class Value implements StopOptions {
private final Optional force;
private final Optional uuidFile;
private Value(@AutoMatter.Field("force") Optional force, @AutoMatter.Field("uuidFile") Optional uuidFile) {
if (force == null) {
throw new NullPointerException("force");
}
if (uuidFile == null) {
throw new NullPointerException("uuidFile");
}
this.force = force;
this.uuidFile = uuidFile;
}
@AutoMatter.Field
@Override
public Optional force() {
return force;
}
@AutoMatter.Field
@Override
public Optional uuidFile() {
return uuidFile;
}
public StopOptionsBuilder builder() {
return new StopOptionsBuilder(this);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof StopOptions)) {
return false;
}
final StopOptions that = (StopOptions) o;
if (force != null ? !force.equals(that.force()) : that.force() != null) {
return false;
}
if (uuidFile != null ? !uuidFile.equals(that.uuidFile()) : that.uuidFile() != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result = 1;
long temp;
result = 31 * result + (force != null ? force.hashCode() : 0);
result = 31 * result + (uuidFile != null ? uuidFile.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "StopOptions{" +
"force=" + force +
", uuidFile=" + uuidFile +
'}';
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy