/* 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 CommandStatusResponse */ export interface CommandStatusResponse { /** * * @type {boolean} * @memberof CommandStatusResponse */ ok: boolean; /** * * @type {CommandStatusResponseTypeEnum} * @memberof CommandStatusResponse */ type: CommandStatusResponseTypeEnum; /** * * @type {boolean} * @memberof CommandStatusResponse */ success: boolean; /** * * @type {number} * @memberof CommandStatusResponse */ processId: number; /** * * @type {number} * @memberof CommandStatusResponse */ pid?: number; /** * lost: the Boat agent restarted and forgot the process; running/exitCode are then a best-effort probe and the logs come from the on-disk files. * @type {CommandStatusResponseStatusEnum} * @memberof CommandStatusResponse */ status: CommandStatusResponseStatusEnum; /** * Whether the process is still tracked by the Boat agent. * @type {boolean} * @memberof CommandStatusResponse */ known?: boolean; /** * * @type {boolean} * @memberof CommandStatusResponse */ running: boolean; /** * * @type {number} * @memberof CommandStatusResponse */ exitCode: number | null; /** * * @type {string} * @memberof CommandStatusResponse */ signal?: string | null; /** * * @type {string} * @memberof CommandStatusResponse */ command?: string | null; /** * * @type {string} * @memberof CommandStatusResponse */ cwd?: string | null; /** * * @type {Date} * @memberof CommandStatusResponse */ startedAt?: Date | null; /** * * @type {Date} * @memberof CommandStatusResponse */ finishedAt?: Date | null; /** * Tail of the stdout log file. * @type {string} * @memberof CommandStatusResponse */ stdout: string; /** * Tail of the stderr log file. * @type {string} * @memberof CommandStatusResponse */ stderr: string; /** * * @type {boolean} * @memberof CommandStatusResponse */ stdoutTruncated?: boolean; /** * * @type {boolean} * @memberof CommandStatusResponse */ stderrTruncated?: boolean; /** * * @type {string} * @memberof CommandStatusResponse */ logPath?: string; /** * * @type {string} * @memberof CommandStatusResponse */ errLogPath?: string; } /** * @export */ export const CommandStatusResponseTypeEnum = { CommandStatus: 'command.status' } as const; export type CommandStatusResponseTypeEnum = typeof CommandStatusResponseTypeEnum[keyof typeof CommandStatusResponseTypeEnum]; /** * @export */ export const CommandStatusResponseStatusEnum = { Running: 'running', Exited: 'exited', Lost: 'lost' } as const; export type CommandStatusResponseStatusEnum = typeof CommandStatusResponseStatusEnum[keyof typeof CommandStatusResponseStatusEnum]; /** * Check if a given object implements the CommandStatusResponse interface. */ export function instanceOfCommandStatusResponse(value: object): value is CommandStatusResponse { 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 (!('status' in value) || value['status'] === undefined) return false; if (!('running' in value) || value['running'] === undefined) return false; if (!('exitCode' in value) || value['exitCode'] === undefined) return false; if (!('stdout' in value) || value['stdout'] === undefined) return false; if (!('stderr' in value) || value['stderr'] === undefined) return false; return true; } export function CommandStatusResponseFromJSON(json: any): CommandStatusResponse { return CommandStatusResponseFromJSONTyped(json, false); } export function CommandStatusResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommandStatusResponse { if (json == null) { return json; } return { 'ok': json['ok'], 'type': json['type'], 'success': json['success'], 'processId': json['processId'], 'pid': json['pid'] == null ? undefined : json['pid'], 'status': json['status'], 'known': json['known'] == null ? undefined : json['known'], 'running': json['running'], 'exitCode': json['exitCode'], 'signal': json['signal'] == null ? undefined : json['signal'], 'command': json['command'] == null ? undefined : json['command'], 'cwd': json['cwd'] == null ? undefined : json['cwd'], 'startedAt': json['startedAt'] == null ? undefined : (new Date(json['startedAt'])), 'finishedAt': json['finishedAt'] == null ? undefined : (new Date(json['finishedAt'])), 'stdout': json['stdout'], 'stderr': json['stderr'], 'stdoutTruncated': json['stdoutTruncated'] == null ? undefined : json['stdoutTruncated'], 'stderrTruncated': json['stderrTruncated'] == null ? undefined : json['stderrTruncated'], 'logPath': json['logPath'] == null ? undefined : json['logPath'], 'errLogPath': json['errLogPath'] == null ? undefined : json['errLogPath'], }; } export function CommandStatusResponseToJSON(json: any): CommandStatusResponse { return CommandStatusResponseToJSONTyped(json, false); } export function CommandStatusResponseToJSONTyped(value?: CommandStatusResponse | 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'], 'status': value['status'], 'known': value['known'], 'running': value['running'], 'exitCode': value['exitCode'], 'signal': value['signal'], 'command': value['command'], 'cwd': value['cwd'], 'startedAt': value['startedAt'] == null ? value['startedAt'] : value['startedAt'].toISOString(), 'finishedAt': value['finishedAt'] == null ? value['finishedAt'] : value['finishedAt'].toISOString(), 'stdout': value['stdout'], 'stderr': value['stderr'], 'stdoutTruncated': value['stdoutTruncated'], 'stderrTruncated': value['stderrTruncated'], 'logPath': value['logPath'], 'errLogPath': value['errLogPath'], }; }