/* 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 {
  AlarmAddInput,
  AlarmUpdateInput,
  PageInputAlarmGetPageInput,
  ResultOutputAlarmGetOutput,
  ResultOutputPageOutputAlarmGetPageOutput,
  ResultOutputInt64,
} from './data-contracts';
import { ContentType, HttpClient, RequestParams } from './http-client';
import { AxiosResponse } from 'axios';

export class AlarmApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  /**
   * @description No description
   * @tags Alarm - 报警器管理
   * @name Get
   * @summary 查询报警器
   * @request GET:/api/admin/usp-alarm/get
   * @secure
   */
  get = (
    query?: {
      /** @format int64 */
      id?: number;
    },
    params: RequestParams = {}
  ) =>
    this.request<ResultOutputAlarmGetOutput, any>({
      path: `/api/admin/usp-alarm/get`,
      method: 'GET',
      query: query,
      secure: true,
      format: 'json',
      ...params,
    });

  /**
   * @description No description
   * @tags Alarm - 报警器管理
   * @name GetPage
   * @summary 查询报警器分页
   * @request POST:/api/admin/usp-alarm/get-page
   * @secure
   */
  getPage = (data: PageInputAlarmGetPageInput, params: RequestParams = {}) =>
    this.request<ResultOutputPageOutputAlarmGetPageOutput, any>({
      path: `/api/admin/usp-alarm/get-page`,
      method: 'POST',
      body: data,
      secure: true,
      type: ContentType.Json,
      format: 'json',
      ...params,
    });

  /**
   * @description No description
   * @tags Alarm - 报警器管理
   * @name Add
   * @summary 新增报警器
   * @request POST:/api/admin/usp-alarm/add
   * @secure
   */
  add = (data: AlarmAddInput, params: RequestParams = {}) =>
    this.request<ResultOutputInt64, any>({
      path: `/api/admin/usp-alarm/add`,
      method: 'POST',
      body: data,
      secure: true,
      type: ContentType.Json,
      format: 'json',
      ...params,
    });

  /**
   * @description No description
   * @tags Alarm - 报警器管理
   * @name Update
   * @summary 修改报警器
   * @request PUT:/api/admin/usp-alarm/update
   * @secure
   */
  update = (data: AlarmUpdateInput, params: RequestParams = {}) =>
    this.request<AxiosResponse, any>({
      path: `/api/admin/usp-alarm/update`,
      method: 'PUT',
      body: data,
      secure: true,
      type: ContentType.Json,
      ...params,
    });

  /**
   * @description No description
   * @tags Alarm - 报警器管理
   * @name SoftDelete
   * @summary 删除报警器
   * @request DELETE:/api/admin/usp-alarm/soft-delete
   * @secure
   */
  softDelete = (
    query?: {
      /** @format int64 */
      id?: number;
    },
    params: RequestParams = {}
  ) =>
    this.request<AxiosResponse, any>({
      path: `/api/admin/usp-alarm/soft-delete`,
      method: 'DELETE',
      query: query,
      secure: true,
      ...params,
    });
}
