UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
69 lines (68 loc) 3.03 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.22 * 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.DomainQueryClusterItemToJSONTyped = exports.DomainQueryClusterItemToJSON = exports.DomainQueryClusterItemFromJSONTyped = exports.DomainQueryClusterItemFromJSON = exports.instanceOfDomainQueryClusterItem = void 0; const DomainQueryItem_1 = require("./DomainQueryItem"); /** * Check if a given object implements the DomainQueryClusterItem interface. */ function instanceOfDomainQueryClusterItem(value) { if (!('clusterLabel' in value) || value['clusterLabel'] === undefined) return false; if (!('clusterDescription' in value) || value['clusterDescription'] === undefined) return false; if (!('clusterClassification' in value) || value['clusterClassification'] === undefined) return false; if (!('centroidCoords' in value) || value['centroidCoords'] === undefined) return false; if (!('clusterQueries' in value) || value['clusterQueries'] === undefined) return false; return true; } exports.instanceOfDomainQueryClusterItem = instanceOfDomainQueryClusterItem; function DomainQueryClusterItemFromJSON(json) { return DomainQueryClusterItemFromJSONTyped(json, false); } exports.DomainQueryClusterItemFromJSON = DomainQueryClusterItemFromJSON; function DomainQueryClusterItemFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'clusterLabel': json['cluster_label'], 'clusterDescription': json['cluster_description'], 'clusterClassification': json['cluster_classification'], 'centroidCoords': json['centroid_coords'], 'clusterQueries': (json['cluster_queries'].map(DomainQueryItem_1.DomainQueryItemFromJSON)), }; } exports.DomainQueryClusterItemFromJSONTyped = DomainQueryClusterItemFromJSONTyped; function DomainQueryClusterItemToJSON(json) { return DomainQueryClusterItemToJSONTyped(json, false); } exports.DomainQueryClusterItemToJSON = DomainQueryClusterItemToJSON; function DomainQueryClusterItemToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'cluster_label': value['clusterLabel'], 'cluster_description': value['clusterDescription'], 'cluster_classification': value['clusterClassification'], 'centroid_coords': value['centroidCoords'], 'cluster_queries': (value['clusterQueries'].map(DomainQueryItem_1.DomainQueryItemToJSON)), }; } exports.DomainQueryClusterItemToJSONTyped = DomainQueryClusterItemToJSONTyped;