@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
53 lines (52 loc) • 2.02 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 { instanceOfAnthropicTextBlock, AnthropicTextBlockFromJSONTyped, AnthropicTextBlockToJSON, } from './AnthropicTextBlock';
import { instanceOfAnthropicThinkingBlock, AnthropicThinkingBlockFromJSONTyped, AnthropicThinkingBlockToJSON, } from './AnthropicThinkingBlock';
import { instanceOfAnthropicToolUseBlock, AnthropicToolUseBlockFromJSONTyped, AnthropicToolUseBlockToJSON, } from './AnthropicToolUseBlock';
export function ContentBlock1FromJSON(json) {
return ContentBlock1FromJSONTyped(json, false);
}
export function ContentBlock1FromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
if (instanceOfAnthropicTextBlock(json)) {
return AnthropicTextBlockFromJSONTyped(json, true);
}
if (instanceOfAnthropicThinkingBlock(json)) {
return AnthropicThinkingBlockFromJSONTyped(json, true);
}
if (instanceOfAnthropicToolUseBlock(json)) {
return AnthropicToolUseBlockFromJSONTyped(json, true);
}
return {};
}
export function ContentBlock1ToJSON(json) {
return ContentBlock1ToJSONTyped(json, false);
}
export function ContentBlock1ToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
if (instanceOfAnthropicTextBlock(value)) {
return AnthropicTextBlockToJSON(value);
}
if (instanceOfAnthropicThinkingBlock(value)) {
return AnthropicThinkingBlockToJSON(value);
}
if (instanceOfAnthropicToolUseBlock(value)) {
return AnthropicToolUseBlockToJSON(value);
}
return {};
}