UNPKG

box-node-sdk

Version:

Official SDK for Box Platform APIs

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