io.honnix.rkt.launcher.options.ExportOptionsBuilder 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 ExportOptionsBuilder {
private Optional app;
private Optional overwrite;
public ExportOptionsBuilder() {
this.app = Optional.empty();
this.overwrite = Optional.empty();
}
private ExportOptionsBuilder(ExportOptions v) {
this.app = v.app();
this.overwrite = v.overwrite();
}
private ExportOptionsBuilder(ExportOptionsBuilder v) {
this.app = v.app;
this.overwrite = v.overwrite;
}
public Optional app() {
return app;
}
public ExportOptionsBuilder app(String app) {
return app(Optional.ofNullable(app));
}
@SuppressWarnings("unchecked")
public ExportOptionsBuilder app(Optional extends String> app) {
if (app == null) {
throw new NullPointerException("app");
}
this.app = (Optional)app;
return this;
}
public Optional overwrite() {
return overwrite;
}
public ExportOptionsBuilder overwrite(Boolean overwrite) {
return overwrite(Optional.ofNullable(overwrite));
}
@SuppressWarnings("unchecked")
public ExportOptionsBuilder overwrite(Optional extends Boolean> overwrite) {
if (overwrite == null) {
throw new NullPointerException("overwrite");
}
this.overwrite = (Optional)overwrite;
return this;
}
public ExportOptions build() {
return new Value(app, overwrite);
}
public static ExportOptionsBuilder from(ExportOptions v) {
return new ExportOptionsBuilder(v);
}
public static ExportOptionsBuilder from(ExportOptionsBuilder v) {
return new ExportOptionsBuilder(v);
}
private static final class Value implements ExportOptions {
private final Optional app;
private final Optional overwrite;
private Value(@AutoMatter.Field("app") Optional app, @AutoMatter.Field("overwrite") Optional overwrite) {
if (app == null) {
throw new NullPointerException("app");
}
if (overwrite == null) {
throw new NullPointerException("overwrite");
}
this.app = app;
this.overwrite = overwrite;
}
@AutoMatter.Field
@Override
public Optional app() {
return app;
}
@AutoMatter.Field
@Override
public Optional overwrite() {
return overwrite;
}
public ExportOptionsBuilder builder() {
return new ExportOptionsBuilder(this);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ExportOptions)) {
return false;
}
final ExportOptions that = (ExportOptions) o;
if (app != null ? !app.equals(that.app()) : that.app() != null) {
return false;
}
if (overwrite != null ? !overwrite.equals(that.overwrite()) : that.overwrite() != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result = 1;
long temp;
result = 31 * result + (app != null ? app.hashCode() : 0);
result = 31 * result + (overwrite != null ? overwrite.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "ExportOptions{" +
"app=" + app +
", overwrite=" + overwrite +
'}';
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy