@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
53 lines (52 loc) • 2.04 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 { instanceOfAnthropicTextBlock1, AnthropicTextBlock1FromJSONTyped, AnthropicTextBlock1ToJSON, } from './AnthropicTextBlock1';
import { instanceOfAnthropicThinkingBlock1, AnthropicThinkingBlock1FromJSONTyped, AnthropicThinkingBlock1ToJSON, } from './AnthropicThinkingBlock1';
import { instanceOfAnthropicToolUseBlock1, AnthropicToolUseBlock1FromJSONTyped, AnthropicToolUseBlock1ToJSON, } from './AnthropicToolUseBlock1';
export function ContentBlockFromJSON(json) {
return ContentBlockFromJSONTyped(json, false);
}
export function ContentBlockFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
if (instanceOfAnthropicTextBlock1(json)) {
return AnthropicTextBlock1FromJSONTyped(json, true);
}
if (instanceOfAnthropicThinkingBlock1(json)) {
return AnthropicThinkingBlock1FromJSONTyped(json, true);
}
if (instanceOfAnthropicToolUseBlock1(json)) {
return AnthropicToolUseBlock1FromJSONTyped(json, true);
}
return {};
}
export function ContentBlockToJSON(json) {
return ContentBlockToJSONTyped(json, false);
}
export function ContentBlockToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
if (instanceOfAnthropicTextBlock1(value)) {
return AnthropicTextBlock1ToJSON(value);
}
if (instanceOfAnthropicThinkingBlock1(value)) {
return AnthropicThinkingBlock1ToJSON(value);
}
if (instanceOfAnthropicToolUseBlock1(value)) {
return AnthropicToolUseBlock1ToJSON(value);
}
return {};
}