"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeShieldListsCreateV2025R0 = serializeShieldListsCreateV2025R0;
exports.deserializeShieldListsCreateV2025R0 = deserializeShieldListsCreateV2025R0;
const shieldListContentRequestV2025R0_1 = require("./shieldListContentRequestV2025R0");
const shieldListContentRequestV2025R0_2 = require("./shieldListContentRequestV2025R0");
const errors_1 = require("../../box/errors");
const json_1 = require("../../serialization/json");
const json_2 = require("../../serialization/json");
function serializeShieldListsCreateV2025R0(val) {
    return {
        ['name']: val.name,
        ['description']: val.description,
        ['content']: (0, shieldListContentRequestV2025R0_1.serializeShieldListContentRequestV2025R0)(val.content),
    };
}
function deserializeShieldListsCreateV2025R0(val) {
    if (!(0, json_2.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "ShieldListsCreateV2025R0"',
        });
    }
    if (val.name == void 0) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting "name" of type "ShieldListsCreateV2025R0" to be defined',
        });
    }
    if (!(0, json_1.sdIsString)(val.name)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting string for "name" of type "ShieldListsCreateV2025R0"',
        });
    }
    const name = val.name;
    if (!(val.description == void 0) && !(0, json_1.sdIsString)(val.description)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting string for "description" of type "ShieldListsCreateV2025R0"',
        });
    }
    const description = val.description == void 0 ? void 0 : val.description;
    if (val.content == void 0) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting "content" of type "ShieldListsCreateV2025R0" to be defined',
        });
    }
    const content = (0, shieldListContentRequestV2025R0_2.deserializeShieldListContentRequestV2025R0)(val.content);
    return {
        name: name,
        description: description,
        content: content,
    };
}
//# sourceMappingURL=shieldListsCreateV2025R0.js.map