UNPKG

box-node-sdk

Version:

Official SDK for Box Platform APIs

46 lines 1.85 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.serializeEnterpriseReferenceV2025R0TypeField = serializeEnterpriseReferenceV2025R0TypeField; exports.deserializeEnterpriseReferenceV2025R0TypeField = deserializeEnterpriseReferenceV2025R0TypeField; exports.serializeEnterpriseReferenceV2025R0 = serializeEnterpriseReferenceV2025R0; exports.deserializeEnterpriseReferenceV2025R0 = deserializeEnterpriseReferenceV2025R0; const errors_1 = require("../../box/errors"); const json_1 = require("../../serialization/json"); const json_2 = require("../../serialization/json"); function serializeEnterpriseReferenceV2025R0TypeField(val) { return val; } function deserializeEnterpriseReferenceV2025R0TypeField(val) { if (val == 'enterprise') { return val; } throw new errors_1.BoxSdkError({ message: "Can't deserialize EnterpriseReferenceV2025R0TypeField", }); } function serializeEnterpriseReferenceV2025R0(val) { return { ['id']: val.id, ['type']: val.type == void 0 ? val.type : serializeEnterpriseReferenceV2025R0TypeField(val.type), }; } function deserializeEnterpriseReferenceV2025R0(val) { if (!(0, json_2.sdIsMap)(val)) { throw new errors_1.BoxSdkError({ message: 'Expecting a map for "EnterpriseReferenceV2025R0"', }); } if (!(val.id == void 0) && !(0, json_1.sdIsString)(val.id)) { throw new errors_1.BoxSdkError({ message: 'Expecting string for "id" of type "EnterpriseReferenceV2025R0"', }); } const id = val.id == void 0 ? void 0 : val.id; const type = val.type == void 0 ? void 0 : deserializeEnterpriseReferenceV2025R0TypeField(val.type); return { id: id, type: type }; } //# sourceMappingURL=enterpriseReferenceV2025R0.js.map