"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeSessionTerminationMessage = serializeSessionTerminationMessage;
exports.deserializeSessionTerminationMessage = deserializeSessionTerminationMessage;
const errors_1 = require("../box/errors");
const json_1 = require("../serialization/json");
const json_2 = require("../serialization/json");
function serializeSessionTerminationMessage(val) {
    return { ['message']: val.message };
}
function deserializeSessionTerminationMessage(val) {
    if (!(0, json_2.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "SessionTerminationMessage"',
        });
    }
    if (!(val.message == void 0) && !(0, json_1.sdIsString)(val.message)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting string for "message" of type "SessionTerminationMessage"',
        });
    }
    const message = val.message == void 0 ? void 0 : val.message;
    return { message: message };
}
//# sourceMappingURL=sessionTerminationMessage.js.map