UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
52 lines (51 loc) 1.59 kB
/* 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. */ /** * Check if a given object implements the IndexCountItem interface. */ export function instanceOfIndexCountItem(value) { if (!('start' in value) || value['start'] === undefined) return false; if (!('end' in value) || value['end'] === undefined) return false; if (!('count' in value) || value['count'] === undefined) return false; return true; } export function IndexCountItemFromJSON(json) { return IndexCountItemFromJSONTyped(json, false); } export function IndexCountItemFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'start': (new Date(json['start'])), 'end': (new Date(json['end'])), 'count': json['count'], }; } export function IndexCountItemToJSON(json) { return IndexCountItemToJSONTyped(json, false); } export function IndexCountItemToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'start': ((value['start']).toISOString()), 'end': ((value['end']).toISOString()), 'count': value['count'], }; }