"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeExternalUsersSubmitDeleteJobResponseV2025R0 = serializeExternalUsersSubmitDeleteJobResponseV2025R0;
exports.deserializeExternalUsersSubmitDeleteJobResponseV2025R0 = deserializeExternalUsersSubmitDeleteJobResponseV2025R0;
const externalUserDeletionResultV2025R0_1 = require("./externalUserDeletionResultV2025R0");
const externalUserDeletionResultV2025R0_2 = require("./externalUserDeletionResultV2025R0");
const errors_1 = require("../../box/errors");
const json_1 = require("../../serialization/json");
const json_2 = require("../../serialization/json");
function serializeExternalUsersSubmitDeleteJobResponseV2025R0(val) {
    return {
        ['entries']: val.entries.map(function (item) {
            return (0, externalUserDeletionResultV2025R0_1.serializeExternalUserDeletionResultV2025R0)(item);
        }),
    };
}
function deserializeExternalUsersSubmitDeleteJobResponseV2025R0(val) {
    if (!(0, json_2.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "ExternalUsersSubmitDeleteJobResponseV2025R0"',
        });
    }
    if (val.entries == void 0) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting "entries" of type "ExternalUsersSubmitDeleteJobResponseV2025R0" to be defined',
        });
    }
    if (!(0, json_1.sdIsList)(val.entries)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting array for "entries" of type "ExternalUsersSubmitDeleteJobResponseV2025R0"',
        });
    }
    const entries = (0, json_1.sdIsList)(val.entries)
        ? val.entries.map(function (itm) {
            return (0, externalUserDeletionResultV2025R0_2.deserializeExternalUserDeletionResultV2025R0)(itm);
        })
        : [];
    return {
        entries: entries,
    };
}
//# sourceMappingURL=externalUsersSubmitDeleteJobResponseV2025R0.js.map