UNPKG

box-node-sdk

Version:

Official SDK for Box Platform APIs

32 lines 1.33 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.serializeAiAskAgent = serializeAiAskAgent; exports.deserializeAiAskAgent = deserializeAiAskAgent; const aiAgentReference_1 = require("./aiAgentReference.js"); const aiAgentReference_2 = require("./aiAgentReference.js"); const aiAgentAsk_1 = require("./aiAgentAsk.js"); const aiAgentAsk_2 = require("./aiAgentAsk.js"); const errors_1 = require("../box/errors.js"); const json_1 = require("../serialization/json.js"); function serializeAiAskAgent(val) { if (val.type == 'ai_agent_id') { return (0, aiAgentReference_1.serializeAiAgentReference)(val); } if (val.type == 'ai_agent_ask') { return (0, aiAgentAsk_1.serializeAiAgentAsk)(val); } throw new errors_1.BoxSdkError({ message: 'unknown type' }); } function deserializeAiAskAgent(val) { if (!(0, json_1.sdIsMap)(val)) { throw new errors_1.BoxSdkError({ message: 'Expecting a map for "AiAskAgent"' }); } if (val.type == 'ai_agent_id') { return (0, aiAgentReference_2.deserializeAiAgentReference)(val); } if (val.type == 'ai_agent_ask') { return (0, aiAgentAsk_2.deserializeAiAgentAsk)(val); } throw new errors_1.BoxSdkError({ message: "Can't deserialize AiAskAgent" }); } //# sourceMappingURL=aiAskAgent.js.map