/* 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 { DataAccessSubmissionEventFromJSONTyped, DataAccessSubmissionEventToJSON, } from './DataAccessSubmissionEvent';
import { FileEventFromJSONTyped, FileEventToJSON, } from './FileEvent';
import { LocalStackChangeMesssageFromJSONTyped, LocalStackChangeMesssageToJSON, } from './LocalStackChangeMesssage';
import { ProjectStorageEventFromJSONTyped, ProjectStorageEventToJSON, } from './ProjectStorageEvent';
import { QueryCacheHitEventFromJSONTyped, QueryCacheHitEventToJSON, } from './QueryCacheHitEvent';
import { ReplicatedEventFromJSONTyped, ReplicatedEventToJSON, } from './ReplicatedEvent';
import { TableStatusChangeEventFromJSONTyped, TableStatusChangeEventToJSON, } from './TableStatusChangeEvent';
export function LocalStackMessageFromJSON(json) {
    return LocalStackMessageFromJSONTyped(json, false);
}
export function LocalStackMessageFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.dataaccess.DataAccessSubmissionEvent':
            return Object.assign({}, DataAccessSubmissionEventFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.dataaccess.DataAccessSubmissionEvent' });
        case 'org.sagebionetworks.repo.model.file.FileEvent':
            return Object.assign({}, FileEventFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.FileEvent' });
        case 'org.sagebionetworks.repo.model.limits.ProjectStorageEvent':
            return Object.assign({}, ProjectStorageEventFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.limits.ProjectStorageEvent' });
        case 'org.sagebionetworks.repo.model.message.LocalStackChangeMesssage':
            return Object.assign({}, LocalStackChangeMesssageFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.message.LocalStackChangeMesssage' });
        case 'org.sagebionetworks.repo.model.table.QueryCacheHitEvent':
            return Object.assign({}, QueryCacheHitEventFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.QueryCacheHitEvent' });
        case 'org.sagebionetworks.repo.model.table.ReplicatedEvent':
            return Object.assign({}, ReplicatedEventFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.ReplicatedEvent' });
        case 'org.sagebionetworks.repo.model.table.TableStatusChangeEvent':
            return Object.assign({}, TableStatusChangeEventFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.TableStatusChangeEvent' });
        default:
            return json;
    }
}
export function LocalStackMessageToJSON(json) {
    return LocalStackMessageToJSONTyped(json, false);
}
export function LocalStackMessageToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.dataaccess.DataAccessSubmissionEvent':
            return Object.assign({}, DataAccessSubmissionEventToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.dataaccess.DataAccessSubmissionEvent' });
        case 'org.sagebionetworks.repo.model.file.FileEvent':
            return Object.assign({}, FileEventToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.FileEvent' });
        case 'org.sagebionetworks.repo.model.limits.ProjectStorageEvent':
            return Object.assign({}, ProjectStorageEventToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.limits.ProjectStorageEvent' });
        case 'org.sagebionetworks.repo.model.message.LocalStackChangeMesssage':
            return Object.assign({}, LocalStackChangeMesssageToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.message.LocalStackChangeMesssage' });
        case 'org.sagebionetworks.repo.model.table.QueryCacheHitEvent':
            return Object.assign({}, QueryCacheHitEventToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.QueryCacheHitEvent' });
        case 'org.sagebionetworks.repo.model.table.ReplicatedEvent':
            return Object.assign({}, ReplicatedEventToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.ReplicatedEvent' });
        case 'org.sagebionetworks.repo.model.table.TableStatusChangeEvent':
            return Object.assign({}, TableStatusChangeEventToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.TableStatusChangeEvent' });
        default:
            return value;
    }
}
//# sourceMappingURL=LocalStackMessage.js.map