/* 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 CommandStartedResponse */ export interface CommandStartedResponse { /** * * @type {boolean} * @memberof CommandStartedResponse */ ok: boolean; /** * * @type {CommandStartedResponseTypeEnum} * @memberof CommandStartedResponse */ type: CommandStartedResponseTypeEnum; /** * * @type {boolean} * @memberof CommandStartedResponse */ success: boolean; /** * Process id to poll with the command status endpoint. * @type {number} * @memberof CommandStartedResponse */ processId: number; /** * * @type {number} * @memberof CommandStartedResponse */ pid: number; /** * * @type {string} * @memberof CommandStartedResponse */ command: string; /** * * @type {string} * @memberof CommandStartedResponse */ cwd?: string; /** * * @type {Date} * @memberof CommandStartedResponse */ startedAt: Date; /** * Stdout log file on the Boat (~/.ascii/processes/.log). * @type {string} * @memberof CommandStartedResponse */ logPath?: string; /** * Stderr log file on the Boat. * @type {string} * @memberof CommandStartedResponse */ errLogPath?: string; } /** * @export */ export const CommandStartedResponseTypeEnum = { CommandStarted: 'command.started' } as const; export type CommandStartedResponseTypeEnum = typeof CommandStartedResponseTypeEnum[keyof typeof CommandStartedResponseTypeEnum]; /** * Check if a given object implements the CommandStartedResponse interface. */ export function instanceOfCommandStartedResponse(value: object): value is CommandStartedResponse { if (!('ok' in value) || value['ok'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('success' in value) || value['success'] === undefined) return false; if (!('processId' in value) || value['processId'] === undefined) return false; if (!('pid' in value) || value['pid'] === undefined) return false; if (!('command' in value) || value['command'] === undefined) return false; if (!('startedAt' in value) || value['startedAt'] === undefined) return false; return true; } export function CommandStartedResponseFromJSON(json: any): CommandStartedResponse { return CommandStartedResponseFromJSONTyped(json, false); } export function CommandStartedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommandStartedResponse { if (json == null) { return json; } return { 'ok': json['ok'], 'type': json['type'], 'success': json['success'], 'processId': json['processId'], 'pid': json['pid'], 'command': json['command'], 'cwd': json['cwd'] == null ? undefined : json['cwd'], 'startedAt': (new Date(json['startedAt'])), 'logPath': json['logPath'] == null ? undefined : json['logPath'], 'errLogPath': json['errLogPath'] == null ? undefined : json['errLogPath'], }; } export function CommandStartedResponseToJSON(json: any): CommandStartedResponse { return CommandStartedResponseToJSONTyped(json, false); } export function CommandStartedResponseToJSONTyped(value?: CommandStartedResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'ok': value['ok'], 'type': value['type'], 'success': value['success'], 'processId': value['processId'], 'pid': value['pid'], 'command': value['command'], 'cwd': value['cwd'], 'startedAt': value['startedAt'].toISOString(), 'logPath': value['logPath'], 'errLogPath': value['errLogPath'], }; }