UNPKG

box-node-sdk

Version:

Official SDK for Box Platform APIs

56 lines 2.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.serializeExternalUserDeletionResultV2025R0 = serializeExternalUserDeletionResultV2025R0; exports.deserializeExternalUserDeletionResultV2025R0 = deserializeExternalUserDeletionResultV2025R0; 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 serializeExternalUserDeletionResultV2025R0(val) { return { ['user_id']: val.userId, ['status']: val.status, ['detail']: val.detail, }; } function deserializeExternalUserDeletionResultV2025R0(val) { if (!(0, json_3.sdIsMap)(val)) { throw new errors_1.BoxSdkError({ message: 'Expecting a map for "ExternalUserDeletionResultV2025R0"', }); } if (val.user_id == void 0) { throw new errors_1.BoxSdkError({ message: 'Expecting "user_id" of type "ExternalUserDeletionResultV2025R0" to be defined', }); } if (!(0, json_2.sdIsString)(val.user_id)) { throw new errors_1.BoxSdkError({ message: 'Expecting string for "user_id" of type "ExternalUserDeletionResultV2025R0"', }); } const userId = val.user_id; if (val.status == void 0) { throw new errors_1.BoxSdkError({ message: 'Expecting "status" of type "ExternalUserDeletionResultV2025R0" to be defined', }); } if (!(0, json_1.sdIsNumber)(val.status)) { throw new errors_1.BoxSdkError({ message: 'Expecting number for "status" of type "ExternalUserDeletionResultV2025R0"', }); } const status = val.status; if (!(val.detail == void 0) && !(0, json_2.sdIsString)(val.detail)) { throw new errors_1.BoxSdkError({ message: 'Expecting string for "detail" of type "ExternalUserDeletionResultV2025R0"', }); } const detail = val.detail == void 0 ? void 0 : val.detail; return { userId: userId, status: status, detail: detail, }; } //# sourceMappingURL=externalUserDeletionResultV2025R0.js.map