UNPKG

box-node-sdk

Version:

Official SDK for Box Platform APIs

31 lines 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.serializeSignRequestSignerAttachment = serializeSignRequestSignerAttachment; exports.deserializeSignRequestSignerAttachment = deserializeSignRequestSignerAttachment; const errors_1 = require("../box/errors"); const json_1 = require("../serialization/json"); const json_2 = require("../serialization/json"); function serializeSignRequestSignerAttachment(val) { return { ['id']: val.id, ['name']: val.name }; } function deserializeSignRequestSignerAttachment(val) { if (!(0, json_2.sdIsMap)(val)) { throw new errors_1.BoxSdkError({ message: 'Expecting a map for "SignRequestSignerAttachment"', }); } if (!(val.id == void 0) && !(0, json_1.sdIsString)(val.id)) { throw new errors_1.BoxSdkError({ message: 'Expecting string for "id" of type "SignRequestSignerAttachment"', }); } const id = val.id == void 0 ? void 0 : val.id; if (!(val.name == void 0) && !(0, json_1.sdIsString)(val.name)) { throw new errors_1.BoxSdkError({ message: 'Expecting string for "name" of type "SignRequestSignerAttachment"', }); } const name = val.name == void 0 ? void 0 : val.name; return { id: id, name: name }; } //# sourceMappingURL=signRequestSignerAttachment.js.map