@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
92 lines (77 loc) • 2.42 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.66
* 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 { DeepNewsSourceParams } from './DeepNewsSourceParams';
import {
DeepNewsSourceParamsFromJSON,
DeepNewsSourceParamsFromJSONTyped,
DeepNewsSourceParamsToJSON,
DeepNewsSourceParamsToJSONTyped,
} from './DeepNewsSourceParams';
/**
*
* @export
* @interface DeepNewsSource
*/
export interface DeepNewsSource {
/**
*
* @type {string}
* @memberof DeepNewsSource
*/
identifier?: DeepNewsSourceIdentifierEnum;
/**
*
* @type {DeepNewsSourceParams}
* @memberof DeepNewsSource
*/
params?: DeepNewsSourceParams;
}
/**
* @export
*/
export const DeepNewsSourceIdentifierEnum = {
Deepnews: 'deepnews'
} as const;
export type DeepNewsSourceIdentifierEnum = typeof DeepNewsSourceIdentifierEnum[keyof typeof DeepNewsSourceIdentifierEnum];
/**
* Check if a given object implements the DeepNewsSource interface.
*/
export function instanceOfDeepNewsSource(value: object): value is DeepNewsSource {
return true;
}
export function DeepNewsSourceFromJSON(json: any): DeepNewsSource {
return DeepNewsSourceFromJSONTyped(json, false);
}
export function DeepNewsSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeepNewsSource {
if (json == null) {
return json;
}
return {
'identifier': json['identifier'] == null ? undefined : json['identifier'],
'params': json['params'] == null ? undefined : DeepNewsSourceParamsFromJSON(json['params']),
};
}
export function DeepNewsSourceToJSON(json: any): DeepNewsSource {
return DeepNewsSourceToJSONTyped(json, false);
}
export function DeepNewsSourceToJSONTyped(value?: DeepNewsSource | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'identifier': value['identifier'],
'params': DeepNewsSourceParamsToJSON(value['params']),
};
}