/* 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 { MultichoiceQuestionFromJSONTyped, MultichoiceQuestionToJSON, } from './MultichoiceQuestion';
import { TextFieldQuestionFromJSONTyped, TextFieldQuestionToJSON, } from './TextFieldQuestion';
export function QuestionFromJSON(json) {
    return QuestionFromJSONTyped(json, false);
}
export function QuestionFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.quiz.MultichoiceQuestion':
            return Object.assign({}, MultichoiceQuestionFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.quiz.MultichoiceQuestion' });
        case 'org.sagebionetworks.repo.model.quiz.TextFieldQuestion':
            return Object.assign({}, TextFieldQuestionFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.quiz.TextFieldQuestion' });
        default:
            return json;
    }
}
export function QuestionToJSON(json) {
    return QuestionToJSONTyped(json, false);
}
export function QuestionToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.quiz.MultichoiceQuestion':
            return Object.assign({}, MultichoiceQuestionToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.quiz.MultichoiceQuestion' });
        case 'org.sagebionetworks.repo.model.quiz.TextFieldQuestion':
            return Object.assign({}, TextFieldQuestionToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.quiz.TextFieldQuestion' });
        default:
            return value;
    }
}
//# sourceMappingURL=Question.js.map