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

import { HttpClient, RequestParams } from "./http-client";

export class Core<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  /**
   * @description Add a single key to the currently active key list. As if the key were held down.
   *
   * @tags Core
   * @name AddkeyCreate
   * @summary Add a single key.
   * @request POST:/core/addkey
   */
  addkeyCreate = (
    query: {
      /** Key value of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. */
      key: string;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/addkey`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Add a bitmask of keys to the currently active key list. As if the keys were held down.
   *
   * @tags Core
   * @name AddkeysCreate
   * @summary Add a bitmask of keys.
   * @request POST:/core/addkeys
   */
  addkeysCreate = (
    query: {
      /**
       * Bitmasking has the keys from the mGBA scripting documentation where each key has a value that goes up in that order in binary: A = 1, B = 2, Select = 4, Start = 8, etc. A bitmask of 12 is Start and Select.
       * @format int32
       */
      keyBitmask: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/addkeys`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Load the save data associated with the currently loaded ROM file.
   *
   * @tags Core
   * @name AutoloadsaveCreate
   * @summary Load save data.
   * @request POST:/core/autoloadsave
   */
  autoloadsaveCreate = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/autoloadsave`,
      method: "POST",
      ...params,
    });
  /**
   * @description Get the checksum of the loaded ROM as base 10.
   *
   * @tags Core
   * @name ChecksumList
   * @summary Get the checksum of the loaded ROM.
   * @request GET:/core/checksum
   */
  checksumList = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/checksum`,
      method: "GET",
      ...params,
    });
  /**
   * @description Remove a single key from the currently active key list. As if the key were released.
   *
   * @tags Core
   * @name ClearkeyCreate
   * @summary Remove a single key.
   * @request POST:/core/clearkey
   */
  clearkeyCreate = (
    query: {
      /** Key value of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. */
      key: string;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/clearkey`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Remove a bitmask of keys from the currently active key list. As if the keys were released.
   *
   * @tags Core
   * @name ClearkeysCreate
   * @summary Remove a bitmask of keys.
   * @request POST:/core/clearkeys
   */
  clearkeysCreate = (
    query: {
      /**
       * Bitmasking has the keys from the mGBA scripting documentation where each key has a value that goes up in that order in binary: A = 1, B = 2, Select = 4, Start = 8, etc. A bitmask of 12 is Start and Select.
       * @format int32
       */
      keyBitmask: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/clearkeys`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Get the number of the current frame.
   *
   * @tags Core
   * @name CurrentFrameList
   * @summary Get the number of the current frame.
   * @request GET:/core/currentFrame
   */
  currentFrameList = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/currentFrame`,
      method: "GET",
      ...params,
    });
  /**
   * @description Get the number of cycles per frame.
   *
   * @tags Core
   * @name FramecyclesList
   * @summary Get the number of cycles per frame.
   * @request GET:/core/framecycles
   */
  framecyclesList = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/framecycles`,
      method: "GET",
      ...params,
    });
  /**
   * @description Get the number of cycles per second.
   *
   * @tags Core
   * @name FrequencyList
   * @summary Get the number of cycles per second.
   * @request GET:/core/frequency
   */
  frequencyList = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/frequency`,
      method: "GET",
      ...params,
    });
  /**
   * @description Get internal product code for the game from the ROM header, if available.
   *
   * @tags Core
   * @name GetgamecodeList
   * @summary Get internal product code for the game.
   * @request GET:/core/getgamecode
   */
  getgamecodeList = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/getgamecode`,
      method: "GET",
      ...params,
    });
  /**
   * @description Get internal title of the game from the ROM header.
   *
   * @tags Core
   * @name GetgametitleList
   * @summary Get internal title of the game.
   * @request GET:/core/getgametitle
   */
  getgametitleList = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/getgametitle`,
      method: "GET",
      ...params,
    });
  /**
   * @description Get the active state of a given key.
   *
   * @tags Core
   * @name GetkeyList
   * @summary Get the active state of a given key.
   * @request GET:/core/getkey
   */
  getkeyList = (
    query: {
      /** Key value of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. */
      key: string;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/getkey`,
      method: "GET",
      query: query,
      ...params,
    });
  /**
   * @description Get the currently active keys as a bitmask.
   *
   * @tags Core
   * @name GetkeysList
   * @summary Get the currently active keys as a bitmask.
   * @request GET:/core/getkeys
   */
  getkeysList = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/getkeys`,
      method: "GET",
      ...params,
    });
  /**
   * @description Load a ROM file into the current state of this core.
   *
   * @tags Core
   * @name LoadfileCreate
   * @summary Load a ROM file.
   * @request POST:/core/loadfile
   */
  loadfileCreate = (
    query: {
      path: string;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/loadfile`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Load save data from the given path. If the temporary flag is set, the given save data will not be written back to disk.
   *
   * @tags Core
   * @name LoadsavefileCreate
   * @summary Load save data file.
   * @request POST:/core/loadsavefile
   */
  loadsavefileCreate = (
    query: {
      path: string;
      temporary: boolean;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/loadsavefile`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Load state from a buffer.
   *
   * @tags Core
   * @name LoadstatebufferCreate
   * @summary Load state from a buffer.
   * @request POST:/core/loadstatebuffer
   */
  loadstatebufferCreate = (
    query: {
      buffer: string;
      /**
       * @format int32
       * @default 29
       */
      flags?: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/loadstatebuffer`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Load state from the given path.
   *
   * @tags Core
   * @name LoadstatefileCreate
   * @summary Load state from the given path.
   * @request POST:/core/loadstatefile
   */
  loadstatefileCreate = (
    query: {
      path: string;
      /**
       * @format int32
       * @default 29
       */
      flags?: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/loadstatefile`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Load state from the slot number.
   *
   * @tags Core
   * @name LoadstateslotCreate
   * @summary Load state from the slot number.
   * @request POST:/core/loadstateslot
   */
  loadstateslotCreate = (
    query: {
      slot: string;
      /**
       * @format int32
       * @default 29
       */
      flags?: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/loadstateslot`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Get which platform is being emulated.
   *
   * @tags Core
   * @name PlatformList
   * @summary Get which platform is being emulated.
   * @request GET:/core/platform
   */
  platformList = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/platform`,
      method: "GET",
      ...params,
    });
  /**
   * @description Read a 16-bit value from the given bus address.
   *
   * @tags Core
   * @name Read16List
   * @summary Read a 16-bit value from the given bus address.
   * @request GET:/core/read16
   */
  read16List = (
    query: {
      /** Address in hex, e.g. 0x03000000 */
      address: string;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/read16`,
      method: "GET",
      query: query,
      ...params,
    });
  /**
   * @description Read a 32-bit value from the given bus address.
   *
   * @tags Core
   * @name Read32List
   * @summary Read a 32-bit value from the given bus address.
   * @request GET:/core/read32
   */
  read32List = (
    query: {
      /** Address in hex, e.g. 0x03000000 */
      address: string;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/read32`,
      method: "GET",
      query: query,
      ...params,
    });
  /**
   * @description Read an 8-bit value from the given bus address.
   *
   * @tags Core
   * @name Read8List
   * @summary Read an 8-bit value from the given bus address.
   * @request GET:/core/read8
   */
  read8List = (
    query: {
      /** Address in hex, e.g. 0x03000000 */
      address: string;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/read8`,
      method: "GET",
      query: query,
      ...params,
    });
  /**
   * @description Read byte range from the given offset.
   *
   * @tags Core
   * @name ReadrangeList
   * @summary Read byte range from the given offset.
   * @request GET:/core/readrange
   */
  readrangeList = (
    query: {
      /** Address in hex, e.g. 0x03000000 */
      address: string;
      length: string;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/readrange`,
      method: "GET",
      query: query,
      ...params,
    });
  /**
   * @description Read the value of the register with the given name.
   *
   * @tags Core
   * @name ReadregisterList
   * @summary Read the value of the register with the given name.
   * @request GET:/core/readregister
   */
  readregisterList = (
    query: {
      regName: string;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/readregister`,
      method: "GET",
      query: query,
      ...params,
    });
  /**
   * @description Get the size of the loaded ROM.
   *
   * @tags Core
   * @name RomsizeList
   * @summary Get the size of the loaded ROM.
   * @request GET:/core/romsize
   */
  romsizeList = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/romsize`,
      method: "GET",
      ...params,
    });
  /**
   * @description Run until the next frame.
   *
   * @tags Core
   * @name RunFrameCreate
   * @summary Run until the next frame.
   * @request POST:/core/runFrame
   */
  runFrameCreate = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/runFrame`,
      method: "POST",
      ...params,
    });
  /**
   * @description Save state and return as a buffer.
   *
   * @tags Core
   * @name SavestatebufferCreate
   * @summary Save state and return as a buffer.
   * @request POST:/core/savestatebuffer
   */
  savestatebufferCreate = (
    query?: {
      /**
       * @format int32
       * @default 31
       */
      flags?: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/savestatebuffer`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Save state to the given path.
   *
   * @tags Core
   * @name SavestatefileCreate
   * @summary Save state to the given path.
   * @request POST:/core/savestatefile
   */
  savestatefileCreate = (
    query: {
      path: string;
      /**
       * @format int32
       * @default 31
       */
      flags?: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/savestatefile`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Save state to the slot number.
   *
   * @tags Core
   * @name SavestateslotCreate
   * @summary Save state to the slot number.
   * @request POST:/core/savestateslot
   */
  savestateslotCreate = (
    query: {
      slot: string;
      /**
       * @format int32
       * @default 31
       */
      flags?: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/savestateslot`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Save a screenshot.
   *
   * @tags Core
   * @name ScreenshotCreate
   * @summary Save a screenshot.
   * @request POST:/core/screenshot
   */
  screenshotCreate = (
    query: {
      /** For example, C:\screenshots\screenshot.png */
      path: string;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/screenshot`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Set the currently active key list.
   *
   * @tags Core
   * @name SetkeysCreate
   * @summary Set the currently active key list.
   * @request POST:/core/setkeys
   */
  setkeysCreate = (
    query: {
      /** @format int32 */
      keys: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/setkeys`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Run a single instruction.
   *
   * @tags Core
   * @name StepCreate
   * @summary Run a single instruction.
   * @request POST:/core/step
   */
  stepCreate = (params: RequestParams = {}) =>
    this.request<string, any>({
      path: `/core/step`,
      method: "POST",
      ...params,
    });
  /**
   * @description Write a 16-bit value from the given bus address.
   *
   * @tags Core
   * @name Write16Create
   * @summary Write a 16-bit value from the given bus address.
   * @request POST:/core/write16
   */
  write16Create = (
    query: {
      /** Address in hex, e.g. 0x03000000 */
      address: string;
      /** @format int32 */
      value: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/write16`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Write a 32-bit value from the given bus address.
   *
   * @tags Core
   * @name Write32Create
   * @summary Write a 32-bit value from the given bus address.
   * @request POST:/core/write32
   */
  write32Create = (
    query: {
      /** Address in hex, e.g. 0x03000000 */
      address: string;
      /** @format int32 */
      value: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/write32`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Write an 8-bit value from the given bus address.
   *
   * @tags Core
   * @name Write8Create
   * @summary Write an 8-bit value from the given bus address.
   * @request POST:/core/write8
   */
  write8Create = (
    query: {
      /** Address in hex, e.g. 0x03000000 */
      address: string;
      /** @format int32 */
      value: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/write8`,
      method: "POST",
      query: query,
      ...params,
    });
  /**
   * @description Write the value of the register with the given name.
   *
   * @tags Core
   * @name WriteregisterCreate
   * @summary Write the value of the register with the given name.
   * @request POST:/core/writeregister
   */
  writeregisterCreate = (
    query: {
      /** Address in hex, e.g. 0x03000000 */
      regName: string;
      /** @format int32 */
      value: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<string, any>({
      path: `/core/writeregister`,
      method: "POST",
      query: query,
      ...params,
    });
}
