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