/* 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 { WikiPageKeyFromJSON, WikiPageKeyToJSON, } from './WikiPageKey';
import { MultichoiceAnswerFromJSON, MultichoiceAnswerToJSON, } from './MultichoiceAnswer';
/**
 * @export
 */
export const MultichoiceQuestionConcreteTypeEnum = {
    org_sagebionetworks_repo_model_quiz_MultichoiceQuestion: 'org.sagebionetworks.repo.model.quiz.MultichoiceQuestion'
};
/**
 * Check if a given object implements the MultichoiceQuestion interface.
 */
export function instanceOfMultichoiceQuestion(value) {
    if (!('concreteType' in value) || value['concreteType'] === undefined)
        return false;
    if (!Object.values(MultichoiceQuestionConcreteTypeEnum).includes(value["concreteType"])) {
        return false;
    }
    return true;
}
export function MultichoiceQuestionFromJSON(json) {
    return MultichoiceQuestionFromJSONTyped(json, false);
}
export function MultichoiceQuestionFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'questionIndex': json['questionIndex'] == null ? undefined : json['questionIndex'],
        'prompt': json['prompt'] == null ? undefined : json['prompt'],
        'reference': json['reference'] == null ? undefined : WikiPageKeyFromJSON(json['reference']),
        'docLink': json['docLink'] == null ? undefined : json['docLink'],
        'helpText': json['helpText'] == null ? undefined : json['helpText'],
        'concreteType': json['concreteType'],
        'exclusive': json['exclusive'] == null ? undefined : json['exclusive'],
        'answers': json['answers'] == null ? undefined : (json['answers'].map(MultichoiceAnswerFromJSON)),
    };
}
export function MultichoiceQuestionToJSON(json) {
    return MultichoiceQuestionToJSONTyped(json, false);
}
export function MultichoiceQuestionToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'questionIndex': value['questionIndex'],
        'prompt': value['prompt'],
        'reference': WikiPageKeyToJSON(value['reference']),
        'docLink': value['docLink'],
        'helpText': value['helpText'],
        'concreteType': value['concreteType'],
        'exclusive': value['exclusive'],
        'answers': value['answers'] == null ? undefined : (value['answers'].map(MultichoiceAnswerToJSON)),
    };
}
//# sourceMappingURL=MultichoiceQuestion.js.map