UNPKG

box-node-sdk

Version:

Official SDK for Box Platform APIs

42 lines 2.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.serializeEnterpriseConfigurationItemIntegerV2025R0 = serializeEnterpriseConfigurationItemIntegerV2025R0; exports.deserializeEnterpriseConfigurationItemIntegerV2025R0 = deserializeEnterpriseConfigurationItemIntegerV2025R0; const enterpriseConfigurationItemV2025R0_1 = require("./enterpriseConfigurationItemV2025R0"); const errors_1 = require("../../box/errors"); const json_1 = require("../../serialization/json"); const json_2 = require("../../serialization/json"); const json_3 = require("../../serialization/json"); function serializeEnterpriseConfigurationItemIntegerV2025R0(val) { const base = (0, enterpriseConfigurationItemV2025R0_1.serializeEnterpriseConfigurationItemV2025R0)(val); if (!(0, json_3.sdIsMap)(base)) { throw new errors_1.BoxSdkError({ message: 'Expecting a map for "EnterpriseConfigurationItemIntegerV2025R0"', }); } return Object.assign(Object.assign({}, base), { ['value']: val.value }); } function deserializeEnterpriseConfigurationItemIntegerV2025R0(val) { if (!(0, json_3.sdIsMap)(val)) { throw new errors_1.BoxSdkError({ message: 'Expecting a map for "EnterpriseConfigurationItemIntegerV2025R0"', }); } if (!(val.value == void 0) && !(0, json_2.sdIsNumber)(val.value)) { throw new errors_1.BoxSdkError({ message: 'Expecting number for "value" of type "EnterpriseConfigurationItemIntegerV2025R0"', }); } const value = val.value == void 0 ? void 0 : 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 "EnterpriseConfigurationItemIntegerV2025R0"', }); } const isUsed = val.is_used == void 0 ? void 0 : val.is_used; return { value: value, isUsed: isUsed, }; } //# sourceMappingURL=enterpriseConfigurationItemIntegerV2025R0.js.map