UNPKG

box-node-sdk

Version:

Official SDK for Box Platform APIs

32 lines 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.serializeUserTrackingCodeV2025R0 = serializeUserTrackingCodeV2025R0; exports.deserializeUserTrackingCodeV2025R0 = deserializeUserTrackingCodeV2025R0; 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 serializeUserTrackingCodeV2025R0(val) { return { ['id']: val.id, ['name']: val.name }; } function deserializeUserTrackingCodeV2025R0(val) { if (!(0, json_3.sdIsMap)(val)) { throw new errors_1.BoxSdkError({ message: 'Expecting a map for "UserTrackingCodeV2025R0"', }); } if (!(val.id == void 0) && !(0, json_1.sdIsNumber)(val.id)) { throw new errors_1.BoxSdkError({ message: 'Expecting number for "id" of type "UserTrackingCodeV2025R0"', }); } const id = val.id == void 0 ? void 0 : val.id; if (!(val.name == void 0) && !(0, json_2.sdIsString)(val.name)) { throw new errors_1.BoxSdkError({ message: 'Expecting string for "name" of type "UserTrackingCodeV2025R0"', }); } const name = val.name == void 0 ? void 0 : val.name; return { id: id, name: name }; } //# sourceMappingURL=userTrackingCodeV2025R0.js.map