/* eslint-disable */
/* tslint:disable */
/*
 * ---------------------------------------------------------------
 * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API        ##
 * ##                                                           ##
 * ## AUTHOR: acacode                                           ##
 * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
 * ---------------------------------------------------------------
 */

import { ContentType, HttpClient, RequestParams } from './http-client'
import {
  TestequGetPageOutput,
  PageInputTestequGetPageInput,
  ResultOutputPageOutputTestequGetPageOutput,
  TestequGetOutput,
  ResultOutputTestequGetOutput,
  TestequAddInput,
  TestequUpdateInput,
  ResultOutputString,
  ResultOutputInt64
} from './data-contracts'

export class TestequApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  /**
   * @description 获取检测设备分页列表
   *
   * @tags 检测设备管理
   * @name GetPage
   * @summary 获取分页
   * @request POST:/api/admin/testing-equipment/get-page
   * @secure
   */
  getPage = (data: PageInputTestequGetPageInput, params: RequestParams = {}) =>
    this.request<ResultOutputPageOutputTestequGetPageOutput>({
      path: `/api/admin/testing-equipment/get-page`,
      method: 'POST',
      body: data,
      secure: true,
      type: ContentType.Json,
      format: 'json',
      ...params,
    })

  /**
   * @description 获取检测设备详情
   *
   * @tags 检测设备管理
   * @name Get
   * @summary 查询单条
   * @request GET:/api/admin/testing-equipment/get
   * @secure
   */
  get = (
    query: {
      /** 检测设备ID */
      id: number
    },
    params: RequestParams = {}
  ) =>
    this.request<ResultOutputTestequGetOutput>({
      path: `/api/admin/testing-equipment/get`,
      method: 'GET',
      query: query,
      secure: true,
      format: 'json',
      ...params,
    })

  /**
   * @description 新增检测设备
   *
   * @tags 检测设备管理
   * @name Add
   * @summary 新增
   * @request POST:/api/admin/testing-equipment/add
   * @secure
   */
  add = (data: TestequAddInput, params: RequestParams = {}) =>
    this.request<ResultOutputInt64>({
      path: `/api/admin/testing-equipment/add`,
      method: 'POST',
      body: data,
      secure: true,
      type: ContentType.Json,
      format: 'json',
      ...params,
    })

  /**
   * @description 更新检测设备
   *
   * @tags 检测设备管理
   * @name Update
   * @summary 更新
   * @request PUT:/api/admin/testing-equipment/update
   * @secure
   */
  update = (data: TestequUpdateInput, params: RequestParams = {}) =>
    this.request<ResultOutputString>({
      path: `/api/admin/testing-equipment/update`,
      method: 'PUT',
      body: data,
      secure: true,
      type: ContentType.Json,
      format: 'json',
      ...params,
    })

  /**
   * @description 删除检测设备
   *
   * @tags 检测设备管理
   * @name SoftDelete
   * @summary 彻底删除
   * @request DELETE:/api/admin/testing-equipment/soft-delete
   * @secure
   */
  softDelete = (
    query: {
      /** 检测设备ID */
      id: number
    },
    params: RequestParams = {}
  ) =>
    this.request<ResultOutputString>({
      path: `/api/admin/testing-equipment/soft-delete`,
      method: 'DELETE',
      query: query,
      secure: true,
      format: 'json',
      ...params,
    })
}
