/* tslint:disable */
/* eslint-disable */
/**
 * Synapse REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import { MaterializedViewFromJSONTyped, MaterializedViewToJSON, } from './MaterializedView';
import { SearchIndexFromJSONTyped, SearchIndexToJSON, } from './SearchIndex';
import { VirtualTableFromJSONTyped, VirtualTableToJSON, } from './VirtualTable';
export function HasDefiningSqlFromJSON(json) {
    return HasDefiningSqlFromJSONTyped(json, false);
}
export function HasDefiningSqlFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.search.table.SearchIndex':
            return Object.assign({}, SearchIndexFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.table.SearchIndex' });
        case 'org.sagebionetworks.repo.model.table.MaterializedView':
            return Object.assign({}, MaterializedViewFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.MaterializedView' });
        case 'org.sagebionetworks.repo.model.table.VirtualTable':
            return Object.assign({}, VirtualTableFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.VirtualTable' });
        default:
            return json;
    }
}
export function HasDefiningSqlToJSON(json) {
    return HasDefiningSqlToJSONTyped(json, false);
}
export function HasDefiningSqlToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.search.table.SearchIndex':
            return Object.assign({}, SearchIndexToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.table.SearchIndex' });
        case 'org.sagebionetworks.repo.model.table.MaterializedView':
            return Object.assign({}, MaterializedViewToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.MaterializedView' });
        case 'org.sagebionetworks.repo.model.table.VirtualTable':
            return Object.assign({}, VirtualTableToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.VirtualTable' });
        default:
            return value;
    }
}
//# sourceMappingURL=HasDefiningSql.js.map