/* 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'; /** * Options for resuming a stopped Boat. * @export * @interface ResumeRequest */ export interface ResumeRequest { /** * Resume onto a different machine size. Omit to keep the box's current type. A resume already restores onto a fresh machine, so changing size costs nothing extra. Shrinking is rejected with `type_too_small` when the box's data would not fit the smaller disk. `xlarge` requires the effective $100 plan or higher and an explicit bare-metal operator allocation. * @type {ResumeRequestTypeEnum} * @memberof ResumeRequest */ type?: ResumeRequestTypeEnum; /** * Replaces the box's per-box environment variables. Omit to keep the box's current env. Same validation rules as `CreateBoxRequest.env`. * @type {{ [key: string]: string; }} * @memberof ResumeRequest */ env?: { [key: string]: string; }; /** * Optionally re-pin the box to a different named Boat environment on resume. Omit to keep the box's current environment. Unknown names are rejected with `unknown_environment`. * @type {string} * @memberof ResumeRequest */ environment?: string; /** * Resume into a no-env box: withhold account secrets and scrub inherited owner secrets from the restored snapshot before the box is exposed. One-way; once a box is resumed as no-env it stays no-env on later resumes. * @type {boolean} * @memberof ResumeRequest */ noEnv?: boolean; /** * Auto-stop for the resumed Boat, in seconds, stored on the Boat. Omit to keep the TTL the Boat already had. `null` disables auto-stop, which means nothing will ever stop this Boat for you. * @type {number} * @memberof ResumeRequest */ ttlSeconds?: number | null; } /** * @export */ export const ResumeRequestTypeEnum = { Small: 'small', Default: 'default', Large: 'large', Xlarge: 'xlarge' } as const; export type ResumeRequestTypeEnum = typeof ResumeRequestTypeEnum[keyof typeof ResumeRequestTypeEnum]; /** * Check if a given object implements the ResumeRequest interface. */ export function instanceOfResumeRequest(value: object): value is ResumeRequest { return true; } export function ResumeRequestFromJSON(json: any): ResumeRequest { return ResumeRequestFromJSONTyped(json, false); } export function ResumeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResumeRequest { if (json == null) { return json; } return { 'type': json['type'] == null ? undefined : json['type'], 'env': json['env'] == null ? undefined : json['env'], 'environment': json['environment'] == null ? undefined : json['environment'], 'noEnv': json['noEnv'] == null ? undefined : json['noEnv'], 'ttlSeconds': json['ttlSeconds'] == null ? undefined : json['ttlSeconds'], }; } export function ResumeRequestToJSON(json: any): ResumeRequest { return ResumeRequestToJSONTyped(json, false); } export function ResumeRequestToJSONTyped(value?: ResumeRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'type': value['type'], 'env': value['env'], 'environment': value['environment'], 'noEnv': value['noEnv'], 'ttlSeconds': value['ttlSeconds'], }; }