/* tslint:disable */ /* eslint-disable */ /** * Fabric API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { ToolStatus } from './ToolStatus'; import { ToolStatusFromJSON, ToolStatusFromJSONTyped, ToolStatusToJSON, ToolStatusToJSONTyped, } from './ToolStatus'; /** * * @export * @interface AssistantMessagePartOneOf1 */ export interface AssistantMessagePartOneOf1 { /** * * @type {string} * @memberof AssistantMessagePartOneOf1 */ 'type': AssistantMessagePartOneOf1TypeEnum; /** * * @type {string} * @memberof AssistantMessagePartOneOf1 */ 'name': string; /** * * @type {string} * @memberof AssistantMessagePartOneOf1 */ 'callId': string; /** * * @type {ToolStatus} * @memberof AssistantMessagePartOneOf1 */ 'status': ToolStatus; /** * * @type {{ [key: string]: any | null; }} * @memberof AssistantMessagePartOneOf1 */ 'args': { [key: string]: any | null; }; /** * * @type {any} * @memberof AssistantMessagePartOneOf1 */ 'result'?: any | null; /** * * @type {string} * @memberof AssistantMessagePartOneOf1 */ 'error'?: string; /** * * @type {any} * @memberof AssistantMessagePartOneOf1 */ 'extraContent'?: any | null; } /** * @export */ export const AssistantMessagePartOneOf1TypeEnum = { Tool: 'tool' } as const; export type AssistantMessagePartOneOf1TypeEnum = typeof AssistantMessagePartOneOf1TypeEnum[keyof typeof AssistantMessagePartOneOf1TypeEnum]; /** * Check if a given object implements the AssistantMessagePartOneOf1 interface. */ export function instanceOfAssistantMessagePartOneOf1(value: object): value is AssistantMessagePartOneOf1 { if (!('type' in value) || value['type'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('callId' in value) || value['callId'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('args' in value) || value['args'] === undefined) return false; return true; } export function AssistantMessagePartOneOf1FromJSON(json: any): AssistantMessagePartOneOf1 { return AssistantMessagePartOneOf1FromJSONTyped(json, false); } export function AssistantMessagePartOneOf1FromJSONTyped(json: any, ignoreDiscriminator: boolean): AssistantMessagePartOneOf1 { if (json == null) { return json; } const result = { } as AssistantMessagePartOneOf1; if (json['type'] !== undefined) { result['type'] = json['type']; } if (json['name'] !== undefined) { result['name'] = json['name']; } if (json['callId'] !== undefined) { result['callId'] = json['callId']; } if (json['status'] !== undefined) { result['status'] = ToolStatusFromJSON(json['status']); } if (json['args'] !== undefined) { result['args'] = json['args']; } if (json['result'] !== undefined) { if (json['result'] === null) { result['result'] = null; } else { result['result'] = json['result']; } } if (json['error'] !== undefined) { result['error'] = json['error']; } if (json['extraContent'] !== undefined) { if (json['extraContent'] === null) { result['extraContent'] = null; } else { result['extraContent'] = json['extraContent']; } } return result; } export function AssistantMessagePartOneOf1ToJSON(json: any): AssistantMessagePartOneOf1 { return AssistantMessagePartOneOf1ToJSONTyped(json, false); } export function AssistantMessagePartOneOf1ToJSONTyped(value?: AssistantMessagePartOneOf1 | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'type': value['type'], 'name': value['name'], 'callId': value['callId'], 'status': ToolStatusToJSON(value['status']), 'args': value['args'], 'result': value['result'], 'error': value['error'], 'extraContent': value['extraContent'], }; }