/* 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 ForkRequest */ export interface ForkRequest { /** * Replaces the env the fork would otherwise inherit from the source box. Same validation rules as `CreateBoxRequest.env`. * @type {{ [key: string]: string; }} * @memberof ForkRequest */ env?: { [key: string]: string; }; /** * Optionally pin the fork to a different named Boat environment. Omit to inherit the source box's environment. Unknown names are rejected with `unknown_environment`. * @type {string} * @memberof ForkRequest */ environment?: string; /** * Make the fork no-env (see `CreateBoxRequest.noEnv`). A fork of a no-env box is always no-env regardless of this field. * @type {boolean} * @memberof ForkRequest */ noEnv?: boolean; /** * Machine size for the fork. Omit to inherit the source box's type. The source box is never modified. Shrinking is rejected with `type_too_small` when the source's data would not fit the smaller disk. `xlarge` requires the effective $100 plan or higher and an explicit bare-metal operator allocation. * @type {ForkRequestTypeEnum} * @memberof ForkRequest */ type?: ForkRequestTypeEnum; /** * Auto-stop for the fork, in seconds. Omit for the 1 hour default; the fork does NOT inherit the source box's TTL, so forking a Boat that has auto-stop disabled still gives you a fork that stops itself. `null` disables auto-stop, which means nothing will ever stop this Boat for you. * @type {number} * @memberof ForkRequest */ ttlSeconds?: number | null; } /** * @export */ export const ForkRequestTypeEnum = { Small: 'small', Default: 'default', Large: 'large', Xlarge: 'xlarge' } as const; export type ForkRequestTypeEnum = typeof ForkRequestTypeEnum[keyof typeof ForkRequestTypeEnum]; /** * Check if a given object implements the ForkRequest interface. */ export function instanceOfForkRequest(value: object): value is ForkRequest { return true; } export function ForkRequestFromJSON(json: any): ForkRequest { return ForkRequestFromJSONTyped(json, false); } export function ForkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ForkRequest { if (json == null) { return json; } return { 'env': json['env'] == null ? undefined : json['env'], 'environment': json['environment'] == null ? undefined : json['environment'], 'noEnv': json['noEnv'] == null ? undefined : json['noEnv'], 'type': json['type'] == null ? undefined : json['type'], 'ttlSeconds': json['ttlSeconds'] == null ? undefined : json['ttlSeconds'], }; } export function ForkRequestToJSON(json: any): ForkRequest { return ForkRequestToJSONTyped(json, false); } export function ForkRequestToJSONTyped(value?: ForkRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'env': value['env'], 'environment': value['environment'], 'noEnv': value['noEnv'], 'type': value['type'], 'ttlSeconds': value['ttlSeconds'], }; }