@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
85 lines (74 loc) • 2.15 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API [](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.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface IndexCountItem
*/
export interface IndexCountItem {
/**
*
* @type {Date}
* @memberof IndexCountItem
*/
start: Date;
/**
*
* @type {Date}
* @memberof IndexCountItem
*/
end: Date;
/**
*
* @type {number}
* @memberof IndexCountItem
*/
count: number;
}
/**
* Check if a given object implements the IndexCountItem interface.
*/
export function instanceOfIndexCountItem(value: object): value is IndexCountItem {
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: any): IndexCountItem {
return IndexCountItemFromJSONTyped(json, false);
}
export function IndexCountItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): IndexCountItem {
if (json == null) {
return json;
}
return {
'start': (new Date(json['start'])),
'end': (new Date(json['end'])),
'count': json['count'],
};
}
export function IndexCountItemToJSON(json: any): IndexCountItem {
return IndexCountItemToJSONTyped(json, false);
}
export function IndexCountItemToJSONTyped(value?: IndexCountItem | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'start': ((value['start']).toISOString()),
'end': ((value['end']).toISOString()),
'count': value['count'],
};
}