UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
93 lines (81 loc) 3.01 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. */ import { mapValues } from '../runtime'; import type { DomainHitsSurfaceDayItem } from './DomainHitsSurfaceDayItem'; import { DomainHitsSurfaceDayItemFromJSON, DomainHitsSurfaceDayItemFromJSONTyped, DomainHitsSurfaceDayItemToJSON, DomainHitsSurfaceDayItemToJSONTyped, } from './DomainHitsSurfaceDayItem'; /** * * @export * @interface DomainHitsSurfaceTimeWindowResponse */ export interface DomainHitsSurfaceTimeWindowResponse { /** * * @type {Array<DomainHitsSurfaceDayItem>} * @memberof DomainHitsSurfaceTimeWindowResponse */ data: Array<DomainHitsSurfaceDayItem>; /** * * @type {number} * @memberof DomainHitsSurfaceTimeWindowResponse */ totalHits: number; /** * * @type {number} * @memberof DomainHitsSurfaceTimeWindowResponse */ totalSurfaced: number; } /** * Check if a given object implements the DomainHitsSurfaceTimeWindowResponse interface. */ export function instanceOfDomainHitsSurfaceTimeWindowResponse(value: object): value is DomainHitsSurfaceTimeWindowResponse { if (!('data' in value) || value['data'] === undefined) return false; if (!('totalHits' in value) || value['totalHits'] === undefined) return false; if (!('totalSurfaced' in value) || value['totalSurfaced'] === undefined) return false; return true; } export function DomainHitsSurfaceTimeWindowResponseFromJSON(json: any): DomainHitsSurfaceTimeWindowResponse { return DomainHitsSurfaceTimeWindowResponseFromJSONTyped(json, false); } export function DomainHitsSurfaceTimeWindowResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DomainHitsSurfaceTimeWindowResponse { if (json == null) { return json; } return { 'data': ((json['data'] as Array<any>).map(DomainHitsSurfaceDayItemFromJSON)), 'totalHits': json['total_hits'], 'totalSurfaced': json['total_surfaced'], }; } export function DomainHitsSurfaceTimeWindowResponseToJSON(json: any): DomainHitsSurfaceTimeWindowResponse { return DomainHitsSurfaceTimeWindowResponseToJSONTyped(json, false); } export function DomainHitsSurfaceTimeWindowResponseToJSONTyped(value?: DomainHitsSurfaceTimeWindowResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'data': ((value['data'] as Array<any>).map(DomainHitsSurfaceDayItemToJSON)), 'total_hits': value['totalHits'], 'total_surfaced': value['totalSurfaced'], }; }