/* 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 CommandRequest */ export interface CommandRequest { /** * * @type {string} * @memberof CommandRequest */ command: string; /** * Relative working directory inside the Boat work directory. * @type {string} * @memberof CommandRequest */ cwd?: string; /** * Command timeout in seconds. Values outside 1-600 are rejected with a 400 invalid_timeout error. * @type {number} * @memberof CommandRequest */ timeoutSeconds?: number; /** * Start the command in the background and return a process id immediately instead of waiting for it to finish. Output goes to a log file on the Boat; poll the status endpoint for it. * @type {boolean} * @memberof CommandRequest */ detached?: boolean; } /** * Check if a given object implements the CommandRequest interface. */ export function instanceOfCommandRequest(value: object): value is CommandRequest { if (!('command' in value) || value['command'] === undefined) return false; return true; } export function CommandRequestFromJSON(json: any): CommandRequest { return CommandRequestFromJSONTyped(json, false); } export function CommandRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommandRequest { if (json == null) { return json; } return { 'command': json['command'], 'cwd': json['cwd'] == null ? undefined : json['cwd'], 'timeoutSeconds': json['timeoutSeconds'] == null ? undefined : json['timeoutSeconds'], 'detached': json['detached'] == null ? undefined : json['detached'], }; } export function CommandRequestToJSON(json: any): CommandRequest { return CommandRequestToJSONTyped(json, false); } export function CommandRequestToJSONTyped(value?: CommandRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'command': value['command'], 'cwd': value['cwd'], 'timeoutSeconds': value['timeoutSeconds'], 'detached': value['detached'], }; }