/* 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 { SelectedRepository } from './SelectedRepository'; import { SelectedRepositoryFromJSON, SelectedRepositoryFromJSONTyped, SelectedRepositoryToJSON, SelectedRepositoryToJSONTyped, } from './SelectedRepository'; import type { PageInfo } from './PageInfo'; import { PageInfoFromJSON, PageInfoFromJSONTyped, PageInfoToJSON, PageInfoToJSONTyped, } from './PageInfo'; import type { RepositoryInstallation } from './RepositoryInstallation'; import { RepositoryInstallationFromJSON, RepositoryInstallationFromJSONTyped, RepositoryInstallationToJSON, RepositoryInstallationToJSONTyped, } from './RepositoryInstallation'; /** * * @export * @interface ReposResponse */ export interface ReposResponse { /** * * @type {boolean} * @memberof ReposResponse */ ok: boolean; /** * Stable success envelope discriminator added by v1. * @type {string} * @memberof ReposResponse */ type: string; /** * * @type {Array} * @memberof ReposResponse */ installations: Array; /** * * @type {string} * @memberof ReposResponse */ environmentId: string; /** * * @type {Array} * @memberof ReposResponse */ selectedRepositories: Array; /** * * @type {PageInfo} * @memberof ReposResponse */ pageInfo?: PageInfo; } /** * Check if a given object implements the ReposResponse interface. */ export function instanceOfReposResponse(value: object): value is ReposResponse { if (!('ok' in value) || value['ok'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('installations' in value) || value['installations'] === undefined) return false; if (!('environmentId' in value) || value['environmentId'] === undefined) return false; if (!('selectedRepositories' in value) || value['selectedRepositories'] === undefined) return false; return true; } export function ReposResponseFromJSON(json: any): ReposResponse { return ReposResponseFromJSONTyped(json, false); } export function ReposResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReposResponse { if (json == null) { return json; } return { 'ok': json['ok'], 'type': json['type'], 'installations': ((json['installations'] as Array).map(RepositoryInstallationFromJSON)), 'environmentId': json['environmentId'], 'selectedRepositories': ((json['selectedRepositories'] as Array).map(SelectedRepositoryFromJSON)), 'pageInfo': json['pageInfo'] == null ? undefined : PageInfoFromJSON(json['pageInfo']), }; } export function ReposResponseToJSON(json: any): ReposResponse { return ReposResponseToJSONTyped(json, false); } export function ReposResponseToJSONTyped(value?: ReposResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'ok': value['ok'], 'type': value['type'], 'installations': ((value['installations'] as Array).map(RepositoryInstallationToJSON)), 'environmentId': value['environmentId'], 'selectedRepositories': ((value['selectedRepositories'] as Array).map(SelectedRepositoryToJSON)), 'pageInfo': PageInfoToJSON(value['pageInfo']), }; }