/* 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 { SecretFile } from './SecretFile'; import { SecretFileFromJSON, SecretFileFromJSONTyped, SecretFileToJSON, SecretFileToJSONTyped, } from './SecretFile'; /** * * @export * @interface SecretsResponse */ export interface SecretsResponse { /** * * @type {boolean} * @memberof SecretsResponse */ ok: boolean; /** * Stable success envelope discriminator added by v1. * @type {string} * @memberof SecretsResponse */ type: string; /** * * @type {boolean} * @memberof SecretsResponse */ success?: boolean; /** * * @type {string} * @memberof SecretsResponse */ environmentId: string; /** * * @type {string} * @memberof SecretsResponse */ envContents: string; /** * * @type {Array} * @memberof SecretsResponse */ secretFiles: Array; /** * Present on update; counts how many active Boxes received the new environment. * @type {{ [key: string]: any; }} * @memberof SecretsResponse */ pushed?: { [key: string]: any; }; } /** * Check if a given object implements the SecretsResponse interface. */ export function instanceOfSecretsResponse(value: object): value is SecretsResponse { if (!('ok' in value) || value['ok'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('environmentId' in value) || value['environmentId'] === undefined) return false; if (!('envContents' in value) || value['envContents'] === undefined) return false; if (!('secretFiles' in value) || value['secretFiles'] === undefined) return false; return true; } export function SecretsResponseFromJSON(json: any): SecretsResponse { return SecretsResponseFromJSONTyped(json, false); } export function SecretsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecretsResponse { if (json == null) { return json; } return { 'ok': json['ok'], 'type': json['type'], 'success': json['success'] == null ? undefined : json['success'], 'environmentId': json['environmentId'], 'envContents': json['envContents'], 'secretFiles': ((json['secretFiles'] as Array).map(SecretFileFromJSON)), 'pushed': json['pushed'] == null ? undefined : json['pushed'], }; } export function SecretsResponseToJSON(json: any): SecretsResponse { return SecretsResponseToJSONTyped(json, false); } export function SecretsResponseToJSONTyped(value?: SecretsResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'ok': value['ok'], 'type': value['type'], 'success': value['success'], 'environmentId': value['environmentId'], 'envContents': value['envContents'], 'secretFiles': ((value['secretFiles'] as Array).map(SecretFileToJSON)), 'pushed': value['pushed'], }; }