com.spotify.dbeam.args.AutoValue_QueryBuilderArgs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dbeam-core Show documentation
Show all versions of dbeam-core Show documentation
Top level DBeam core implementation
package com.spotify.dbeam.args;
import java.time.Instant;
import java.time.temporal.TemporalAmount;
import java.util.Optional;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_QueryBuilderArgs extends QueryBuilderArgs {
private final QueryBuilder baseSqlQuery;
private final Optional limit;
private final Optional partitionColumn;
private final Optional partition;
private final TemporalAmount partitionPeriod;
private final Optional splitColumn;
private final Optional queryParallelism;
private AutoValue_QueryBuilderArgs(
QueryBuilder baseSqlQuery,
Optional limit,
Optional partitionColumn,
Optional partition,
TemporalAmount partitionPeriod,
Optional splitColumn,
Optional queryParallelism) {
this.baseSqlQuery = baseSqlQuery;
this.limit = limit;
this.partitionColumn = partitionColumn;
this.partition = partition;
this.partitionPeriod = partitionPeriod;
this.splitColumn = splitColumn;
this.queryParallelism = queryParallelism;
}
@Override
QueryBuilder baseSqlQuery() {
return baseSqlQuery;
}
@Override
public Optional limit() {
return limit;
}
@Override
public Optional partitionColumn() {
return partitionColumn;
}
@Override
public Optional partition() {
return partition;
}
@Override
public TemporalAmount partitionPeriod() {
return partitionPeriod;
}
@Override
public Optional splitColumn() {
return splitColumn;
}
@Override
public Optional queryParallelism() {
return queryParallelism;
}
@Override
public String toString() {
return "QueryBuilderArgs{"
+ "baseSqlQuery=" + baseSqlQuery + ", "
+ "limit=" + limit + ", "
+ "partitionColumn=" + partitionColumn + ", "
+ "partition=" + partition + ", "
+ "partitionPeriod=" + partitionPeriod + ", "
+ "splitColumn=" + splitColumn + ", "
+ "queryParallelism=" + queryParallelism
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof QueryBuilderArgs) {
QueryBuilderArgs that = (QueryBuilderArgs) o;
return this.baseSqlQuery.equals(that.baseSqlQuery())
&& this.limit.equals(that.limit())
&& this.partitionColumn.equals(that.partitionColumn())
&& this.partition.equals(that.partition())
&& this.partitionPeriod.equals(that.partitionPeriod())
&& this.splitColumn.equals(that.splitColumn())
&& this.queryParallelism.equals(that.queryParallelism());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= baseSqlQuery.hashCode();
h$ *= 1000003;
h$ ^= limit.hashCode();
h$ *= 1000003;
h$ ^= partitionColumn.hashCode();
h$ *= 1000003;
h$ ^= partition.hashCode();
h$ *= 1000003;
h$ ^= partitionPeriod.hashCode();
h$ *= 1000003;
h$ ^= splitColumn.hashCode();
h$ *= 1000003;
h$ ^= queryParallelism.hashCode();
return h$;
}
private static final long serialVersionUID = 743935710161L;
@Override
public QueryBuilderArgs.Builder builder() {
return new Builder(this);
}
static final class Builder extends QueryBuilderArgs.Builder {
private QueryBuilder baseSqlQuery;
private Optional limit = Optional.empty();
private Optional partitionColumn = Optional.empty();
private Optional partition = Optional.empty();
private TemporalAmount partitionPeriod;
private Optional splitColumn = Optional.empty();
private Optional queryParallelism = Optional.empty();
Builder() {
}
private Builder(QueryBuilderArgs source) {
this.baseSqlQuery = source.baseSqlQuery();
this.limit = source.limit();
this.partitionColumn = source.partitionColumn();
this.partition = source.partition();
this.partitionPeriod = source.partitionPeriod();
this.splitColumn = source.splitColumn();
this.queryParallelism = source.queryParallelism();
}
@Override
public QueryBuilderArgs.Builder setBaseSqlQuery(QueryBuilder baseSqlQuery) {
if (baseSqlQuery == null) {
throw new NullPointerException("Null baseSqlQuery");
}
this.baseSqlQuery = baseSqlQuery;
return this;
}
@Override
public QueryBuilderArgs.Builder setLimit(Long limit) {
this.limit = Optional.of(limit);
return this;
}
@Override
public QueryBuilderArgs.Builder setLimit(Optional limit) {
if (limit == null) {
throw new NullPointerException("Null limit");
}
this.limit = limit;
return this;
}
@Override
public QueryBuilderArgs.Builder setPartitionColumn(String partitionColumn) {
this.partitionColumn = Optional.of(partitionColumn);
return this;
}
@Override
public QueryBuilderArgs.Builder setPartitionColumn(Optional partitionColumn) {
if (partitionColumn == null) {
throw new NullPointerException("Null partitionColumn");
}
this.partitionColumn = partitionColumn;
return this;
}
@Override
public QueryBuilderArgs.Builder setPartition(Instant partition) {
this.partition = Optional.of(partition);
return this;
}
@Override
public QueryBuilderArgs.Builder setPartition(Optional partition) {
if (partition == null) {
throw new NullPointerException("Null partition");
}
this.partition = partition;
return this;
}
@Override
public QueryBuilderArgs.Builder setPartitionPeriod(TemporalAmount partitionPeriod) {
if (partitionPeriod == null) {
throw new NullPointerException("Null partitionPeriod");
}
this.partitionPeriod = partitionPeriod;
return this;
}
@Override
public QueryBuilderArgs.Builder setSplitColumn(String splitColumn) {
this.splitColumn = Optional.of(splitColumn);
return this;
}
@Override
public QueryBuilderArgs.Builder setSplitColumn(Optional splitColumn) {
if (splitColumn == null) {
throw new NullPointerException("Null splitColumn");
}
this.splitColumn = splitColumn;
return this;
}
@Override
public QueryBuilderArgs.Builder setQueryParallelism(Integer queryParallelism) {
this.queryParallelism = Optional.of(queryParallelism);
return this;
}
@Override
public QueryBuilderArgs.Builder setQueryParallelism(Optional queryParallelism) {
if (queryParallelism == null) {
throw new NullPointerException("Null queryParallelism");
}
this.queryParallelism = queryParallelism;
return this;
}
@Override
public QueryBuilderArgs build() {
if (this.baseSqlQuery == null
|| this.partitionPeriod == null) {
StringBuilder missing = new StringBuilder();
if (this.baseSqlQuery == null) {
missing.append(" baseSqlQuery");
}
if (this.partitionPeriod == null) {
missing.append(" partitionPeriod");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_QueryBuilderArgs(
this.baseSqlQuery,
this.limit,
this.partitionColumn,
this.partition,
this.partitionPeriod,
this.splitColumn,
this.queryParallelism);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy