@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
94 lines (79 loc) • 2.33 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';
import type { WebSourceParams } from './WebSourceParams';
import {
WebSourceParamsFromJSON,
WebSourceParamsFromJSONTyped,
WebSourceParamsToJSON,
WebSourceParamsToJSONTyped,
} from './WebSourceParams';
/**
*
* @export
* @interface WebSource
*/
export interface WebSource {
/**
*
* @type {string}
* @memberof WebSource
*/
identifier: WebSourceIdentifierEnum;
/**
*
* @type {WebSourceParams}
* @memberof WebSource
*/
params: WebSourceParams;
}
/**
* @export
*/
export const WebSourceIdentifierEnum = {
Web: 'web'
} as const;
export type WebSourceIdentifierEnum = typeof WebSourceIdentifierEnum[keyof typeof WebSourceIdentifierEnum];
/**
* Check if a given object implements the WebSource interface.
*/
export function instanceOfWebSource(value: object): value is WebSource {
if (!('identifier' in value) || value['identifier'] === undefined) return false;
if (!('params' in value) || value['params'] === undefined) return false;
return true;
}
export function WebSourceFromJSON(json: any): WebSource {
return WebSourceFromJSONTyped(json, false);
}
export function WebSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebSource {
if (json == null) {
return json;
}
return {
'identifier': json['identifier'],
'params': WebSourceParamsFromJSON(json['params']),
};
}
export function WebSourceToJSON(json: any): WebSource {
return WebSourceToJSONTyped(json, false);
}
export function WebSourceToJSONTyped(value?: WebSource | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'identifier': value['identifier'],
'params': WebSourceParamsToJSON(value['params']),
};
}