/**
 * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
 *
 * Do not edit this file as changes may cause incorrect behavior and will be lost
 * once the code is regenerated.
 *
 * @generated by codegen project: GenerateModuleCpp.js
 */

#include "RNOtaHotUpdateSpecJSI.h"

namespace facebook::react {

static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_setupBundlePath(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->setupBundlePath(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
    count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
    count <= 2 || args[2].isUndefined() ? std::nullopt : std::make_optional(args[2].asNumber()),
    count <= 3 || args[3].isUndefined() ? std::nullopt : std::make_optional(args[3].asNumber()),
    count <= 4 || args[4].isUndefined() ? std::nullopt : std::make_optional(args[4].asString(rt))
  );
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_setExactBundlePath(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->setExactBundlePath(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
  );
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_deleteBundle(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->deleteBundle(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
  );
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_restart(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->restart(
    rt
  );
  return jsi::Value::undefined();
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_getCurrentVersion(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->getCurrentVersion(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
  );
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_getUpdateMetadata(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->getUpdateMetadata(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
  );
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_setCurrentVersion(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->setCurrentVersion(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
  );
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_setUpdateMetadata(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->setUpdateMetadata(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
  );
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_rollbackToPreviousBundle(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->rollbackToPreviousBundle(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
  );
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_getBundleList(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->getBundleList(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
  );
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_deleteBundleById(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->deleteBundleById(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
  );
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_clearAllBundles(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->clearAllBundles(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
  );
}
static jsi::Value __hostFunction_NativeOtaHotUpdateCxxSpecJSI_writeFile(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
  return static_cast<NativeOtaHotUpdateCxxSpecJSI *>(&turboModule)->writeFile(
    rt,
    count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
    count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
    count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt)
  );
}

NativeOtaHotUpdateCxxSpecJSI::NativeOtaHotUpdateCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
  : TurboModule("OtaHotUpdate", jsInvoker) {
  methodMap_["setupBundlePath"] = MethodMetadata {5, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_setupBundlePath};
  methodMap_["setExactBundlePath"] = MethodMetadata {1, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_setExactBundlePath};
  methodMap_["deleteBundle"] = MethodMetadata {1, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_deleteBundle};
  methodMap_["restart"] = MethodMetadata {0, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_restart};
  methodMap_["getCurrentVersion"] = MethodMetadata {1, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_getCurrentVersion};
  methodMap_["getUpdateMetadata"] = MethodMetadata {1, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_getUpdateMetadata};
  methodMap_["setCurrentVersion"] = MethodMetadata {1, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_setCurrentVersion};
  methodMap_["setUpdateMetadata"] = MethodMetadata {1, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_setUpdateMetadata};
  methodMap_["rollbackToPreviousBundle"] = MethodMetadata {1, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_rollbackToPreviousBundle};
  methodMap_["getBundleList"] = MethodMetadata {1, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_getBundleList};
  methodMap_["deleteBundleById"] = MethodMetadata {1, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_deleteBundleById};
  methodMap_["clearAllBundles"] = MethodMetadata {1, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_clearAllBundles};
  methodMap_["writeFile"] = MethodMetadata {3, __hostFunction_NativeOtaHotUpdateCxxSpecJSI_writeFile};
}


} // namespace facebook::react
