"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeShieldInformationBarrierReference = serializeShieldInformationBarrierReference;
exports.deserializeShieldInformationBarrierReference = deserializeShieldInformationBarrierReference;
const shieldInformationBarrierBase_1 = require("./shieldInformationBarrierBase");
const shieldInformationBarrierBase_2 = require("./shieldInformationBarrierBase");
const errors_1 = require("../box/errors");
const json_1 = require("../serialization/json");
function serializeShieldInformationBarrierReference(val) {
    return {
        ['shield_information_barrier']: val.shieldInformationBarrier == void 0
            ? val.shieldInformationBarrier
            : (0, shieldInformationBarrierBase_1.serializeShieldInformationBarrierBase)(val.shieldInformationBarrier),
    };
}
function deserializeShieldInformationBarrierReference(val) {
    if (!(0, json_1.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "ShieldInformationBarrierReference"',
        });
    }
    const shieldInformationBarrier = val.shield_information_barrier == void 0
        ? void 0
        : (0, shieldInformationBarrierBase_2.deserializeShieldInformationBarrierBase)(val.shield_information_barrier);
    return {
        shieldInformationBarrier: shieldInformationBarrier,
    };
}
//# sourceMappingURL=shieldInformationBarrierReference.js.map