/* 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 { AppendableRowSetRequestFromJSONTyped, AppendableRowSetRequestToJSON, } from './AppendableRowSetRequest';
import { DownloadFromTableRequestFromJSONTyped, DownloadFromTableRequestToJSON, } from './DownloadFromTableRequest';
import { DownloadPFBRequestFromJSONTyped, DownloadPFBRequestToJSON, } from './DownloadPFBRequest';
import { QueryBundleRequestFromJSONTyped, QueryBundleRequestToJSON, } from './QueryBundleRequest';
import { QueryNextPageTokenFromJSONTyped, QueryNextPageTokenToJSON, } from './QueryNextPageToken';
import { TableSchemaChangeRequestFromJSONTyped, TableSchemaChangeRequestToJSON, } from './TableSchemaChangeRequest';
import { TableSearchChangeRequestFromJSONTyped, TableSearchChangeRequestToJSON, } from './TableSearchChangeRequest';
import { TableUpdateTransactionRequestFromJSONTyped, TableUpdateTransactionRequestToJSON, } from './TableUpdateTransactionRequest';
import { UploadToTableRequestFromJSONTyped, UploadToTableRequestToJSON, } from './UploadToTableRequest';
export function HasEntityIdFromJSON(json) {
    return HasEntityIdFromJSONTyped(json, false);
}
export function HasEntityIdFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        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.UploadToTableRequest':
            return Object.assign({}, UploadToTableRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.UploadToTableRequest' });
        default:
            return json;
    }
}
export function HasEntityIdToJSON(json) {
    return HasEntityIdToJSONTyped(json, false);
}
export function HasEntityIdToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        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.UploadToTableRequest':
            return Object.assign({}, UploadToTableRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.UploadToTableRequest' });
        default:
            return value;
    }
}
//# sourceMappingURL=HasEntityId.js.map