UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
57 lines (56 loc) 1.84 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.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 { ContentBlockFromJSON, ContentBlockToJSON, } from './ContentBlock'; /** * @export */ export const ContentBlockStartEvent1TypeEnum = { ContentBlockStart: 'content_block_start' }; /** * Check if a given object implements the ContentBlockStartEvent1 interface. */ export function instanceOfContentBlockStartEvent1(value) { if (!('index' in value) || value['index'] === undefined) return false; if (!('contentBlock' in value) || value['contentBlock'] === undefined) return false; return true; } export function ContentBlockStartEvent1FromJSON(json) { return ContentBlockStartEvent1FromJSONTyped(json, false); } export function ContentBlockStartEvent1FromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'type': json['type'] == null ? undefined : json['type'], 'index': json['index'], 'contentBlock': ContentBlockFromJSON(json['content_block']), }; } export function ContentBlockStartEvent1ToJSON(json) { return ContentBlockStartEvent1ToJSONTyped(json, false); } export function ContentBlockStartEvent1ToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'type': value['type'], 'index': value['index'], 'content_block': ContentBlockToJSON(value['contentBlock']), }; }