text: /**
   * Kleister OpenAPI
   * API definition for Kleister, manage mod packs for Minecraft
   *
   * The version of the OpenAPI document: 1.0.0-alpha1
   *
   *
   * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
   * https://openapi-generator.tech
   * Do not edit the class manually.
   *
   */
  
  /* eslint-disable no-unused-vars */
  import ApiClient from '../ApiClient'
  import BuildVersion from '../model/BuildVersion'
  import GeneralError from '../model/GeneralError'
  import Mod from '../model/Mod'
  import ModTeamParams from '../model/ModTeamParams'
  import ModUserParams from '../model/ModUserParams'
  import TeamMod from '../model/TeamMod'
  import UserMod from '../model/UserMod'
  import ValidationError from '../model/ValidationError'
  import Version from '../model/Version'
  import VersionBuildParams from '../model/VersionBuildParams'
  /* eslint-enable no-unused-vars */
  
  /**
  * Mod service.
  * @module kleister/api/ModApi
  * @version 1.0.0-alpha1
  */
  export default class ModApi {
    /**
      * Constructs a new ModApi.
      * @alias module:kleister/api/ModApi
      * @class
      * @param {module:kleister/ApiClient} [apiClient] Optional API client implementation to use,
      * default to {@link module:kleister/ApiClient#instance} if unspecified.
      */
    constructor (apiClient) {
      this.apiClient = apiClient || ApiClient.instance
    }
  
    /**
       * Assign a team to mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModTeamParams} modTeam The mod team data to assign
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/GeneralError} and HTTP response
       */
    appendModToTeamWithHttpInfo (modId, modTeam) {
      let postBody = modTeam
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling appendModToTeam")
      }
      // verify the required parameter 'modTeam' is set
      if (modTeam === undefined || modTeam === null) {
        throw new Error("Missing the required parameter 'modTeam' when calling appendModToTeam")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = GeneralError
      return this.apiClient.callApi(
        '/mods/{mod_id}/teams', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Assign a team to mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModTeamParams} modTeam The mod team data to assign
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/GeneralError}
       */
    appendModToTeam (modId, modTeam) {
      return this.appendModToTeamWithHttpInfo(modId, modTeam)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Assign a user to mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModUserParams} modUser The mod user data to assign
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/GeneralError} and HTTP response
       */
    appendModToUserWithHttpInfo (modId, modUser) {
      let postBody = modUser
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling appendModToUser")
      }
      // verify the required parameter 'modUser' is set
      if (modUser === undefined || modUser === null) {
        throw new Error("Missing the required parameter 'modUser' when calling appendModToUser")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = GeneralError
      return this.apiClient.callApi(
        '/mods/{mod_id}/users', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Assign a user to mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModUserParams} modUser The mod user data to assign
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/GeneralError}
       */
    appendModToUser (modId, modUser) {
      return this.appendModToUserWithHttpInfo(modId, modUser)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Assign a build to a version
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @param {module:kleister/model/VersionBuildParams} versionBuild The build data to append to version
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/GeneralError} and HTTP response
       */
    appendVersionToBuildWithHttpInfo (modId, versionId, versionBuild) {
      let postBody = versionBuild
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling appendVersionToBuild")
      }
      // verify the required parameter 'versionId' is set
      if (versionId === undefined || versionId === null) {
        throw new Error("Missing the required parameter 'versionId' when calling appendVersionToBuild")
      }
      // verify the required parameter 'versionBuild' is set
      if (versionBuild === undefined || versionBuild === null) {
        throw new Error("Missing the required parameter 'versionBuild' when calling appendVersionToBuild")
      }
  
      let pathParams = {
        'mod_id': modId,
        'version_id': versionId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = GeneralError
      return this.apiClient.callApi(
        '/mods/{mod_id}/versions/{version_id}/builds', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Assign a build to a version
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @param {module:kleister/model/VersionBuildParams} versionBuild The build data to append to version
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/GeneralError}
       */
    appendVersionToBuild (modId, versionId, versionBuild) {
      return this.appendVersionToBuildWithHttpInfo(modId, versionId, versionBuild)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Create a new mod
       * @param {module:kleister/model/Mod} mod The mod data to create
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/Mod} and HTTP response
       */
    createModWithHttpInfo (mod) {
      let postBody = mod
      // verify the required parameter 'mod' is set
      if (mod === undefined || mod === null) {
        throw new Error("Missing the required parameter 'mod' when calling createMod")
      }
  
      let pathParams = {
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = Mod
      return this.apiClient.callApi(
        '/mods', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Create a new mod
       * @param {module:kleister/model/Mod} mod The mod data to create
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/Mod}
       */
    createMod (mod) {
      return this.createModWithHttpInfo(mod)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Create a new version for a mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/Version} version The version data to create
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/Version} and HTTP response
       */
    createVersionWithHttpInfo (modId, version) {
      let postBody = version
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling createVersion")
      }
      // verify the required parameter 'version' is set
      if (version === undefined || version === null) {
        throw new Error("Missing the required parameter 'version' when calling createVersion")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = Version
      return this.apiClient.callApi(
        '/mods/{mod_id}/versions', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Create a new version for a mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/Version} version The version data to create
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/Version}
       */
    createVersion (modId, version) {
      return this.createVersionWithHttpInfo(modId, version)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Delete a specific mod
       * @param {String} modId A mod UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/GeneralError} and HTTP response
       */
    deleteModWithHttpInfo (modId) {
      let postBody = null
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling deleteMod")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = []
      let accepts = ['application/json']
      let returnType = GeneralError
      return this.apiClient.callApi(
        '/mods/{mod_id}', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Delete a specific mod
       * @param {String} modId A mod UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/GeneralError}
       */
    deleteMod (modId) {
      return this.deleteModWithHttpInfo(modId)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Remove a team from mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModTeamParams} modTeam The mod team data to delete
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/GeneralError} and HTTP response
       */
    deleteModFromTeamWithHttpInfo (modId, modTeam) {
      let postBody = modTeam
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling deleteModFromTeam")
      }
      // verify the required parameter 'modTeam' is set
      if (modTeam === undefined || modTeam === null) {
        throw new Error("Missing the required parameter 'modTeam' when calling deleteModFromTeam")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = GeneralError
      return this.apiClient.callApi(
        '/mods/{mod_id}/teams', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Remove a team from mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModTeamParams} modTeam The mod team data to delete
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/GeneralError}
       */
    deleteModFromTeam (modId, modTeam) {
      return this.deleteModFromTeamWithHttpInfo(modId, modTeam)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Remove a user from mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModUserParams} modUser The mod user data to delete
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/GeneralError} and HTTP response
       */
    deleteModFromUserWithHttpInfo (modId, modUser) {
      let postBody = modUser
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling deleteModFromUser")
      }
      // verify the required parameter 'modUser' is set
      if (modUser === undefined || modUser === null) {
        throw new Error("Missing the required parameter 'modUser' when calling deleteModFromUser")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = GeneralError
      return this.apiClient.callApi(
        '/mods/{mod_id}/users', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Remove a user from mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModUserParams} modUser The mod user data to delete
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/GeneralError}
       */
    deleteModFromUser (modId, modUser) {
      return this.deleteModFromUserWithHttpInfo(modId, modUser)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Delete a specific version for a mod
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/GeneralError} and HTTP response
       */
    deleteVersionWithHttpInfo (modId, versionId) {
      let postBody = null
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling deleteVersion")
      }
      // verify the required parameter 'versionId' is set
      if (versionId === undefined || versionId === null) {
        throw new Error("Missing the required parameter 'versionId' when calling deleteVersion")
      }
  
      let pathParams = {
        'mod_id': modId,
        'version_id': versionId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = []
      let accepts = ['application/json']
      let returnType = GeneralError
      return this.apiClient.callApi(
        '/mods/{mod_id}/versions/{version_id}', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Delete a specific version for a mod
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/GeneralError}
       */
    deleteVersion (modId, versionId) {
      return this.deleteVersionWithHttpInfo(modId, versionId)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Unlink a build from a version
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @param {module:kleister/model/VersionBuildParams} versionBuild The build data to unlink from version
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/GeneralError} and HTTP response
       */
    deleteVersionFromBuildWithHttpInfo (modId, versionId, versionBuild) {
      let postBody = versionBuild
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling deleteVersionFromBuild")
      }
      // verify the required parameter 'versionId' is set
      if (versionId === undefined || versionId === null) {
        throw new Error("Missing the required parameter 'versionId' when calling deleteVersionFromBuild")
      }
      // verify the required parameter 'versionBuild' is set
      if (versionBuild === undefined || versionBuild === null) {
        throw new Error("Missing the required parameter 'versionBuild' when calling deleteVersionFromBuild")
      }
  
      let pathParams = {
        'mod_id': modId,
        'version_id': versionId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = GeneralError
      return this.apiClient.callApi(
        '/mods/{mod_id}/versions/{version_id}/builds', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Unlink a build from a version
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @param {module:kleister/model/VersionBuildParams} versionBuild The build data to unlink from version
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/GeneralError}
       */
    deleteVersionFromBuild (modId, versionId, versionBuild) {
      return this.deleteVersionFromBuildWithHttpInfo(modId, versionId, versionBuild)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Fetch all teams assigned to mod
       * @param {String} modId A mod UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:kleister/model/TeamMod>} and HTTP response
       */
    listModTeamsWithHttpInfo (modId) {
      let postBody = null
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling listModTeams")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = []
      let accepts = ['application/json']
      let returnType = [TeamMod]
      return this.apiClient.callApi(
        '/mods/{mod_id}/teams', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Fetch all teams assigned to mod
       * @param {String} modId A mod UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:kleister/model/TeamMod>}
       */
    listModTeams (modId) {
      return this.listModTeamsWithHttpInfo(modId)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Fetch all users assigned to mod
       * @param {String} modId A mod UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:kleister/model/UserMod>} and HTTP response
       */
    listModUsersWithHttpInfo (modId) {
      let postBody = null
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling listModUsers")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = []
      let accepts = ['application/json']
      let returnType = [UserMod]
      return this.apiClient.callApi(
        '/mods/{mod_id}/users', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Fetch all users assigned to mod
       * @param {String} modId A mod UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:kleister/model/UserMod>}
       */
    listModUsers (modId) {
      return this.listModUsersWithHttpInfo(modId)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Fetch all available mods
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:kleister/model/Mod>} and HTTP response
       */
    listModsWithHttpInfo () {
      let postBody = null
  
      let pathParams = {
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = []
      let accepts = ['application/json']
      let returnType = [Mod]
      return this.apiClient.callApi(
        '/mods', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Fetch all available mods
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:kleister/model/Mod>}
       */
    listMods () {
      return this.listModsWithHttpInfo()
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Fetch all builds assigned to version
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:kleister/model/BuildVersion>} and HTTP response
       */
    listVersionBuildsWithHttpInfo (modId, versionId) {
      let postBody = null
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling listVersionBuilds")
      }
      // verify the required parameter 'versionId' is set
      if (versionId === undefined || versionId === null) {
        throw new Error("Missing the required parameter 'versionId' when calling listVersionBuilds")
      }
  
      let pathParams = {
        'mod_id': modId,
        'version_id': versionId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = []
      let accepts = ['application/json']
      let returnType = [BuildVersion]
      return this.apiClient.callApi(
        '/mods/{mod_id}/versions/{version_id}/builds', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Fetch all builds assigned to version
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:kleister/model/BuildVersion>}
       */
    listVersionBuilds (modId, versionId) {
      return this.listVersionBuildsWithHttpInfo(modId, versionId)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Fetch all available versions for a mod
       * @param {String} modId A mod UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:kleister/model/Version>} and HTTP response
       */
    listVersionsWithHttpInfo (modId) {
      let postBody = null
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling listVersions")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = []
      let accepts = ['application/json']
      let returnType = [Version]
      return this.apiClient.callApi(
        '/mods/{mod_id}/versions', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Fetch all available versions for a mod
       * @param {String} modId A mod UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:kleister/model/Version>}
       */
    listVersions (modId) {
      return this.listVersionsWithHttpInfo(modId)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Update team perms for mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModTeamParams} modTeam The mod team data to update
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/GeneralError} and HTTP response
       */
    permitModTeamWithHttpInfo (modId, modTeam) {
      let postBody = modTeam
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling permitModTeam")
      }
      // verify the required parameter 'modTeam' is set
      if (modTeam === undefined || modTeam === null) {
        throw new Error("Missing the required parameter 'modTeam' when calling permitModTeam")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = GeneralError
      return this.apiClient.callApi(
        '/mods/{mod_id}/teams', 'PUT',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Update team perms for mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModTeamParams} modTeam The mod team data to update
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/GeneralError}
       */
    permitModTeam (modId, modTeam) {
      return this.permitModTeamWithHttpInfo(modId, modTeam)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Update user perms for mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModUserParams} modUser The mod user data to update
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/GeneralError} and HTTP response
       */
    permitModUserWithHttpInfo (modId, modUser) {
      let postBody = modUser
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling permitModUser")
      }
      // verify the required parameter 'modUser' is set
      if (modUser === undefined || modUser === null) {
        throw new Error("Missing the required parameter 'modUser' when calling permitModUser")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = GeneralError
      return this.apiClient.callApi(
        '/mods/{mod_id}/users', 'PUT',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Update user perms for mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/ModUserParams} modUser The mod user data to update
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/GeneralError}
       */
    permitModUser (modId, modUser) {
      return this.permitModUserWithHttpInfo(modId, modUser)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Fetch a specific mod
       * @param {String} modId A mod UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/Mod} and HTTP response
       */
    showModWithHttpInfo (modId) {
      let postBody = null
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling showMod")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = []
      let accepts = ['application/json']
      let returnType = Mod
      return this.apiClient.callApi(
        '/mods/{mod_id}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Fetch a specific mod
       * @param {String} modId A mod UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/Mod}
       */
    showMod (modId) {
      return this.showModWithHttpInfo(modId)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Fetch a specific version for a mod
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/Version} and HTTP response
       */
    showVersionWithHttpInfo (modId, versionId) {
      let postBody = null
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling showVersion")
      }
      // verify the required parameter 'versionId' is set
      if (versionId === undefined || versionId === null) {
        throw new Error("Missing the required parameter 'versionId' when calling showVersion")
      }
  
      let pathParams = {
        'mod_id': modId,
        'version_id': versionId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = []
      let accepts = ['application/json']
      let returnType = Version
      return this.apiClient.callApi(
        '/mods/{mod_id}/versions/{version_id}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Fetch a specific version for a mod
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/Version}
       */
    showVersion (modId, versionId) {
      return this.showVersionWithHttpInfo(modId, versionId)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Update a specific mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/Mod} mod The mod data to update
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/Mod} and HTTP response
       */
    updateModWithHttpInfo (modId, mod) {
      let postBody = mod
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling updateMod")
      }
      // verify the required parameter 'mod' is set
      if (mod === undefined || mod === null) {
        throw new Error("Missing the required parameter 'mod' when calling updateMod")
      }
  
      let pathParams = {
        'mod_id': modId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = Mod
      return this.apiClient.callApi(
        '/mods/{mod_id}', 'PUT',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Update a specific mod
       * @param {String} modId A mod UUID or slug
       * @param {module:kleister/model/Mod} mod The mod data to update
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/Mod}
       */
    updateMod (modId, mod) {
      return this.updateModWithHttpInfo(modId, mod)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  
    /**
       * Update a specific version for a mod
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @param {module:kleister/model/Version} version The version data to update
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:kleister/model/Version} and HTTP response
       */
    updateVersionWithHttpInfo (modId, versionId, version) {
      let postBody = version
      // verify the required parameter 'modId' is set
      if (modId === undefined || modId === null) {
        throw new Error("Missing the required parameter 'modId' when calling updateVersion")
      }
      // verify the required parameter 'versionId' is set
      if (versionId === undefined || versionId === null) {
        throw new Error("Missing the required parameter 'versionId' when calling updateVersion")
      }
      // verify the required parameter 'version' is set
      if (version === undefined || version === null) {
        throw new Error("Missing the required parameter 'version' when calling updateVersion")
      }
  
      let pathParams = {
        'mod_id': modId,
        'version_id': versionId
      }
      let queryParams = {
      }
      let headerParams = {
      }
      let formParams = {
      }
  
      let authNames = []
      let contentTypes = ['application/json']
      let accepts = ['application/json']
      let returnType = Version
      return this.apiClient.callApi(
        '/mods/{mod_id}/versions/{version_id}', 'PUT',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      )
    }
  
    /**
       * Update a specific version for a mod
       * @param {String} modId A mod UUID or slug
       * @param {String} versionId A version UUID or slug
       * @param {module:kleister/model/Version} version The version data to update
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:kleister/model/Version}
       */
    updateVersion (modId, versionId, version) {
      return this.updateVersionWithHttpInfo(modId, versionId, version)
        .then(function (responseAndData) {
          return responseAndData.data
        })
    }
  }
  