com.atlan.model.admin.QueryParserRequest Maven / Gradle / Ivy
// Generated by delombok at Wed Oct 16 22:16:03 UTC 2024
/* SPDX-License-Identifier: Apache-2.0
Copyright 2023 Atlan Pte. Ltd. */
package com.atlan.model.admin;
import com.atlan.model.core.AtlanObject;
import com.atlan.model.enums.QueryParserSourceType;
public class QueryParserRequest extends AtlanObject {
private static final long serialVersionUID = 2L;
/**
* SQL query to be parsed.
*/
String sql;
/**
* Dialect to use when parsing the SQL.
*/
QueryParserSourceType source;
/**
* Default database name to use for unqualified objects in the SQL.
*/
String defaultDatabase;
/**
* Default schema name to use for unqualified objects in the SQL.
*/
String defaultSchema;
/**
* TBC
*/
Boolean linkOrphanColumnToFirstTable;
/**
* TBC
*/
Boolean showJoin;
/**
* TBC
*/
Boolean ignoreRecordSet;
/**
* TBC
*/
Boolean ignoreCoordinate;
/**
* Builds the minimal object necessary to parse a query.
*
* @param sql the SQL code to parse
* @param source type of data store for the SQL code
* @return the minimal request necessary to parse a query, as a builder
*/
public static QueryParserRequestBuilder, ?> creator(String sql, QueryParserSourceType source) {
return QueryParserRequest.builder().sql(sql).source(source);
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static Boolean $default$linkOrphanColumnToFirstTable() {
return false;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static Boolean $default$showJoin() {
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static Boolean $default$ignoreRecordSet() {
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static Boolean $default$ignoreCoordinate() {
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static abstract class QueryParserRequestBuilder> extends AtlanObject.AtlanObjectBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private String sql;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private QueryParserSourceType source;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private String defaultDatabase;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private String defaultSchema;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private boolean linkOrphanColumnToFirstTable$set;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Boolean linkOrphanColumnToFirstTable$value;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private boolean showJoin$set;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Boolean showJoin$value;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private boolean ignoreRecordSet$set;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Boolean ignoreRecordSet$value;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private boolean ignoreCoordinate$set;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Boolean ignoreCoordinate$value;
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected B $fillValuesFrom(final C instance) {
super.$fillValuesFrom(instance);
QueryParserRequest.QueryParserRequestBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
return self();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static void $fillValuesFromInstanceIntoBuilder(final QueryParserRequest instance, final QueryParserRequest.QueryParserRequestBuilder, ?> b) {
b.sql(instance.sql);
b.source(instance.source);
b.defaultDatabase(instance.defaultDatabase);
b.defaultSchema(instance.defaultSchema);
b.linkOrphanColumnToFirstTable(instance.linkOrphanColumnToFirstTable);
b.showJoin(instance.showJoin);
b.ignoreRecordSet(instance.ignoreRecordSet);
b.ignoreCoordinate(instance.ignoreCoordinate);
}
/**
* SQL query to be parsed.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B sql(final String sql) {
this.sql = sql;
return self();
}
/**
* Dialect to use when parsing the SQL.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B source(final QueryParserSourceType source) {
this.source = source;
return self();
}
/**
* Default database name to use for unqualified objects in the SQL.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B defaultDatabase(final String defaultDatabase) {
this.defaultDatabase = defaultDatabase;
return self();
}
/**
* Default schema name to use for unqualified objects in the SQL.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B defaultSchema(final String defaultSchema) {
this.defaultSchema = defaultSchema;
return self();
}
/**
* TBC
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B linkOrphanColumnToFirstTable(final Boolean linkOrphanColumnToFirstTable) {
this.linkOrphanColumnToFirstTable$value = linkOrphanColumnToFirstTable;
linkOrphanColumnToFirstTable$set = true;
return self();
}
/**
* TBC
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B showJoin(final Boolean showJoin) {
this.showJoin$value = showJoin;
showJoin$set = true;
return self();
}
/**
* TBC
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B ignoreRecordSet(final Boolean ignoreRecordSet) {
this.ignoreRecordSet$value = ignoreRecordSet;
ignoreRecordSet$set = true;
return self();
}
/**
* TBC
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B ignoreCoordinate(final Boolean ignoreCoordinate) {
this.ignoreCoordinate$value = ignoreCoordinate;
ignoreCoordinate$set = true;
return self();
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected abstract B self();
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public abstract C build();
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString() {
return "QueryParserRequest.QueryParserRequestBuilder(super=" + super.toString() + ", sql=" + this.sql + ", source=" + this.source + ", defaultDatabase=" + this.defaultDatabase + ", defaultSchema=" + this.defaultSchema + ", linkOrphanColumnToFirstTable$value=" + this.linkOrphanColumnToFirstTable$value + ", showJoin$value=" + this.showJoin$value + ", ignoreRecordSet$value=" + this.ignoreRecordSet$value + ", ignoreCoordinate$value=" + this.ignoreCoordinate$value + ")";
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static final class QueryParserRequestBuilderImpl extends QueryParserRequest.QueryParserRequestBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private QueryParserRequestBuilderImpl() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected QueryParserRequest.QueryParserRequestBuilderImpl self() {
return this;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public QueryParserRequest build() {
return new QueryParserRequest(this);
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected QueryParserRequest(final QueryParserRequest.QueryParserRequestBuilder, ?> b) {
super(b);
this.sql = b.sql;
this.source = b.source;
this.defaultDatabase = b.defaultDatabase;
this.defaultSchema = b.defaultSchema;
if (b.linkOrphanColumnToFirstTable$set) this.linkOrphanColumnToFirstTable = b.linkOrphanColumnToFirstTable$value;
else this.linkOrphanColumnToFirstTable = QueryParserRequest.$default$linkOrphanColumnToFirstTable();
if (b.showJoin$set) this.showJoin = b.showJoin$value;
else this.showJoin = QueryParserRequest.$default$showJoin();
if (b.ignoreRecordSet$set) this.ignoreRecordSet = b.ignoreRecordSet$value;
else this.ignoreRecordSet = QueryParserRequest.$default$ignoreRecordSet();
if (b.ignoreCoordinate$set) this.ignoreCoordinate = b.ignoreCoordinate$value;
else this.ignoreCoordinate = QueryParserRequest.$default$ignoreCoordinate();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static QueryParserRequest.QueryParserRequestBuilder, ?> builder() {
return new QueryParserRequest.QueryParserRequestBuilderImpl();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public QueryParserRequest.QueryParserRequestBuilder, ?> toBuilder() {
return new QueryParserRequest.QueryParserRequestBuilderImpl().$fillValuesFrom(this);
}
/**
* SQL query to be parsed.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getSql() {
return this.sql;
}
/**
* Dialect to use when parsing the SQL.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public QueryParserSourceType getSource() {
return this.source;
}
/**
* Default database name to use for unqualified objects in the SQL.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getDefaultDatabase() {
return this.defaultDatabase;
}
/**
* Default schema name to use for unqualified objects in the SQL.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getDefaultSchema() {
return this.defaultSchema;
}
/**
* TBC
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getLinkOrphanColumnToFirstTable() {
return this.linkOrphanColumnToFirstTable;
}
/**
* TBC
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getShowJoin() {
return this.showJoin;
}
/**
* TBC
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getIgnoreRecordSet() {
return this.ignoreRecordSet;
}
/**
* TBC
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getIgnoreCoordinate() {
return this.ignoreCoordinate;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof QueryParserRequest)) return false;
final QueryParserRequest other = (QueryParserRequest) o;
if (!other.canEqual((java.lang.Object) this)) return false;
if (!super.equals(o)) return false;
final java.lang.Object this$linkOrphanColumnToFirstTable = this.getLinkOrphanColumnToFirstTable();
final java.lang.Object other$linkOrphanColumnToFirstTable = other.getLinkOrphanColumnToFirstTable();
if (this$linkOrphanColumnToFirstTable == null ? other$linkOrphanColumnToFirstTable != null : !this$linkOrphanColumnToFirstTable.equals(other$linkOrphanColumnToFirstTable)) return false;
final java.lang.Object this$showJoin = this.getShowJoin();
final java.lang.Object other$showJoin = other.getShowJoin();
if (this$showJoin == null ? other$showJoin != null : !this$showJoin.equals(other$showJoin)) return false;
final java.lang.Object this$ignoreRecordSet = this.getIgnoreRecordSet();
final java.lang.Object other$ignoreRecordSet = other.getIgnoreRecordSet();
if (this$ignoreRecordSet == null ? other$ignoreRecordSet != null : !this$ignoreRecordSet.equals(other$ignoreRecordSet)) return false;
final java.lang.Object this$ignoreCoordinate = this.getIgnoreCoordinate();
final java.lang.Object other$ignoreCoordinate = other.getIgnoreCoordinate();
if (this$ignoreCoordinate == null ? other$ignoreCoordinate != null : !this$ignoreCoordinate.equals(other$ignoreCoordinate)) return false;
final java.lang.Object this$sql = this.getSql();
final java.lang.Object other$sql = other.getSql();
if (this$sql == null ? other$sql != null : !this$sql.equals(other$sql)) return false;
final java.lang.Object this$source = this.getSource();
final java.lang.Object other$source = other.getSource();
if (this$source == null ? other$source != null : !this$source.equals(other$source)) return false;
final java.lang.Object this$defaultDatabase = this.getDefaultDatabase();
final java.lang.Object other$defaultDatabase = other.getDefaultDatabase();
if (this$defaultDatabase == null ? other$defaultDatabase != null : !this$defaultDatabase.equals(other$defaultDatabase)) return false;
final java.lang.Object this$defaultSchema = this.getDefaultSchema();
final java.lang.Object other$defaultSchema = other.getDefaultSchema();
if (this$defaultSchema == null ? other$defaultSchema != null : !this$defaultSchema.equals(other$defaultSchema)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof QueryParserRequest;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final java.lang.Object $linkOrphanColumnToFirstTable = this.getLinkOrphanColumnToFirstTable();
result = result * PRIME + ($linkOrphanColumnToFirstTable == null ? 43 : $linkOrphanColumnToFirstTable.hashCode());
final java.lang.Object $showJoin = this.getShowJoin();
result = result * PRIME + ($showJoin == null ? 43 : $showJoin.hashCode());
final java.lang.Object $ignoreRecordSet = this.getIgnoreRecordSet();
result = result * PRIME + ($ignoreRecordSet == null ? 43 : $ignoreRecordSet.hashCode());
final java.lang.Object $ignoreCoordinate = this.getIgnoreCoordinate();
result = result * PRIME + ($ignoreCoordinate == null ? 43 : $ignoreCoordinate.hashCode());
final java.lang.Object $sql = this.getSql();
result = result * PRIME + ($sql == null ? 43 : $sql.hashCode());
final java.lang.Object $source = this.getSource();
result = result * PRIME + ($source == null ? 43 : $source.hashCode());
final java.lang.Object $defaultDatabase = this.getDefaultDatabase();
result = result * PRIME + ($defaultDatabase == null ? 43 : $defaultDatabase.hashCode());
final java.lang.Object $defaultSchema = this.getDefaultSchema();
result = result * PRIME + ($defaultSchema == null ? 43 : $defaultSchema.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString() {
return "QueryParserRequest(super=" + super.toString() + ", sql=" + this.getSql() + ", source=" + this.getSource() + ", defaultDatabase=" + this.getDefaultDatabase() + ", defaultSchema=" + this.getDefaultSchema() + ", linkOrphanColumnToFirstTable=" + this.getLinkOrphanColumnToFirstTable() + ", showJoin=" + this.getShowJoin() + ", ignoreRecordSet=" + this.getIgnoreRecordSet() + ", ignoreCoordinate=" + this.getIgnoreCoordinate() + ")";
}
}