@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
60 lines (59 loc) • 2.58 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.ContentBlockToJSONTyped = exports.ContentBlockToJSON = exports.ContentBlockFromJSONTyped = exports.ContentBlockFromJSON = void 0;
const AnthropicTextBlock1_1 = require("./AnthropicTextBlock1");
const AnthropicThinkingBlock1_1 = require("./AnthropicThinkingBlock1");
const AnthropicToolUseBlock1_1 = require("./AnthropicToolUseBlock1");
function ContentBlockFromJSON(json) {
return ContentBlockFromJSONTyped(json, false);
}
exports.ContentBlockFromJSON = ContentBlockFromJSON;
function ContentBlockFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
if ((0, AnthropicTextBlock1_1.instanceOfAnthropicTextBlock1)(json)) {
return (0, AnthropicTextBlock1_1.AnthropicTextBlock1FromJSONTyped)(json, true);
}
if ((0, AnthropicThinkingBlock1_1.instanceOfAnthropicThinkingBlock1)(json)) {
return (0, AnthropicThinkingBlock1_1.AnthropicThinkingBlock1FromJSONTyped)(json, true);
}
if ((0, AnthropicToolUseBlock1_1.instanceOfAnthropicToolUseBlock1)(json)) {
return (0, AnthropicToolUseBlock1_1.AnthropicToolUseBlock1FromJSONTyped)(json, true);
}
return {};
}
exports.ContentBlockFromJSONTyped = ContentBlockFromJSONTyped;
function ContentBlockToJSON(json) {
return ContentBlockToJSONTyped(json, false);
}
exports.ContentBlockToJSON = ContentBlockToJSON;
function ContentBlockToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
if ((0, AnthropicTextBlock1_1.instanceOfAnthropicTextBlock1)(value)) {
return (0, AnthropicTextBlock1_1.AnthropicTextBlock1ToJSON)(value);
}
if ((0, AnthropicThinkingBlock1_1.instanceOfAnthropicThinkingBlock1)(value)) {
return (0, AnthropicThinkingBlock1_1.AnthropicThinkingBlock1ToJSON)(value);
}
if ((0, AnthropicToolUseBlock1_1.instanceOfAnthropicToolUseBlock1)(value)) {
return (0, AnthropicToolUseBlock1_1.AnthropicToolUseBlock1ToJSON)(value);
}
return {};
}
exports.ContentBlockToJSONTyped = ContentBlockToJSONTyped;