/* 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 { DrsErrorResponseFromJSONTyped, DrsErrorResponseToJSON, } from './DrsErrorResponse';
import { ErrorResponseFromJSONTyped, ErrorResponseToJSON, } from './ErrorResponse';
export function BaseErrorFromJSON(json) {
    return BaseErrorFromJSONTyped(json, false);
}
export function BaseErrorFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.ErrorResponse':
            return Object.assign({}, ErrorResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.ErrorResponse' });
        case 'org.sagebionetworks.repo.model.drs.DrsErrorResponse':
            return Object.assign({}, DrsErrorResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.drs.DrsErrorResponse' });
        default:
            return json;
    }
}
export function BaseErrorToJSON(json) {
    return BaseErrorToJSONTyped(json, false);
}
export function BaseErrorToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.ErrorResponse':
            return Object.assign({}, ErrorResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.ErrorResponse' });
        case 'org.sagebionetworks.repo.model.drs.DrsErrorResponse':
            return Object.assign({}, DrsErrorResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.drs.DrsErrorResponse' });
        default:
            return value;
    }
}
//# sourceMappingURL=BaseError.js.map