@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
85 lines (74 loc) • 2.29 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 DomainHitsSurfaceDayItem
*/
export interface DomainHitsSurfaceDayItem {
/**
*
* @type {string}
* @memberof DomainHitsSurfaceDayItem
*/
day: string;
/**
*
* @type {number}
* @memberof DomainHitsSurfaceDayItem
*/
hits: number;
/**
*
* @type {number}
* @memberof DomainHitsSurfaceDayItem
*/
surfaced: number;
}
/**
* Check if a given object implements the DomainHitsSurfaceDayItem interface.
*/
export function instanceOfDomainHitsSurfaceDayItem(value: object): value is DomainHitsSurfaceDayItem {
if (!('day' in value) || value['day'] === undefined) return false;
if (!('hits' in value) || value['hits'] === undefined) return false;
if (!('surfaced' in value) || value['surfaced'] === undefined) return false;
return true;
}
export function DomainHitsSurfaceDayItemFromJSON(json: any): DomainHitsSurfaceDayItem {
return DomainHitsSurfaceDayItemFromJSONTyped(json, false);
}
export function DomainHitsSurfaceDayItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): DomainHitsSurfaceDayItem {
if (json == null) {
return json;
}
return {
'day': json['day'],
'hits': json['hits'],
'surfaced': json['surfaced'],
};
}
export function DomainHitsSurfaceDayItemToJSON(json: any): DomainHitsSurfaceDayItem {
return DomainHitsSurfaceDayItemToJSONTyped(json, false);
}
export function DomainHitsSurfaceDayItemToJSONTyped(value?: DomainHitsSurfaceDayItem | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'day': value['day'],
'hits': value['hits'],
'surfaced': value['surfaced'],
};
}