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

import {
  CellDto,
  CellDtoListServiceResponse,
  CellDtoServiceResponse,
  PageInputCellDtoGetPageInput,
  ResultOutputCellDtoGetOutput,
  ResultOutputPageOutputCellDtoGetPageOutput,
  ResultOutputInt64,
} from './data-contracts'
import { ContentType, HttpClient, RequestParams } from './http-client'
import { AxiosResponse } from 'axios'

/**
 * 细胞类型
 */
export class ItemDefCellApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  /**
   * No description
   *
   * @tags cell
   * @name Get
   * @summary 获取细胞类型详情
   * @request GET:/api/admin/item-def-cell/get
   * @secure
   */
  get = (
    query?: {
      /** @format int64 */
      id?: number
    },
    params: RequestParams = {}
  ) =>
    this.request<CellDtoServiceResponse, any>({
      path: `/api/admin/item-def-cell/get`,
      method: 'GET',
      query: query,
      secure: true,
      format: 'json',
      ...params,
    })

  /**
   * No description
   *
   * @tags cell
   * @name GetPage
   * @summary 获取细胞类型分页列表
   * @request POST:/api/admin/item-def-cell/get-page
   * @secure
   */
  getPage = (data: PageInputCellDtoGetPageInput, params: RequestParams = {}) =>
    this.request<ResultOutputPageOutputCellDtoGetPageOutput, any>({
      path: `/api/admin/item-def-cell/get-page`,
      method: 'POST',
      body: data,
      secure: true,
      type: ContentType.Json,
      format: 'json',
      ...params,
    })

  /**
   * No description
   *
   * @tags cell
   * @name Add
   * @summary 新增细胞类型
   * @request POST:/api/admin/item-def-cell/add
   * @secure
   */
  add = (data: CellDto, params: RequestParams = {}) =>
    this.request<CellDtoServiceResponse, any>({
      path: `/api/admin/item-def-cell/add`,
      method: 'POST',
      body: data,
      secure: true,
      type: ContentType.Json,
      format: 'json',
      ...params,
    })

  /**
   * No description
   *
   * @tags cell
   * @name Update
   * @summary 修改细胞类型
   * @request PUT:/api/admin/item-def-cell/update
   * @secure
   */
  update = (data: CellDto, params: RequestParams = {}) =>
    this.request<CellDtoServiceResponse, any>({
      path: `/api/admin/item-def-cell/update`,
      method: 'PUT',
      body: data,
      secure: true,
      type: ContentType.Json,
      format: 'json',
      ...params,
    })

  /**
   * No description
   *
   * @tags cell
   * @name Delete
   * @summary 彻底删除细胞类型
   * @request DELETE:/api/admin/item-def-cell/delete
   * @secure
   */
  delete = (
    query?: {
      /** @format int64 */
      id?: number
    },
    params: RequestParams = {}
  ) =>
    this.request<CellDtoServiceResponse, any>({
      path: `/api/admin/item-def-cell/delete`,
      method: 'DELETE',
      query: query,
      secure: true,
      format: 'json',
      ...params,
    })

  /**
   * No description
   *
   * @tags cell
   * @name SoftDelete
   * @summary 删除细胞类型
   * @request DELETE:/api/admin/item-def-cell/soft-delete
   * @secure
   */
  softDelete = (
    query?: {
      /** @format int64 */
      id?: number
    },
    params: RequestParams = {}
  ) =>
    this.request<CellDtoServiceResponse, any>({
      path: `/api/admin/item-def-cell/soft-delete`,
      method: 'DELETE',
      query: query,
      secure: true,
      format: 'json',
      ...params,
    })
}
