"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeSkillCard = serializeSkillCard;
exports.deserializeSkillCard = deserializeSkillCard;
const keywordSkillCard_1 = require("./keywordSkillCard");
const keywordSkillCard_2 = require("./keywordSkillCard");
const timelineSkillCard_1 = require("./timelineSkillCard");
const timelineSkillCard_2 = require("./timelineSkillCard");
const transcriptSkillCard_1 = require("./transcriptSkillCard");
const transcriptSkillCard_2 = require("./transcriptSkillCard");
const statusSkillCard_1 = require("./statusSkillCard");
const statusSkillCard_2 = require("./statusSkillCard");
const errors_1 = require("../box/errors");
const json_1 = require("../serialization/json");
function serializeSkillCard(val) {
    if (val.skillCardType == 'keyword') {
        return (0, keywordSkillCard_1.serializeKeywordSkillCard)(val);
    }
    if (val.skillCardType == 'timeline') {
        return (0, timelineSkillCard_1.serializeTimelineSkillCard)(val);
    }
    if (val.skillCardType == 'transcript') {
        return (0, transcriptSkillCard_1.serializeTranscriptSkillCard)(val);
    }
    if (val.skillCardType == 'status') {
        return (0, statusSkillCard_1.serializeStatusSkillCard)(val);
    }
    throw new errors_1.BoxSdkError({ message: 'unknown type' });
}
function deserializeSkillCard(val) {
    if (!(0, json_1.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({ message: 'Expecting a map for "SkillCard"' });
    }
    if (val.skill_card_type == 'keyword') {
        return (0, keywordSkillCard_2.deserializeKeywordSkillCard)(val);
    }
    if (val.skill_card_type == 'timeline') {
        return (0, timelineSkillCard_2.deserializeTimelineSkillCard)(val);
    }
    if (val.skill_card_type == 'transcript') {
        return (0, transcriptSkillCard_2.deserializeTranscriptSkillCard)(val);
    }
    if (val.skill_card_type == 'status') {
        return (0, statusSkillCard_2.deserializeStatusSkillCard)(val);
    }
    throw new errors_1.BoxSdkError({ message: "Can't deserialize SkillCard" });
}
//# sourceMappingURL=skillCard.js.map