UNPKG

box-node-sdk

Version:

Official SDK for Box Platform APIs

41 lines 1.65 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.serializeQueryAncestorReferenceV2026R0 = serializeQueryAncestorReferenceV2026R0; exports.deserializeQueryAncestorReferenceV2026R0 = deserializeQueryAncestorReferenceV2026R0; const errors_1 = require("../../box/errors.js"); const json_1 = require("../../serialization/json.js"); const json_2 = require("../../serialization/json.js"); function serializeQueryAncestorReferenceV2026R0(val) { return { ['id']: val.id, ['type']: val.type }; } function deserializeQueryAncestorReferenceV2026R0(val) { if (!(0, json_2.sdIsMap)(val)) { throw new errors_1.BoxSdkError({ message: 'Expecting a map for "QueryAncestorReferenceV2026R0"', }); } if (val.id == void 0) { throw new errors_1.BoxSdkError({ message: 'Expecting "id" of type "QueryAncestorReferenceV2026R0" to be defined', }); } if (!(0, json_1.sdIsString)(val.id)) { throw new errors_1.BoxSdkError({ message: 'Expecting string for "id" of type "QueryAncestorReferenceV2026R0"', }); } const id = val.id; if (val.type == void 0) { throw new errors_1.BoxSdkError({ message: 'Expecting "type" of type "QueryAncestorReferenceV2026R0" to be defined', }); } if (!(0, json_1.sdIsString)(val.type)) { throw new errors_1.BoxSdkError({ message: 'Expecting string for "type" of type "QueryAncestorReferenceV2026R0"', }); } const type = val.type; return { id: id, type: type }; } //# sourceMappingURL=queryAncestorReferenceV2026R0.js.map