/* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CreateRunner } from '../models/CreateRunner'; import type { ResponseEmpty } from '../models/ResponseEmpty'; import type { ResponseRunner } from '../models/ResponseRunner'; import type { RunnerGroupNeededError } from '../models/RunnerGroupNeededError'; import type { RunnerGroupNotFoundError } from '../models/RunnerGroupNotFoundError'; import type { UpdateRunner } from '../models/UpdateRunner'; import { request as __request } from '../core/request'; export class RunnerService { /** * Get all * Lists all runners. * @result ResponseRunner * @throws ApiError */ public static async runnerControllerGetAll(): Promise> { const result = await __request({ method: 'GET', path: `/api/runners`, }); return result.body; } /** * Post * Create a new runner object (id will be generated automagicly). * @param requestBody CreateRunner * @result any * @throws ApiError */ public static async runnerControllerPost( requestBody?: CreateRunner, ): Promise<(ResponseRunner | RunnerGroupNeededError | RunnerGroupNotFoundError)> { const result = await __request({ method: 'POST', path: `/api/runners`, body: requestBody, }); return result.body; } /** * Get one * Returns a runner of a specified id (if it exists) * @param id * @result ResponseRunner * @throws ApiError */ public static async runnerControllerGetOne( id: number, ): Promise { const result = await __request({ method: 'GET', path: `/api/runners/${id}`, }); return result.body; } /** * Put * Update a runner object (id can't be changed). * @param id * @param requestBody UpdateRunner * @result ResponseRunner * @throws ApiError */ public static async runnerControllerPut( id: number, requestBody?: UpdateRunner, ): Promise { const result = await __request({ method: 'PUT', path: `/api/runners/${id}`, body: requestBody, }); return result.body; } /** * Remove * Delete a specified runner (if it exists). * @param id * @param force * @result ResponseRunner * @result ResponseEmpty * @throws ApiError */ public static async runnerControllerRemove( id: number, force?: boolean, ): Promise { const result = await __request({ method: 'DELETE', path: `/api/runners/${id}`, query: { 'force': force, }, }); return result.body; } }