UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
56 lines (55 loc) 1.86 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.21.1 * 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.DisplayImageUrlToJSONTyped = exports.DisplayImageUrlToJSON = exports.DisplayImageUrlFromJSONTyped = exports.DisplayImageUrlFromJSON = exports.instanceOfDisplayImageUrl = void 0; /** * Check if a given object implements the DisplayImageUrl interface. */ function instanceOfDisplayImageUrl(value) { if (!('sourceId' in value) || value['sourceId'] === undefined) return false; if (!('imageUrl' in value) || value['imageUrl'] === undefined) return false; return true; } exports.instanceOfDisplayImageUrl = instanceOfDisplayImageUrl; function DisplayImageUrlFromJSON(json) { return DisplayImageUrlFromJSONTyped(json, false); } exports.DisplayImageUrlFromJSON = DisplayImageUrlFromJSON; function DisplayImageUrlFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'sourceId': json['source_id'], 'imageUrl': json['image_url'], }; } exports.DisplayImageUrlFromJSONTyped = DisplayImageUrlFromJSONTyped; function DisplayImageUrlToJSON(json) { return DisplayImageUrlToJSONTyped(json, false); } exports.DisplayImageUrlToJSON = DisplayImageUrlToJSON; function DisplayImageUrlToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'source_id': value['sourceId'], 'image_url': value['imageUrl'], }; } exports.DisplayImageUrlToJSONTyped = DisplayImageUrlToJSONTyped;