/* 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 { DownloadFromTableRequestFromJSONTyped, DownloadFromTableRequestToJSON, } from './DownloadFromTableRequest';
import { DownloadPFBRequestFromJSONTyped, DownloadPFBRequestToJSON, } from './DownloadPFBRequest';
import { QueryBundleRequestFromJSONTyped, QueryBundleRequestToJSON, } from './QueryBundleRequest';
import { QueryNextPageTokenFromJSONTyped, QueryNextPageTokenToJSON, } from './QueryNextPageToken';
export function CacheableRequestBodyFromJSON(json) {
    return CacheableRequestBodyFromJSONTyped(json, false);
}
export function CacheableRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.table.DownloadFromTableRequest':
            return Object.assign({}, DownloadFromTableRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.DownloadFromTableRequest' });
        case 'org.sagebionetworks.repo.model.table.DownloadPFBRequest':
            return Object.assign({}, DownloadPFBRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.DownloadPFBRequest' });
        case 'org.sagebionetworks.repo.model.table.QueryBundleRequest':
            return Object.assign({}, QueryBundleRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest' });
        case 'org.sagebionetworks.repo.model.table.QueryNextPageToken':
            return Object.assign({}, QueryNextPageTokenFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.QueryNextPageToken' });
        default:
            return json;
    }
}
export function CacheableRequestBodyToJSON(json) {
    return CacheableRequestBodyToJSONTyped(json, false);
}
export function CacheableRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.table.DownloadFromTableRequest':
            return Object.assign({}, DownloadFromTableRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.DownloadFromTableRequest' });
        case 'org.sagebionetworks.repo.model.table.DownloadPFBRequest':
            return Object.assign({}, DownloadPFBRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.DownloadPFBRequest' });
        case 'org.sagebionetworks.repo.model.table.QueryBundleRequest':
            return Object.assign({}, QueryBundleRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest' });
        case 'org.sagebionetworks.repo.model.table.QueryNextPageToken':
            return Object.assign({}, QueryNextPageTokenToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.QueryNextPageToken' });
        default:
            return value;
    }
}
//# sourceMappingURL=CacheableRequestBody.js.map