@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
60 lines (59 loc) • 2.57 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContentBlock1ToJSONTyped = exports.ContentBlock1ToJSON = exports.ContentBlock1FromJSONTyped = exports.ContentBlock1FromJSON = void 0;
const AnthropicTextBlock_1 = require("./AnthropicTextBlock");
const AnthropicThinkingBlock_1 = require("./AnthropicThinkingBlock");
const AnthropicToolUseBlock_1 = require("./AnthropicToolUseBlock");
function ContentBlock1FromJSON(json) {
return ContentBlock1FromJSONTyped(json, false);
}
exports.ContentBlock1FromJSON = ContentBlock1FromJSON;
function ContentBlock1FromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
if ((0, AnthropicTextBlock_1.instanceOfAnthropicTextBlock)(json)) {
return (0, AnthropicTextBlock_1.AnthropicTextBlockFromJSONTyped)(json, true);
}
if ((0, AnthropicThinkingBlock_1.instanceOfAnthropicThinkingBlock)(json)) {
return (0, AnthropicThinkingBlock_1.AnthropicThinkingBlockFromJSONTyped)(json, true);
}
if ((0, AnthropicToolUseBlock_1.instanceOfAnthropicToolUseBlock)(json)) {
return (0, AnthropicToolUseBlock_1.AnthropicToolUseBlockFromJSONTyped)(json, true);
}
return {};
}
exports.ContentBlock1FromJSONTyped = ContentBlock1FromJSONTyped;
function ContentBlock1ToJSON(json) {
return ContentBlock1ToJSONTyped(json, false);
}
exports.ContentBlock1ToJSON = ContentBlock1ToJSON;
function ContentBlock1ToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
if ((0, AnthropicTextBlock_1.instanceOfAnthropicTextBlock)(value)) {
return (0, AnthropicTextBlock_1.AnthropicTextBlockToJSON)(value);
}
if ((0, AnthropicThinkingBlock_1.instanceOfAnthropicThinkingBlock)(value)) {
return (0, AnthropicThinkingBlock_1.AnthropicThinkingBlockToJSON)(value);
}
if ((0, AnthropicToolUseBlock_1.instanceOfAnthropicToolUseBlock)(value)) {
return (0, AnthropicToolUseBlock_1.AnthropicToolUseBlockToJSON)(value);
}
return {};
}
exports.ContentBlock1ToJSONTyped = ContentBlock1ToJSONTyped;