UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
55 lines (54 loc) 2.65 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](https://status.asknews.app/status/prod) * * The version of the OpenAPI document: 0.24.50 * Contact: contact@emergentmethods.ai * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CreateAlertRequestReportToJSONTyped = exports.CreateAlertRequestReportToJSON = exports.CreateAlertRequestReportFromJSONTyped = exports.CreateAlertRequestReportFromJSON = void 0; const DeepNewsReportRequest_1 = require("./DeepNewsReportRequest"); const LegacyReportRequest_1 = require("./LegacyReportRequest"); function CreateAlertRequestReportFromJSON(json) { return CreateAlertRequestReportFromJSONTyped(json, false); } exports.CreateAlertRequestReportFromJSON = CreateAlertRequestReportFromJSON; function CreateAlertRequestReportFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } switch (json['identifier']) { case 'deepnews': return Object.assign({}, (0, DeepNewsReportRequest_1.DeepNewsReportRequestFromJSONTyped)(json, true), { identifier: 'deepnews' }); case 'legacy': return Object.assign({}, (0, LegacyReportRequest_1.LegacyReportRequestFromJSONTyped)(json, true), { identifier: 'legacy' }); default: throw new Error(`No variant of CreateAlertRequestReport exists with 'identifier=${json['identifier']}'`); } } exports.CreateAlertRequestReportFromJSONTyped = CreateAlertRequestReportFromJSONTyped; function CreateAlertRequestReportToJSON(json) { return CreateAlertRequestReportToJSONTyped(json, false); } exports.CreateAlertRequestReportToJSON = CreateAlertRequestReportToJSON; function CreateAlertRequestReportToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } switch (value['identifier']) { case 'deepnews': return Object.assign({}, (0, DeepNewsReportRequest_1.DeepNewsReportRequestToJSON)(value), { identifier: 'deepnews' }); case 'legacy': return Object.assign({}, (0, LegacyReportRequest_1.LegacyReportRequestToJSON)(value), { identifier: 'legacy' }); default: throw new Error(`No variant of CreateAlertRequestReport exists with 'identifier=${value['identifier']}'`); } } exports.CreateAlertRequestReportToJSONTyped = CreateAlertRequestReportToJSONTyped;