/* 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 {
  RelayAddInput,
  RelayGetOutput,
  RelayUpdateInput,
  PageInputRelayGetPageInput,
  ResultOutputRelayGetOutput,
  ResultOutputPageOutputRelayGetPageOutput,
  ResultOutputInt64,
} from './data-contracts'
import { ContentType, HttpClient, RequestParams } from './http-client'
import { AxiosResponse } from 'axios'

export class UspRelayApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  /**
   * No description
   *
   * @tags relay
   * @name Get
   * @summary 查询
   * @request GET:/api/admin/usp-relay/get
   * @secure
   */
  get = (
    query?: {
      /** @format int64 */
      id?: number
    },
    params: RequestParams = {}
  ) =>
    this.request<ResultOutputRelayGetOutput, any>({
      path: `/api/admin/usp-relay/get`,
      method: 'GET',
      query: query,
      secure: true,
      format: 'json',
      ...params,
    })

  /**
   * No description
   *
   * @tags relay
   * @name GetPage
   * @summary 查询分页
   * @request POST:/api/admin/usp-relay/get-page
   * @secure
   */
  getPage = (data: PageInputRelayGetPageInput, params: RequestParams = {}) =>
    this.request<ResultOutputPageOutputRelayGetPageOutput, any>({
      path: `/api/admin/usp-relay/get-page`,
      method: 'POST',
      body: data,
      secure: true,
      type: ContentType.Json,
      format: 'json',
      ...params,
    })

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

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

  /**
   * No description
   *
   * @tags relay
   * @name Delete
   * @summary 彻底删除
   * @request DELETE:/api/admin/usp-relay/delete
   * @secure
   */
  delete = (
    query?: {
      /** @format int64 */
      id?: number
    },
    params: RequestParams = {}
  ) =>
    this.request<AxiosResponse, any>({
      path: `/api/admin/usp-relay/delete`,
      method: 'DELETE',
      query: query,
      secure: true,
      ...params,
    })

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