/* 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 { AddFileToDownloadListResponseFromJSONTyped, AddFileToDownloadListResponseToJSON, } from './AddFileToDownloadListResponse';
import { AddToDownloadListResponseFromJSONTyped, AddToDownloadListResponseToJSON, } from './AddToDownloadListResponse';
import { AddToDownloadListStatsResponseFromJSONTyped, AddToDownloadListStatsResponseToJSON, } from './AddToDownloadListStatsResponse';
import { AgentChatResponseFromJSONTyped, AgentChatResponseToJSON, } from './AgentChatResponse';
import { AsyncMigrationResponseFromJSONTyped, AsyncMigrationResponseToJSON, } from './AsyncMigrationResponse';
import { BulkFileDownloadResponseFromJSONTyped, BulkFileDownloadResponseToJSON, } from './BulkFileDownloadResponse';
import { ComputeTaskExecutionResponseFromJSONTyped, ComputeTaskExecutionResponseToJSON, } from './ComputeTaskExecutionResponse';
import { CreateGridResponseFromJSONTyped, CreateGridResponseToJSON, } from './CreateGridResponse';
import { CreateSchemaResponseFromJSONTyped, CreateSchemaResponseToJSON, } from './CreateSchemaResponse';
import { DoiResponseFromJSONTyped, DoiResponseToJSON, } from './DoiResponse';
import { DownloadFromGridResultFromJSONTyped, DownloadFromGridResultToJSON, } from './DownloadFromGridResult';
import { DownloadFromTableResultFromJSONTyped, DownloadFromTableResultToJSON, } from './DownloadFromTableResult';
import { DownloadListManifestResponseFromJSONTyped, DownloadListManifestResponseToJSON, } from './DownloadListManifestResponse';
import { DownloadListPackageResponseFromJSONTyped, DownloadListPackageResponseToJSON, } from './DownloadListPackageResponse';
import { DownloadListQueryResponseFromJSONTyped, DownloadListQueryResponseToJSON, } from './DownloadListQueryResponse';
import { DownloadPFBResultFromJSONTyped, DownloadPFBResultToJSON, } from './DownloadPFBResult';
import { DownloadStorageReportResponseFromJSONTyped, DownloadStorageReportResponseToJSON, } from './DownloadStorageReportResponse';
import { EntityUpdateResultsFromJSONTyped, EntityUpdateResultsToJSON, } from './EntityUpdateResults';
import { FileHandleArchivalResponseFromJSONTyped, FileHandleArchivalResponseToJSON, } from './FileHandleArchivalResponse';
import { FileHandleRestoreResponseFromJSONTyped, FileHandleRestoreResponseToJSON, } from './FileHandleRestoreResponse';
import { GetValidationSchemaResponseFromJSONTyped, GetValidationSchemaResponseToJSON, } from './GetValidationSchemaResponse';
import { GridCsvImportResponseFromJSONTyped, GridCsvImportResponseToJSON, } from './GridCsvImportResponse';
import { GridQueryJobResponseFromJSONTyped, GridQueryJobResponseToJSON, } from './GridQueryJobResponse';
import { GridRecordSetExportResponseFromJSONTyped, GridRecordSetExportResponseToJSON, } from './GridRecordSetExportResponse';
import { GridUpdateJobResponseFromJSONTyped, GridUpdateJobResponseToJSON, } from './GridUpdateJobResponse';
import { QueryResultBundleFromJSONTyped, QueryResultBundleToJSON, } from './QueryResultBundle';
import { RowReferenceSetResultsFromJSONTyped, RowReferenceSetResultsToJSON, } from './RowReferenceSetResults';
import { SearchQueryResultsFromJSONTyped, SearchQueryResultsToJSON, } from './SearchQueryResults';
import { SynchronizeGridResponseFromJSONTyped, SynchronizeGridResponseToJSON, } from './SynchronizeGridResponse';
import { TableQueryResultFromJSONTyped, TableQueryResultToJSON, } from './TableQueryResult';
import { TableSchemaChangeResponseFromJSONTyped, TableSchemaChangeResponseToJSON, } from './TableSchemaChangeResponse';
import { TableSearchChangeResponseFromJSONTyped, TableSearchChangeResponseToJSON, } from './TableSearchChangeResponse';
import { TableUpdateTransactionResponseFromJSONTyped, TableUpdateTransactionResponseToJSON, } from './TableUpdateTransactionResponse';
import { UploadToTablePreviewResultFromJSONTyped, UploadToTablePreviewResultToJSON, } from './UploadToTablePreviewResult';
import { UploadToTableResultFromJSONTyped, UploadToTableResultToJSON, } from './UploadToTableResult';
import { ViewColumnModelResponseFromJSONTyped, ViewColumnModelResponseToJSON, } from './ViewColumnModelResponse';
export function AsynchronousResponseBodyFromJSON(json) {
    return AsynchronousResponseBodyFromJSONTyped(json, false);
}
export function AsynchronousResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.agent.AgentChatResponse':
            return Object.assign({}, AgentChatResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.agent.AgentChatResponse' });
        case 'org.sagebionetworks.repo.model.curation.ComputeTaskExecutionResponse':
            return Object.assign({}, ComputeTaskExecutionResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.curation.ComputeTaskExecutionResponse' });
        case 'org.sagebionetworks.repo.model.doi.v2.DoiResponse':
            return Object.assign({}, DoiResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.doi.v2.DoiResponse' });
        case 'org.sagebionetworks.repo.model.download.AddToDownloadListResponse':
            return Object.assign({}, AddToDownloadListResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.AddToDownloadListResponse' });
        case 'org.sagebionetworks.repo.model.download.AddToDownloadListStatsResponse':
            return Object.assign({}, AddToDownloadListStatsResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.AddToDownloadListStatsResponse' });
        case 'org.sagebionetworks.repo.model.download.DownloadListManifestResponse':
            return Object.assign({}, DownloadListManifestResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListManifestResponse' });
        case 'org.sagebionetworks.repo.model.download.DownloadListPackageResponse':
            return Object.assign({}, DownloadListPackageResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListPackageResponse' });
        case 'org.sagebionetworks.repo.model.download.DownloadListQueryResponse':
            return Object.assign({}, DownloadListQueryResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListQueryResponse' });
        case 'org.sagebionetworks.repo.model.file.AddFileToDownloadListResponse':
            return Object.assign({}, AddFileToDownloadListResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.AddFileToDownloadListResponse' });
        case 'org.sagebionetworks.repo.model.file.BulkFileDownloadResponse':
            return Object.assign({}, BulkFileDownloadResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.BulkFileDownloadResponse' });
        case 'org.sagebionetworks.repo.model.file.FileHandleArchivalResponse':
            return Object.assign({}, FileHandleArchivalResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.FileHandleArchivalResponse' });
        case 'org.sagebionetworks.repo.model.file.FileHandleRestoreResponse':
            return Object.assign({}, FileHandleRestoreResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.FileHandleRestoreResponse' });
        case 'org.sagebionetworks.repo.model.grid.CreateGridResponse':
            return Object.assign({}, CreateGridResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.CreateGridResponse' });
        case 'org.sagebionetworks.repo.model.grid.DownloadFromGridResult':
            return Object.assign({}, DownloadFromGridResultFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.DownloadFromGridResult' });
        case 'org.sagebionetworks.repo.model.grid.GridCsvImportResponse':
            return Object.assign({}, GridCsvImportResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.GridCsvImportResponse' });
        case 'org.sagebionetworks.repo.model.grid.GridQueryJobResponse':
            return Object.assign({}, GridQueryJobResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.GridQueryJobResponse' });
        case 'org.sagebionetworks.repo.model.grid.GridRecordSetExportResponse':
            return Object.assign({}, GridRecordSetExportResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.GridRecordSetExportResponse' });
        case 'org.sagebionetworks.repo.model.grid.GridUpdateJobResponse':
            return Object.assign({}, GridUpdateJobResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.GridUpdateJobResponse' });
        case 'org.sagebionetworks.repo.model.grid.SynchronizeGridResponse':
            return Object.assign({}, SynchronizeGridResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.SynchronizeGridResponse' });
        case 'org.sagebionetworks.repo.model.migration.AsyncMigrationResponse':
            return Object.assign({}, AsyncMigrationResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationResponse' });
        case 'org.sagebionetworks.repo.model.report.DownloadStorageReportResponse':
            return Object.assign({}, DownloadStorageReportResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.report.DownloadStorageReportResponse' });
        case 'org.sagebionetworks.repo.model.schema.CreateSchemaResponse':
            return Object.assign({}, CreateSchemaResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.schema.CreateSchemaResponse' });
        case 'org.sagebionetworks.repo.model.schema.GetValidationSchemaResponse':
            return Object.assign({}, GetValidationSchemaResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.schema.GetValidationSchemaResponse' });
        case 'org.sagebionetworks.repo.model.search.SearchQueryResults':
            return Object.assign({}, SearchQueryResultsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.SearchQueryResults' });
        case 'org.sagebionetworks.repo.model.table.DownloadFromTableResult':
            return Object.assign({}, DownloadFromTableResultFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.DownloadFromTableResult' });
        case 'org.sagebionetworks.repo.model.table.DownloadPFBResult':
            return Object.assign({}, DownloadPFBResultFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.DownloadPFBResult' });
        case 'org.sagebionetworks.repo.model.table.EntityUpdateResults':
            return Object.assign({}, EntityUpdateResultsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.EntityUpdateResults' });
        case 'org.sagebionetworks.repo.model.table.QueryResult':
            return Object.assign({}, TableQueryResultFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.QueryResult' });
        case 'org.sagebionetworks.repo.model.table.QueryResultBundle':
            return Object.assign({}, QueryResultBundleFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.QueryResultBundle' });
        case 'org.sagebionetworks.repo.model.table.RowReferenceSetResults':
            return Object.assign({}, RowReferenceSetResultsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.RowReferenceSetResults' });
        case 'org.sagebionetworks.repo.model.table.TableSchemaChangeResponse':
            return Object.assign({}, TableSchemaChangeResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.TableSchemaChangeResponse' });
        case 'org.sagebionetworks.repo.model.table.TableSearchChangeResponse':
            return Object.assign({}, TableSearchChangeResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.TableSearchChangeResponse' });
        case 'org.sagebionetworks.repo.model.table.TableUpdateTransactionResponse':
            return Object.assign({}, TableUpdateTransactionResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.TableUpdateTransactionResponse' });
        case 'org.sagebionetworks.repo.model.table.UploadToTablePreviewResult':
            return Object.assign({}, UploadToTablePreviewResultFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.UploadToTablePreviewResult' });
        case 'org.sagebionetworks.repo.model.table.UploadToTableResult':
            return Object.assign({}, UploadToTableResultFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.UploadToTableResult' });
        case 'org.sagebionetworks.repo.model.table.ViewColumnModelResponse':
            return Object.assign({}, ViewColumnModelResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.ViewColumnModelResponse' });
        default:
            return json;
    }
}
export function AsynchronousResponseBodyToJSON(json) {
    return AsynchronousResponseBodyToJSONTyped(json, false);
}
export function AsynchronousResponseBodyToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.agent.AgentChatResponse':
            return Object.assign({}, AgentChatResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.agent.AgentChatResponse' });
        case 'org.sagebionetworks.repo.model.curation.ComputeTaskExecutionResponse':
            return Object.assign({}, ComputeTaskExecutionResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.curation.ComputeTaskExecutionResponse' });
        case 'org.sagebionetworks.repo.model.doi.v2.DoiResponse':
            return Object.assign({}, DoiResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.doi.v2.DoiResponse' });
        case 'org.sagebionetworks.repo.model.download.AddToDownloadListResponse':
            return Object.assign({}, AddToDownloadListResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.AddToDownloadListResponse' });
        case 'org.sagebionetworks.repo.model.download.AddToDownloadListStatsResponse':
            return Object.assign({}, AddToDownloadListStatsResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.AddToDownloadListStatsResponse' });
        case 'org.sagebionetworks.repo.model.download.DownloadListManifestResponse':
            return Object.assign({}, DownloadListManifestResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListManifestResponse' });
        case 'org.sagebionetworks.repo.model.download.DownloadListPackageResponse':
            return Object.assign({}, DownloadListPackageResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListPackageResponse' });
        case 'org.sagebionetworks.repo.model.download.DownloadListQueryResponse':
            return Object.assign({}, DownloadListQueryResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListQueryResponse' });
        case 'org.sagebionetworks.repo.model.file.AddFileToDownloadListResponse':
            return Object.assign({}, AddFileToDownloadListResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.AddFileToDownloadListResponse' });
        case 'org.sagebionetworks.repo.model.file.BulkFileDownloadResponse':
            return Object.assign({}, BulkFileDownloadResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.BulkFileDownloadResponse' });
        case 'org.sagebionetworks.repo.model.file.FileHandleArchivalResponse':
            return Object.assign({}, FileHandleArchivalResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.FileHandleArchivalResponse' });
        case 'org.sagebionetworks.repo.model.file.FileHandleRestoreResponse':
            return Object.assign({}, FileHandleRestoreResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.FileHandleRestoreResponse' });
        case 'org.sagebionetworks.repo.model.grid.CreateGridResponse':
            return Object.assign({}, CreateGridResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.CreateGridResponse' });
        case 'org.sagebionetworks.repo.model.grid.DownloadFromGridResult':
            return Object.assign({}, DownloadFromGridResultToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.DownloadFromGridResult' });
        case 'org.sagebionetworks.repo.model.grid.GridCsvImportResponse':
            return Object.assign({}, GridCsvImportResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.GridCsvImportResponse' });
        case 'org.sagebionetworks.repo.model.grid.GridQueryJobResponse':
            return Object.assign({}, GridQueryJobResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.GridQueryJobResponse' });
        case 'org.sagebionetworks.repo.model.grid.GridRecordSetExportResponse':
            return Object.assign({}, GridRecordSetExportResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.GridRecordSetExportResponse' });
        case 'org.sagebionetworks.repo.model.grid.GridUpdateJobResponse':
            return Object.assign({}, GridUpdateJobResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.GridUpdateJobResponse' });
        case 'org.sagebionetworks.repo.model.grid.SynchronizeGridResponse':
            return Object.assign({}, SynchronizeGridResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.SynchronizeGridResponse' });
        case 'org.sagebionetworks.repo.model.migration.AsyncMigrationResponse':
            return Object.assign({}, AsyncMigrationResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationResponse' });
        case 'org.sagebionetworks.repo.model.report.DownloadStorageReportResponse':
            return Object.assign({}, DownloadStorageReportResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.report.DownloadStorageReportResponse' });
        case 'org.sagebionetworks.repo.model.schema.CreateSchemaResponse':
            return Object.assign({}, CreateSchemaResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.schema.CreateSchemaResponse' });
        case 'org.sagebionetworks.repo.model.schema.GetValidationSchemaResponse':
            return Object.assign({}, GetValidationSchemaResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.schema.GetValidationSchemaResponse' });
        case 'org.sagebionetworks.repo.model.search.SearchQueryResults':
            return Object.assign({}, SearchQueryResultsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.SearchQueryResults' });
        case 'org.sagebionetworks.repo.model.table.DownloadFromTableResult':
            return Object.assign({}, DownloadFromTableResultToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.DownloadFromTableResult' });
        case 'org.sagebionetworks.repo.model.table.DownloadPFBResult':
            return Object.assign({}, DownloadPFBResultToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.DownloadPFBResult' });
        case 'org.sagebionetworks.repo.model.table.EntityUpdateResults':
            return Object.assign({}, EntityUpdateResultsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.EntityUpdateResults' });
        case 'org.sagebionetworks.repo.model.table.QueryResult':
            return Object.assign({}, TableQueryResultToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.QueryResult' });
        case 'org.sagebionetworks.repo.model.table.QueryResultBundle':
            return Object.assign({}, QueryResultBundleToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.QueryResultBundle' });
        case 'org.sagebionetworks.repo.model.table.RowReferenceSetResults':
            return Object.assign({}, RowReferenceSetResultsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.RowReferenceSetResults' });
        case 'org.sagebionetworks.repo.model.table.TableSchemaChangeResponse':
            return Object.assign({}, TableSchemaChangeResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.TableSchemaChangeResponse' });
        case 'org.sagebionetworks.repo.model.table.TableSearchChangeResponse':
            return Object.assign({}, TableSearchChangeResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.TableSearchChangeResponse' });
        case 'org.sagebionetworks.repo.model.table.TableUpdateTransactionResponse':
            return Object.assign({}, TableUpdateTransactionResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.TableUpdateTransactionResponse' });
        case 'org.sagebionetworks.repo.model.table.UploadToTablePreviewResult':
            return Object.assign({}, UploadToTablePreviewResultToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.UploadToTablePreviewResult' });
        case 'org.sagebionetworks.repo.model.table.UploadToTableResult':
            return Object.assign({}, UploadToTableResultToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.UploadToTableResult' });
        case 'org.sagebionetworks.repo.model.table.ViewColumnModelResponse':
            return Object.assign({}, ViewColumnModelResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.ViewColumnModelResponse' });
        default:
            return value;
    }
}
//# sourceMappingURL=AsynchronousResponseBody.js.map