/* 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 { MultichoiceResponseFromJSONTyped, MultichoiceResponseToJSON, } from './MultichoiceResponse';
import { TextFieldResponseFromJSONTyped, TextFieldResponseToJSON, } from './TextFieldResponse';
export function QuestionResponseFromJSON(json) {
    return QuestionResponseFromJSONTyped(json, false);
}
export function QuestionResponseFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.quiz.MultichoiceResponse':
            return Object.assign({}, MultichoiceResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.quiz.MultichoiceResponse' });
        case 'org.sagebionetworks.repo.model.quiz.TextFieldResponse':
            return Object.assign({}, TextFieldResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.quiz.TextFieldResponse' });
        default:
            return json;
    }
}
export function QuestionResponseToJSON(json) {
    return QuestionResponseToJSONTyped(json, false);
}
export function QuestionResponseToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.quiz.MultichoiceResponse':
            return Object.assign({}, MultichoiceResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.quiz.MultichoiceResponse' });
        case 'org.sagebionetworks.repo.model.quiz.TextFieldResponse':
            return Object.assign({}, TextFieldResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.quiz.TextFieldResponse' });
        default:
            return value;
    }
}
//# sourceMappingURL=QuestionResponse.js.map