/* 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 { DoubleAnnotationFromJSONTyped, DoubleAnnotationToJSON, } from './DoubleAnnotation';
import { LongAnnotationFromJSONTyped, LongAnnotationToJSON, } from './LongAnnotation';
import { StringAnnotationFromJSONTyped, StringAnnotationToJSON, } from './StringAnnotation';
export function AnnotationBaseFromJSON(json) {
    return AnnotationBaseFromJSONTyped(json, false);
}
export function AnnotationBaseFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.annotation.DoubleAnnotation':
            return Object.assign({}, DoubleAnnotationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.annotation.DoubleAnnotation' });
        case 'org.sagebionetworks.repo.model.annotation.LongAnnotation':
            return Object.assign({}, LongAnnotationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.annotation.LongAnnotation' });
        case 'org.sagebionetworks.repo.model.annotation.StringAnnotation':
            return Object.assign({}, StringAnnotationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.annotation.StringAnnotation' });
        default:
            return json;
    }
}
export function AnnotationBaseToJSON(json) {
    return AnnotationBaseToJSONTyped(json, false);
}
export function AnnotationBaseToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.annotation.DoubleAnnotation':
            return Object.assign({}, DoubleAnnotationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.annotation.DoubleAnnotation' });
        case 'org.sagebionetworks.repo.model.annotation.LongAnnotation':
            return Object.assign({}, LongAnnotationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.annotation.LongAnnotation' });
        case 'org.sagebionetworks.repo.model.annotation.StringAnnotation':
            return Object.assign({}, StringAnnotationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.annotation.StringAnnotation' });
        default:
            return value;
    }
}
//# sourceMappingURL=AnnotationBase.js.map