"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeIntegrationMappingsTeams = serializeIntegrationMappingsTeams;
exports.deserializeIntegrationMappingsTeams = deserializeIntegrationMappingsTeams;
const integrationMappingTeams_1 = require("./integrationMappingTeams");
const integrationMappingTeams_2 = require("./integrationMappingTeams");
const errors_1 = require("../box/errors");
const json_1 = require("../serialization/json");
const json_2 = require("../serialization/json");
function serializeIntegrationMappingsTeams(val) {
    return {
        ['entries']: val.entries == void 0
            ? val.entries
            : val.entries.map(function (item) {
                return (0, integrationMappingTeams_1.serializeIntegrationMappingTeams)(item);
            }),
    };
}
function deserializeIntegrationMappingsTeams(val) {
    if (!(0, json_2.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "IntegrationMappingsTeams"',
        });
    }
    if (!(val.entries == void 0) && !(0, json_1.sdIsList)(val.entries)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting array for "entries" of type "IntegrationMappingsTeams"',
        });
    }
    const entries = val.entries == void 0
        ? void 0
        : (0, json_1.sdIsList)(val.entries)
            ? val.entries.map(function (itm) {
                return (0, integrationMappingTeams_2.deserializeIntegrationMappingTeams)(itm);
            })
            : [];
    return { entries: entries };
}
//# sourceMappingURL=integrationMappingsTeams.js.map