/* 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 { TableRowFromJSON, TableRowToJSON, } from './TableRow';
import { ColumnModelFromJSON, ColumnModelToJSON, } from './ColumnModel';
/**
 * @export
 */
export const UploadToTablePreviewResultConcreteTypeEnum = {
    org_sagebionetworks_repo_model_table_UploadToTablePreviewResult: 'org.sagebionetworks.repo.model.table.UploadToTablePreviewResult'
};
/**
 * Check if a given object implements the UploadToTablePreviewResult interface.
 */
export function instanceOfUploadToTablePreviewResult(value) {
    if (!('concreteType' in value) || value['concreteType'] === undefined)
        return false;
    if (!Object.values(UploadToTablePreviewResultConcreteTypeEnum).includes(value["concreteType"])) {
        return false;
    }
    return true;
}
export function UploadToTablePreviewResultFromJSON(json) {
    return UploadToTablePreviewResultFromJSONTyped(json, false);
}
export function UploadToTablePreviewResultFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'concreteType': json['concreteType'],
        'suggestedColumns': json['suggestedColumns'] == null ? undefined : (json['suggestedColumns'].map(ColumnModelFromJSON)),
        'sampleRows': json['sampleRows'] == null ? undefined : (json['sampleRows'].map(TableRowFromJSON)),
        'rowsScanned': json['rowsScanned'] == null ? undefined : json['rowsScanned'],
    };
}
export function UploadToTablePreviewResultToJSON(json) {
    return UploadToTablePreviewResultToJSONTyped(json, false);
}
export function UploadToTablePreviewResultToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'concreteType': value['concreteType'],
        'suggestedColumns': value['suggestedColumns'] == null ? undefined : (value['suggestedColumns'].map(ColumnModelToJSON)),
        'sampleRows': value['sampleRows'] == null ? undefined : (value['sampleRows'].map(TableRowToJSON)),
        'rowsScanned': value['rowsScanned'],
    };
}
//# sourceMappingURL=UploadToTablePreviewResult.js.map