@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
67 lines (66 loc) • 2.71 kB
JavaScript
/* 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 { instanceOfContentBlockDeltaEvent1, ContentBlockDeltaEvent1FromJSONTyped, ContentBlockDeltaEvent1ToJSON, } from './ContentBlockDeltaEvent1';
import { instanceOfContentBlockStartEvent1, ContentBlockStartEvent1FromJSONTyped, ContentBlockStartEvent1ToJSON, } from './ContentBlockStartEvent1';
import { instanceOfContentBlockStopEvent1, ContentBlockStopEvent1FromJSONTyped, ContentBlockStopEvent1ToJSON, } from './ContentBlockStopEvent1';
import { instanceOfMessageStartEvent1, MessageStartEvent1FromJSONTyped, MessageStartEvent1ToJSON, } from './MessageStartEvent1';
import { instanceOfMessageStopEvent1, MessageStopEvent1FromJSONTyped, MessageStopEvent1ToJSON, } from './MessageStopEvent1';
export function DeltaFromJSON(json) {
return DeltaFromJSONTyped(json, false);
}
export function DeltaFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
if (instanceOfContentBlockDeltaEvent1(json)) {
return ContentBlockDeltaEvent1FromJSONTyped(json, true);
}
if (instanceOfContentBlockStartEvent1(json)) {
return ContentBlockStartEvent1FromJSONTyped(json, true);
}
if (instanceOfContentBlockStopEvent1(json)) {
return ContentBlockStopEvent1FromJSONTyped(json, true);
}
if (instanceOfMessageStartEvent1(json)) {
return MessageStartEvent1FromJSONTyped(json, true);
}
if (instanceOfMessageStopEvent1(json)) {
return MessageStopEvent1FromJSONTyped(json, true);
}
return {};
}
export function DeltaToJSON(json) {
return DeltaToJSONTyped(json, false);
}
export function DeltaToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
if (instanceOfContentBlockDeltaEvent1(value)) {
return ContentBlockDeltaEvent1ToJSON(value);
}
if (instanceOfContentBlockStartEvent1(value)) {
return ContentBlockStartEvent1ToJSON(value);
}
if (instanceOfContentBlockStopEvent1(value)) {
return ContentBlockStopEvent1ToJSON(value);
}
if (instanceOfMessageStartEvent1(value)) {
return MessageStartEvent1ToJSON(value);
}
if (instanceOfMessageStopEvent1(value)) {
return MessageStopEvent1ToJSON(value);
}
return {};
}