/* tslint:disable */ /* eslint-disable */ /** * Boat Public API v1 * Public JSON API for creating, operating, prompting, observing, and exposing Boat sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1. * * 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'; /** * * @export * @interface ErrorEvent */ export interface ErrorEvent { /** * * @type {string} * @memberof ErrorEvent */ id: string; /** * * @type {ErrorEventTypeEnum} * @memberof ErrorEvent */ type: ErrorEventTypeEnum; /** * * @type {number} * @memberof ErrorEvent */ timestamp: number; /** * * @type {string} * @memberof ErrorEvent */ taskId?: string | null; /** * * @type {{ [key: string]: any; }} * @memberof ErrorEvent */ data: { [key: string]: any; }; } /** * @export */ export const ErrorEventTypeEnum = { UsageLimit: 'usage_limit' } as const; export type ErrorEventTypeEnum = typeof ErrorEventTypeEnum[keyof typeof ErrorEventTypeEnum]; /** * Check if a given object implements the ErrorEvent interface. */ export function instanceOfErrorEvent(value: object): value is ErrorEvent { if (!('id' in value) || value['id'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('timestamp' in value) || value['timestamp'] === undefined) return false; if (!('data' in value) || value['data'] === undefined) return false; return true; } export function ErrorEventFromJSON(json: any): ErrorEvent { return ErrorEventFromJSONTyped(json, false); } export function ErrorEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorEvent { if (json == null) { return json; } return { 'id': json['id'], 'type': json['type'], 'timestamp': json['timestamp'], 'taskId': json['taskId'] == null ? undefined : json['taskId'], 'data': json['data'], }; } export function ErrorEventToJSON(json: any): ErrorEvent { return ErrorEventToJSONTyped(json, false); } export function ErrorEventToJSONTyped(value?: ErrorEvent | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'type': value['type'], 'timestamp': value['timestamp'], 'taskId': value['taskId'], 'data': value['data'], }; }