"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeEnterpriseFeatureSettingsItemV2025R0 = serializeEnterpriseFeatureSettingsItemV2025R0;
exports.deserializeEnterpriseFeatureSettingsItemV2025R0 = deserializeEnterpriseFeatureSettingsItemV2025R0;
const enterpriseConfigurationItemV2025R0_1 = require("./enterpriseConfigurationItemV2025R0");
const enterpriseFeatureSettingV2025R0_1 = require("./enterpriseFeatureSettingV2025R0");
const enterpriseFeatureSettingV2025R0_2 = require("./enterpriseFeatureSettingV2025R0");
const errors_1 = require("../../box/errors");
const json_1 = require("../../serialization/json");
const json_2 = require("../../serialization/json");
function serializeEnterpriseFeatureSettingsItemV2025R0(val) {
    const base = (0, enterpriseConfigurationItemV2025R0_1.serializeEnterpriseConfigurationItemV2025R0)(val);
    if (!(0, json_2.sdIsMap)(base)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseFeatureSettingsItemV2025R0"',
        });
    }
    return Object.assign(Object.assign({}, base), {
        ['value']: val.value == void 0
            ? val.value
            : (0, enterpriseFeatureSettingV2025R0_1.serializeEnterpriseFeatureSettingV2025R0)(val.value),
    });
}
function deserializeEnterpriseFeatureSettingsItemV2025R0(val) {
    if (!(0, json_2.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseFeatureSettingsItemV2025R0"',
        });
    }
    const value = val.value == void 0
        ? void 0
        : (0, enterpriseFeatureSettingV2025R0_2.deserializeEnterpriseFeatureSettingV2025R0)(val.value);
    if (!(val.is_used == void 0) && !(0, json_1.sdIsBoolean)(val.is_used)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting boolean for "is_used" of type "EnterpriseFeatureSettingsItemV2025R0"',
        });
    }
    const isUsed = val.is_used == void 0 ? void 0 : val.is_used;
    return {
        value: value,
        isUsed: isUsed,
    };
}
//# sourceMappingURL=enterpriseFeatureSettingsItemV2025R0.js.map