/* 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'; import type { UpdateBoxEnvironmentRequestRepositoriesInner } from './UpdateBoxEnvironmentRequestRepositoriesInner'; import { UpdateBoxEnvironmentRequestRepositoriesInnerFromJSON, UpdateBoxEnvironmentRequestRepositoriesInnerFromJSONTyped, UpdateBoxEnvironmentRequestRepositoriesInnerToJSON, UpdateBoxEnvironmentRequestRepositoriesInnerToJSONTyped, } from './UpdateBoxEnvironmentRequestRepositoriesInner'; import type { SecretFile } from './SecretFile'; import { SecretFileFromJSON, SecretFileFromJSONTyped, SecretFileToJSON, SecretFileToJSONTyped, } from './SecretFile'; /** * Rename, set-default, and/or edit flags and contents. Any flag or content change mints a new immutable version; existing boxes are not touched until you call upgrade. * @export * @interface UpdateBoxEnvironmentRequest */ export interface UpdateBoxEnvironmentRequest { /** * New environment name. * @type {string} * @memberof UpdateBoxEnvironmentRequest */ name?: string; /** * Set to true to make this the default environment (clears the flag on the previous default). * @type {boolean} * @memberof UpdateBoxEnvironmentRequest */ isDefault?: boolean; /** * * @type {boolean} * @memberof UpdateBoxEnvironmentRequest */ safeForThirdParties?: boolean; /** * * @type {boolean} * @memberof UpdateBoxEnvironmentRequest */ passGithub?: boolean; /** * * @type {boolean} * @memberof UpdateBoxEnvironmentRequest */ passSecrets?: boolean; /** * * @type {boolean} * @memberof UpdateBoxEnvironmentRequest */ passBoxCredentials?: boolean; /** * * @type {boolean} * @memberof UpdateBoxEnvironmentRequest */ passAgentsCredentials?: boolean; /** * Full .env-style content for the new version. * @type {string} * @memberof UpdateBoxEnvironmentRequest */ envContents?: string; /** * * @type {Array} * @memberof UpdateBoxEnvironmentRequest */ secretFiles?: Array; /** * Full replacement of the version's repository selection. Each item selects one repository by its internal `databaseId` (from `GET /repos`). * @type {Array} * @memberof UpdateBoxEnvironmentRequest */ repositories?: Array; } /** * Check if a given object implements the UpdateBoxEnvironmentRequest interface. */ export function instanceOfUpdateBoxEnvironmentRequest(value: object): value is UpdateBoxEnvironmentRequest { return true; } export function UpdateBoxEnvironmentRequestFromJSON(json: any): UpdateBoxEnvironmentRequest { return UpdateBoxEnvironmentRequestFromJSONTyped(json, false); } export function UpdateBoxEnvironmentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateBoxEnvironmentRequest { if (json == null) { return json; } return { 'name': json['name'] == null ? undefined : json['name'], 'isDefault': json['isDefault'] == null ? undefined : json['isDefault'], 'safeForThirdParties': json['safeForThirdParties'] == null ? undefined : json['safeForThirdParties'], 'passGithub': json['passGithub'] == null ? undefined : json['passGithub'], 'passSecrets': json['passSecrets'] == null ? undefined : json['passSecrets'], 'passBoxCredentials': json['passBoxCredentials'] == null ? undefined : json['passBoxCredentials'], 'passAgentsCredentials': json['passAgentsCredentials'] == null ? undefined : json['passAgentsCredentials'], 'envContents': json['envContents'] == null ? undefined : json['envContents'], 'secretFiles': json['secretFiles'] == null ? undefined : ((json['secretFiles'] as Array).map(SecretFileFromJSON)), 'repositories': json['repositories'] == null ? undefined : ((json['repositories'] as Array).map(UpdateBoxEnvironmentRequestRepositoriesInnerFromJSON)), }; } export function UpdateBoxEnvironmentRequestToJSON(json: any): UpdateBoxEnvironmentRequest { return UpdateBoxEnvironmentRequestToJSONTyped(json, false); } export function UpdateBoxEnvironmentRequestToJSONTyped(value?: UpdateBoxEnvironmentRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'isDefault': value['isDefault'], 'safeForThirdParties': value['safeForThirdParties'], 'passGithub': value['passGithub'], 'passSecrets': value['passSecrets'], 'passBoxCredentials': value['passBoxCredentials'], 'passAgentsCredentials': value['passAgentsCredentials'], 'envContents': value['envContents'], 'secretFiles': value['secretFiles'] == null ? undefined : ((value['secretFiles'] as Array).map(SecretFileToJSON)), 'repositories': value['repositories'] == null ? undefined : ((value['repositories'] as Array).map(UpdateBoxEnvironmentRequestRepositoriesInnerToJSON)), }; }