@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
60 lines (59 loc) • 2.46 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.Delta1ToJSONTyped = exports.Delta1ToJSON = exports.Delta1FromJSONTyped = exports.Delta1FromJSON = void 0;
const AnthropicInputJsonDelta_1 = require("./AnthropicInputJsonDelta");
const AnthropicTextDelta_1 = require("./AnthropicTextDelta");
const AnthropicThinkingDelta_1 = require("./AnthropicThinkingDelta");
function Delta1FromJSON(json) {
return Delta1FromJSONTyped(json, false);
}
exports.Delta1FromJSON = Delta1FromJSON;
function Delta1FromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
if ((0, AnthropicInputJsonDelta_1.instanceOfAnthropicInputJsonDelta)(json)) {
return (0, AnthropicInputJsonDelta_1.AnthropicInputJsonDeltaFromJSONTyped)(json, true);
}
if ((0, AnthropicTextDelta_1.instanceOfAnthropicTextDelta)(json)) {
return (0, AnthropicTextDelta_1.AnthropicTextDeltaFromJSONTyped)(json, true);
}
if ((0, AnthropicThinkingDelta_1.instanceOfAnthropicThinkingDelta)(json)) {
return (0, AnthropicThinkingDelta_1.AnthropicThinkingDeltaFromJSONTyped)(json, true);
}
return {};
}
exports.Delta1FromJSONTyped = Delta1FromJSONTyped;
function Delta1ToJSON(json) {
return Delta1ToJSONTyped(json, false);
}
exports.Delta1ToJSON = Delta1ToJSON;
function Delta1ToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
if ((0, AnthropicInputJsonDelta_1.instanceOfAnthropicInputJsonDelta)(value)) {
return (0, AnthropicInputJsonDelta_1.AnthropicInputJsonDeltaToJSON)(value);
}
if ((0, AnthropicTextDelta_1.instanceOfAnthropicTextDelta)(value)) {
return (0, AnthropicTextDelta_1.AnthropicTextDeltaToJSON)(value);
}
if ((0, AnthropicThinkingDelta_1.instanceOfAnthropicThinkingDelta)(value)) {
return (0, AnthropicThinkingDelta_1.AnthropicThinkingDeltaToJSON)(value);
}
return {};
}
exports.Delta1ToJSONTyped = Delta1ToJSONTyped;