/* 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 { FacetColumnRequestFromJSON, FacetColumnRequestToJSON, } from './FacetColumnRequest';
import { QueryFilterFromJSON, QueryFilterToJSON, } from './QueryFilter';
import { SortItemFromJSON, SortItemToJSON, } from './SortItem';
import { CsvTableDescriptorFromJSON, CsvTableDescriptorToJSON, } from './CsvTableDescriptor';
/**
 * @export
 */
export const DownloadFromTableRequestConcreteTypeEnum = {
    org_sagebionetworks_repo_model_table_DownloadFromTableRequest: 'org.sagebionetworks.repo.model.table.DownloadFromTableRequest'
};
/**
 * Check if a given object implements the DownloadFromTableRequest interface.
 */
export function instanceOfDownloadFromTableRequest(value) {
    if (!('concreteType' in value) || value['concreteType'] === undefined)
        return false;
    if (!Object.values(DownloadFromTableRequestConcreteTypeEnum).includes(value["concreteType"])) {
        return false;
    }
    return true;
}
export function DownloadFromTableRequestFromJSON(json) {
    return DownloadFromTableRequestFromJSONTyped(json, false);
}
export function DownloadFromTableRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'concreteType': json['concreteType'],
        'entityId': json['entityId'] == null ? undefined : json['entityId'],
        'writeHeader': json['writeHeader'] == null ? undefined : json['writeHeader'],
        'includeRowIdAndRowVersion': json['includeRowIdAndRowVersion'] == null ? undefined : json['includeRowIdAndRowVersion'],
        'csvTableDescriptor': json['csvTableDescriptor'] == null ? undefined : CsvTableDescriptorFromJSON(json['csvTableDescriptor']),
        'fileName': json['fileName'] == null ? undefined : json['fileName'],
        'sql': json['sql'] == null ? undefined : json['sql'],
        'additionalFilters': json['additionalFilters'] == null ? undefined : (json['additionalFilters'].map(QueryFilterFromJSON)),
        'selectedFacets': json['selectedFacets'] == null ? undefined : (json['selectedFacets'].map(FacetColumnRequestFromJSON)),
        'includeEntityEtag': json['includeEntityEtag'] == null ? undefined : json['includeEntityEtag'],
        'selectFileColumn': json['selectFileColumn'] == null ? undefined : json['selectFileColumn'],
        'selectFileVersionColumn': json['selectFileVersionColumn'] == null ? undefined : json['selectFileVersionColumn'],
        'offset': json['offset'] == null ? undefined : json['offset'],
        'limit': json['limit'] == null ? undefined : json['limit'],
        'sort': json['sort'] == null ? undefined : (json['sort'].map(SortItemFromJSON)),
    };
}
export function DownloadFromTableRequestToJSON(json) {
    return DownloadFromTableRequestToJSONTyped(json, false);
}
export function DownloadFromTableRequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'concreteType': value['concreteType'],
        'entityId': value['entityId'],
        'writeHeader': value['writeHeader'],
        'includeRowIdAndRowVersion': value['includeRowIdAndRowVersion'],
        'csvTableDescriptor': CsvTableDescriptorToJSON(value['csvTableDescriptor']),
        'fileName': value['fileName'],
        'sql': value['sql'],
        'additionalFilters': value['additionalFilters'] == null ? undefined : (value['additionalFilters'].map(QueryFilterToJSON)),
        'selectedFacets': value['selectedFacets'] == null ? undefined : (value['selectedFacets'].map(FacetColumnRequestToJSON)),
        'includeEntityEtag': value['includeEntityEtag'],
        'selectFileColumn': value['selectFileColumn'],
        'selectFileVersionColumn': value['selectFileVersionColumn'],
        'offset': value['offset'],
        'limit': value['limit'],
        'sort': value['sort'] == null ? undefined : (value['sort'].map(SortItemToJSON)),
    };
}
//# sourceMappingURL=DownloadFromTableRequest.js.map