/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { hashArray } from '@finos/legend-shared';
import { CORE_HASH_STRUCTURE } from '../../../../../../../../../graph/Core_HashUtils.js';
export class V1_DatasourceSpecification {
}
export class V1_StaticDatasourceSpecification extends V1_DatasourceSpecification {
    host;
    port;
    databaseName;
    get hashCode() {
        return hashArray([
            CORE_HASH_STRUCTURE.STATIC_DATASOURCE_SPECIFICATION,
            this.host,
            this.port.toString(),
            this.databaseName,
        ]);
    }
}
export class V1_EmbeddedH2DatasourceSpecification extends V1_DatasourceSpecification {
    databaseName;
    directory;
    autoServerMode;
    get hashCode() {
        return hashArray([
            CORE_HASH_STRUCTURE.EMBEDDED_H2_DATASOURCE_SPECIFICATION,
            this.databaseName,
            this.directory,
            this.autoServerMode.toString(),
        ]);
    }
}
export class V1_DatabricksDatasourceSpecification extends V1_DatasourceSpecification {
    hostname;
    port;
    protocol;
    httpPath;
    get hashCode() {
        return hashArray([
            CORE_HASH_STRUCTURE.DATABRICKS_DATASOURCE_SPECIFICATION,
            this.hostname,
            this.port,
            this.protocol,
            this.httpPath,
        ]);
    }
}
export class V1_SnowflakeDatasourceSpecification extends V1_DatasourceSpecification {
    accountName;
    region;
    warehouseName;
    databaseName;
    cloudType;
    quotedIdentifiersIgnoreCase;
    enableQueryTags;
    proxyHost;
    proxyPort;
    nonProxyHosts;
    organization;
    accountType;
    role;
    tempTableDb;
    tempTableSchema;
    get hashCode() {
        return hashArray([
            CORE_HASH_STRUCTURE.SNOWFLAKE_DATASOURCE_SPECIFICATION,
            this.accountName,
            this.region,
            this.warehouseName,
            this.databaseName,
            this.cloudType ?? '',
            this.proxyHost ?? '',
            this.proxyPort ?? '',
            this.nonProxyHosts ?? '',
            this.organization ?? '',
            this.accountType ?? '',
            this.role ?? '',
            this.quotedIdentifiersIgnoreCase?.toString() ?? '',
            this.enableQueryTags?.toString() ?? '',
            this.tempTableDb ?? '',
            this.tempTableSchema ?? '',
        ]);
    }
}
export class V1_RedshiftDatasourceSpecification extends V1_DatasourceSpecification {
    clusterID;
    databaseName;
    host;
    port;
    region;
    endpointURL;
    get hashCode() {
        return hashArray([
            CORE_HASH_STRUCTURE.REDSHIFT_DATASOURCE_SPECIFICATION,
            this.databaseName,
            this.endpointURL,
            this.port.toString(),
            this.clusterID,
            this.host,
            this.region,
        ]);
    }
}
export class V1_BigQueryDatasourceSpecification extends V1_DatasourceSpecification {
    projectId;
    defaultDataset;
    proxyHost;
    proxyPort;
    get hashCode() {
        return hashArray([
            CORE_HASH_STRUCTURE.BIGQUERY_DATASOURCE_SPECIFICATION,
            this.projectId,
            this.defaultDataset,
            this.proxyHost ?? '',
            this.proxyPort ?? '',
        ]);
    }
}
export class V1_SpannerDatasourceSpecification extends V1_DatasourceSpecification {
    projectId;
    instanceId;
    databaseId;
    proxyHost;
    proxyPort;
    get hashCode() {
        return hashArray([
            CORE_HASH_STRUCTURE.SPANNER_DATASOURCE_SPECIFICATION,
            this.projectId,
            this.instanceId,
            this.databaseId,
            this.proxyHost ?? '',
            this.proxyPort ?? '',
        ]);
    }
}
export class V1_LocalH2DataSourceSpecification extends V1_DatasourceSpecification {
    testDataSetupCsv;
    testDataSetupSqls = [];
    get hashCode() {
        return hashArray([
            CORE_HASH_STRUCTURE.LOCAL_H2_DATASOURCE_SPECIFICATION,
            this.testDataSetupCsv ?? '',
            hashArray(this.testDataSetupSqls),
        ]);
    }
}
export class V1_TrinoSslSpecification {
    ssl;
    trustStorePathVaultReference;
    trustStorePasswordVaultReference;
    get hashCode() {
        return hashArray([
            CORE_HASH_STRUCTURE.TRINO_SSL_SPECIFICATION,
            this.ssl.toString(),
            this.trustStorePathVaultReference ?? '',
            this.trustStorePasswordVaultReference ?? '',
        ]);
    }
}
export class V1_TrinoDatasourceSpecification extends V1_DatasourceSpecification {
    host;
    port;
    sslSpecification;
    catalog;
    schema;
    clientTags;
    get hashCode() {
        return hashArray([
            CORE_HASH_STRUCTURE.TRINO_DATASOURCE_SPECIFICATION,
            this.host,
            this.port.toString(),
            this.sslSpecification,
            this.catalog ?? '',
            this.schema ?? '',
            this.clientTags ?? '',
        ]);
    }
}
export class V1_DuckDBDatasourceSpecification extends V1_DatasourceSpecification {
    path;
    get hashCode() {
        return hashArray([
            CORE_HASH_STRUCTURE.DUCKDB_DATASOURCE_SPECIFICATION,
            this.path,
        ]);
    }
}
//# sourceMappingURL=V1_DatasourceSpecification.js.map