/* 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 { AddFileToDownloadListRequestFromJSONTyped, AddFileToDownloadListRequestToJSON, } from './AddFileToDownloadListRequest';
import { AddToDownloadListRequestFromJSONTyped, AddToDownloadListRequestToJSON, } from './AddToDownloadListRequest';
import { AddToDownloadListStatsRequestFromJSONTyped, AddToDownloadListStatsRequestToJSON, } from './AddToDownloadListStatsRequest';
import { AgentChatRequestFromJSONTyped, AgentChatRequestToJSON, } from './AgentChatRequest';
import { AppendableRowSetRequestFromJSONTyped, AppendableRowSetRequestToJSON, } from './AppendableRowSetRequest';
import { AsyncMigrationRequestFromJSONTyped, AsyncMigrationRequestToJSON, } from './AsyncMigrationRequest';
import { BulkFileDownloadRequestFromJSONTyped, BulkFileDownloadRequestToJSON, } from './BulkFileDownloadRequest';
import { ComputeTaskExecutionRequestFromJSONTyped, ComputeTaskExecutionRequestToJSON, } from './ComputeTaskExecutionRequest';
import { CreateGridRequestFromJSONTyped, CreateGridRequestToJSON, } from './CreateGridRequest';
import { CreateSchemaRequestFromJSONTyped, CreateSchemaRequestToJSON, } from './CreateSchemaRequest';
import { DoiRequestFromJSONTyped, DoiRequestToJSON, } from './DoiRequest';
import { DownloadFromGridRequestFromJSONTyped, DownloadFromGridRequestToJSON, } from './DownloadFromGridRequest';
import { DownloadFromTableRequestFromJSONTyped, DownloadFromTableRequestToJSON, } from './DownloadFromTableRequest';
import { DownloadListManifestRequestFromJSONTyped, DownloadListManifestRequestToJSON, } from './DownloadListManifestRequest';
import { DownloadListPackageRequestFromJSONTyped, DownloadListPackageRequestToJSON, } from './DownloadListPackageRequest';
import { DownloadListQueryRequestFromJSONTyped, DownloadListQueryRequestToJSON, } from './DownloadListQueryRequest';
import { DownloadPFBRequestFromJSONTyped, DownloadPFBRequestToJSON, } from './DownloadPFBRequest';
import { DownloadStorageReportRequestFromJSONTyped, DownloadStorageReportRequestToJSON, } from './DownloadStorageReportRequest';
import { FileHandleArchivalRequestFromJSONTyped, FileHandleArchivalRequestToJSON, } from './FileHandleArchivalRequest';
import { FileHandleRestoreRequestFromJSONTyped, FileHandleRestoreRequestToJSON, } from './FileHandleRestoreRequest';
import { GetValidationSchemaRequestFromJSONTyped, GetValidationSchemaRequestToJSON, } from './GetValidationSchemaRequest';
import { GridCsvImportRequestFromJSONTyped, GridCsvImportRequestToJSON, } from './GridCsvImportRequest';
import { GridQueryJobRequestFromJSONTyped, GridQueryJobRequestToJSON, } from './GridQueryJobRequest';
import { GridRecordSetExportRequestFromJSONTyped, GridRecordSetExportRequestToJSON, } from './GridRecordSetExportRequest';
import { GridUpdateJobRequestFromJSONTyped, GridUpdateJobRequestToJSON, } from './GridUpdateJobRequest';
import { QueryBundleRequestFromJSONTyped, QueryBundleRequestToJSON, } from './QueryBundleRequest';
import { QueryNextPageTokenFromJSONTyped, QueryNextPageTokenToJSON, } from './QueryNextPageToken';
import { SearchIndexQueryFromJSONTyped, SearchIndexQueryToJSON, } from './SearchIndexQuery';
import { SynchronizeGridRequestFromJSONTyped, SynchronizeGridRequestToJSON, } from './SynchronizeGridRequest';
import { TableSchemaChangeRequestFromJSONTyped, TableSchemaChangeRequestToJSON, } from './TableSchemaChangeRequest';
import { TableSearchChangeRequestFromJSONTyped, TableSearchChangeRequestToJSON, } from './TableSearchChangeRequest';
import { TableUpdateTransactionRequestFromJSONTyped, TableUpdateTransactionRequestToJSON, } from './TableUpdateTransactionRequest';
import { UploadToTablePreviewRequestFromJSONTyped, UploadToTablePreviewRequestToJSON, } from './UploadToTablePreviewRequest';
import { UploadToTableRequestFromJSONTyped, UploadToTableRequestToJSON, } from './UploadToTableRequest';
import { ViewColumnModelRequestFromJSONTyped, ViewColumnModelRequestToJSON, } from './ViewColumnModelRequest';
export function AsynchronousRequestBodyFromJSON(json) {
    return AsynchronousRequestBodyFromJSONTyped(json, false);
}
export function AsynchronousRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.agent.AgentChatRequest':
            return Object.assign({}, AgentChatRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.agent.AgentChatRequest' });
        case 'org.sagebionetworks.repo.model.curation.ComputeTaskExecutionRequest':
            return Object.assign({}, ComputeTaskExecutionRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.curation.ComputeTaskExecutionRequest' });
        case 'org.sagebionetworks.repo.model.doi.v2.DoiRequest':
            return Object.assign({}, DoiRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.doi.v2.DoiRequest' });
        case 'org.sagebionetworks.repo.model.download.AddToDownloadListRequest':
            return Object.assign({}, AddToDownloadListRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.AddToDownloadListRequest' });
        case 'org.sagebionetworks.repo.model.download.AddToDownloadListStatsRequest':
            return Object.assign({}, AddToDownloadListStatsRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.AddToDownloadListStatsRequest' });
        case 'org.sagebionetworks.repo.model.download.DownloadListManifestRequest':
            return Object.assign({}, DownloadListManifestRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListManifestRequest' });
        case 'org.sagebionetworks.repo.model.download.DownloadListPackageRequest':
            return Object.assign({}, DownloadListPackageRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListPackageRequest' });
        case 'org.sagebionetworks.repo.model.download.DownloadListQueryRequest':
            return Object.assign({}, DownloadListQueryRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListQueryRequest' });
        case 'org.sagebionetworks.repo.model.file.AddFileToDownloadListRequest':
            return Object.assign({}, AddFileToDownloadListRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.AddFileToDownloadListRequest' });
        case 'org.sagebionetworks.repo.model.file.BulkFileDownloadRequest':
            return Object.assign({}, BulkFileDownloadRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.BulkFileDownloadRequest' });
        case 'org.sagebionetworks.repo.model.file.FileHandleArchivalRequest':
            return Object.assign({}, FileHandleArchivalRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.FileHandleArchivalRequest' });
        case 'org.sagebionetworks.repo.model.file.FileHandleRestoreRequest':
            return Object.assign({}, FileHandleRestoreRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.FileHandleRestoreRequest' });
        case 'org.sagebionetworks.repo.model.grid.CreateGridRequest':
            return Object.assign({}, CreateGridRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.CreateGridRequest' });
        case 'org.sagebionetworks.repo.model.grid.DownloadFromGridRequest':
            return Object.assign({}, DownloadFromGridRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.DownloadFromGridRequest' });
        case 'org.sagebionetworks.repo.model.grid.GridCsvImportRequest':
            return Object.assign({}, GridCsvImportRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.GridCsvImportRequest' });
        case 'org.sagebionetworks.repo.model.grid.GridQueryJobRequest':
            return Object.assign({}, GridQueryJobRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.GridQueryJobRequest' });
        case 'org.sagebionetworks.repo.model.grid.GridRecordSetExportRequest':
            return Object.assign({}, GridRecordSetExportRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.GridRecordSetExportRequest' });
        case 'org.sagebionetworks.repo.model.grid.GridUpdateJobRequest':
            return Object.assign({}, GridUpdateJobRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.GridUpdateJobRequest' });
        case 'org.sagebionetworks.repo.model.grid.SynchronizeGridRequest':
            return Object.assign({}, SynchronizeGridRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.SynchronizeGridRequest' });
        case 'org.sagebionetworks.repo.model.migration.AsyncMigrationRequest':
            return Object.assign({}, AsyncMigrationRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationRequest' });
        case 'org.sagebionetworks.repo.model.report.DownloadStorageReportRequest':
            return Object.assign({}, DownloadStorageReportRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.report.DownloadStorageReportRequest' });
        case 'org.sagebionetworks.repo.model.schema.CreateSchemaRequest':
            return Object.assign({}, CreateSchemaRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.schema.CreateSchemaRequest' });
        case 'org.sagebionetworks.repo.model.schema.GetValidationSchemaRequest':
            return Object.assign({}, GetValidationSchemaRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.schema.GetValidationSchemaRequest' });
        case 'org.sagebionetworks.repo.model.search.table.SearchIndexQuery':
            return Object.assign({}, SearchIndexQueryFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.table.SearchIndexQuery' });
        case 'org.sagebionetworks.repo.model.table.AppendableRowSetRequest':
            return Object.assign({}, AppendableRowSetRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.AppendableRowSetRequest' });
        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' });
        case 'org.sagebionetworks.repo.model.table.TableSchemaChangeRequest':
            return Object.assign({}, TableSchemaChangeRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.TableSchemaChangeRequest' });
        case 'org.sagebionetworks.repo.model.table.TableSearchChangeRequest':
            return Object.assign({}, TableSearchChangeRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.TableSearchChangeRequest' });
        case 'org.sagebionetworks.repo.model.table.TableUpdateTransactionRequest':
            return Object.assign({}, TableUpdateTransactionRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.TableUpdateTransactionRequest' });
        case 'org.sagebionetworks.repo.model.table.UploadToTablePreviewRequest':
            return Object.assign({}, UploadToTablePreviewRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.UploadToTablePreviewRequest' });
        case 'org.sagebionetworks.repo.model.table.UploadToTableRequest':
            return Object.assign({}, UploadToTableRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.UploadToTableRequest' });
        case 'org.sagebionetworks.repo.model.table.ViewColumnModelRequest':
            return Object.assign({}, ViewColumnModelRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.ViewColumnModelRequest' });
        default:
            return json;
    }
}
export function AsynchronousRequestBodyToJSON(json) {
    return AsynchronousRequestBodyToJSONTyped(json, false);
}
export function AsynchronousRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.agent.AgentChatRequest':
            return Object.assign({}, AgentChatRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.agent.AgentChatRequest' });
        case 'org.sagebionetworks.repo.model.curation.ComputeTaskExecutionRequest':
            return Object.assign({}, ComputeTaskExecutionRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.curation.ComputeTaskExecutionRequest' });
        case 'org.sagebionetworks.repo.model.doi.v2.DoiRequest':
            return Object.assign({}, DoiRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.doi.v2.DoiRequest' });
        case 'org.sagebionetworks.repo.model.download.AddToDownloadListRequest':
            return Object.assign({}, AddToDownloadListRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.AddToDownloadListRequest' });
        case 'org.sagebionetworks.repo.model.download.AddToDownloadListStatsRequest':
            return Object.assign({}, AddToDownloadListStatsRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.AddToDownloadListStatsRequest' });
        case 'org.sagebionetworks.repo.model.download.DownloadListManifestRequest':
            return Object.assign({}, DownloadListManifestRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListManifestRequest' });
        case 'org.sagebionetworks.repo.model.download.DownloadListPackageRequest':
            return Object.assign({}, DownloadListPackageRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListPackageRequest' });
        case 'org.sagebionetworks.repo.model.download.DownloadListQueryRequest':
            return Object.assign({}, DownloadListQueryRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.DownloadListQueryRequest' });
        case 'org.sagebionetworks.repo.model.file.AddFileToDownloadListRequest':
            return Object.assign({}, AddFileToDownloadListRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.AddFileToDownloadListRequest' });
        case 'org.sagebionetworks.repo.model.file.BulkFileDownloadRequest':
            return Object.assign({}, BulkFileDownloadRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.BulkFileDownloadRequest' });
        case 'org.sagebionetworks.repo.model.file.FileHandleArchivalRequest':
            return Object.assign({}, FileHandleArchivalRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.FileHandleArchivalRequest' });
        case 'org.sagebionetworks.repo.model.file.FileHandleRestoreRequest':
            return Object.assign({}, FileHandleRestoreRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.FileHandleRestoreRequest' });
        case 'org.sagebionetworks.repo.model.grid.CreateGridRequest':
            return Object.assign({}, CreateGridRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.CreateGridRequest' });
        case 'org.sagebionetworks.repo.model.grid.DownloadFromGridRequest':
            return Object.assign({}, DownloadFromGridRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.DownloadFromGridRequest' });
        case 'org.sagebionetworks.repo.model.grid.GridCsvImportRequest':
            return Object.assign({}, GridCsvImportRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.GridCsvImportRequest' });
        case 'org.sagebionetworks.repo.model.grid.GridQueryJobRequest':
            return Object.assign({}, GridQueryJobRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.GridQueryJobRequest' });
        case 'org.sagebionetworks.repo.model.grid.GridRecordSetExportRequest':
            return Object.assign({}, GridRecordSetExportRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.GridRecordSetExportRequest' });
        case 'org.sagebionetworks.repo.model.grid.GridUpdateJobRequest':
            return Object.assign({}, GridUpdateJobRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.GridUpdateJobRequest' });
        case 'org.sagebionetworks.repo.model.grid.SynchronizeGridRequest':
            return Object.assign({}, SynchronizeGridRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.SynchronizeGridRequest' });
        case 'org.sagebionetworks.repo.model.migration.AsyncMigrationRequest':
            return Object.assign({}, AsyncMigrationRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationRequest' });
        case 'org.sagebionetworks.repo.model.report.DownloadStorageReportRequest':
            return Object.assign({}, DownloadStorageReportRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.report.DownloadStorageReportRequest' });
        case 'org.sagebionetworks.repo.model.schema.CreateSchemaRequest':
            return Object.assign({}, CreateSchemaRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.schema.CreateSchemaRequest' });
        case 'org.sagebionetworks.repo.model.schema.GetValidationSchemaRequest':
            return Object.assign({}, GetValidationSchemaRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.schema.GetValidationSchemaRequest' });
        case 'org.sagebionetworks.repo.model.search.table.SearchIndexQuery':
            return Object.assign({}, SearchIndexQueryToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.table.SearchIndexQuery' });
        case 'org.sagebionetworks.repo.model.table.AppendableRowSetRequest':
            return Object.assign({}, AppendableRowSetRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.AppendableRowSetRequest' });
        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' });
        case 'org.sagebionetworks.repo.model.table.TableSchemaChangeRequest':
            return Object.assign({}, TableSchemaChangeRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.TableSchemaChangeRequest' });
        case 'org.sagebionetworks.repo.model.table.TableSearchChangeRequest':
            return Object.assign({}, TableSearchChangeRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.TableSearchChangeRequest' });
        case 'org.sagebionetworks.repo.model.table.TableUpdateTransactionRequest':
            return Object.assign({}, TableUpdateTransactionRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.TableUpdateTransactionRequest' });
        case 'org.sagebionetworks.repo.model.table.UploadToTablePreviewRequest':
            return Object.assign({}, UploadToTablePreviewRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.UploadToTablePreviewRequest' });
        case 'org.sagebionetworks.repo.model.table.UploadToTableRequest':
            return Object.assign({}, UploadToTableRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.UploadToTableRequest' });
        case 'org.sagebionetworks.repo.model.table.ViewColumnModelRequest':
            return Object.assign({}, ViewColumnModelRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.ViewColumnModelRequest' });
        default:
            return value;
    }
}
//# sourceMappingURL=AsynchronousRequestBody.js.map