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

import { AxiosResponse } from 'axios'
import {
  RoomAddInput,
  RoomUpdateInput,
  ResultOutputInt64,
  ResultOutputListRoomGetListOutput,
  ResultOutputRoomGetOutput,
  PageInputRoomGetPageInput,
  ResultOutputPageOutputRoomGetPageOutput
} from './data-contracts'
import { ContentType, HttpClient, RequestParams } from './http-client'

export class RoomApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  /**
   * No description
   *
   * @tags room
   * @name Get
   * @summary 查询
   * @request GET:/api/admin/room/get
   * @secure
   */
  get = (
    query?: {
      /** @format int64 */
      id?: number
    },
    params: RequestParams = {}
  ) =>
    this.request<ResultOutputRoomGetOutput, any>({
      path: `/api/admin/room/get`,
      method: 'GET',
      query: query,
      secure: true,
      format: 'json',
      ...params,
    })
  /**
   * No description
   *
   * @tags room
   * @name GetList
   * @summary 查询分页
   * @request GET:/api/admin/room/get-page
   * @secure
   */
  getPage = (data: PageInputRoomGetPageInput, params: RequestParams = {}) =>
    this.request<ResultOutputPageOutputRoomGetPageOutput, any>({
      path: `/api/admin/room/get-page`,
      method: 'POST',
      body: data,
      secure: true,
      type: ContentType.Json,
      format: 'json',
      ...params,
    })

  /**
   * No description
   *
   * @tags room
   * @name Add
   * @summary 新增
   * @request POST:/api/admin/room/add
   * @secure
   */
  add = (data: RoomAddInput, params: RequestParams = {}) =>
    this.request<ResultOutputInt64, any>({
      path: `/api/admin/room/add`,
      method: 'POST',
      body: data,
      secure: true,
      type: ContentType.Json,
      format: 'json',
      ...params,
    })
  /**
   * No description
   *
   * @tags room
   * @name Update
   * @summary 修改
   * @request PUT:/api/admin/room/update
   * @secure
   */
  update = (data: RoomUpdateInput, params: RequestParams = {}) =>
    this.request<AxiosResponse, any>({
      path: `/api/admin/room/update`,
      method: 'PUT',
      body: data,
      secure: true,
      type: ContentType.Json,
      ...params,
    })
  /**
   * No description
   *
   * @tags room
   * @name Delete
   * @summary 彻底删除
   * @request DELETE:/api/admin/room/delete
   * @secure
   */
  delete = (
    query?: {
      /** @format int64 */
      id?: number
    },
    params: RequestParams = {}
  ) =>
    this.request<AxiosResponse, any>({
      path: `/api/admin/room/delete`,
      method: 'DELETE',
      query: query,
      secure: true,
      ...params,
    })
  /**
   * No description
   *
   * @tags room
   * @name SoftDelete
   * @summary 删除
   * @request DELETE:/api/admin/room/soft-delete
   * @secure
   */
  softDelete = (
    query?: {
      /** @format int64 */
      id?: number
    },
    params: RequestParams = {}
  ) =>
    this.request<AxiosResponse, any>({
      path: `/api/admin/room/soft-delete`,
      method: 'DELETE',
      query: query,
      secure: true,
      ...params,
    })
}
