/**
 * 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: GenerateModuleH.js
 */

#pragma once

#include <ReactCommon/TurboModule.h>
#include <react/bridging/Bridging.h>

namespace facebook::react {


template <typename T>
class JSI_EXPORT NativeAsyncStorageCxxSpec : public TurboModule {
public:
  static constexpr std::string_view kModuleName = "RNAsyncStorage";

protected:
  NativeAsyncStorageCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeAsyncStorageCxxSpec::kModuleName}, jsInvoker) {
    methodMap_["getValues"] = MethodMetadata {.argCount = 2, .invoker = __getValues};
    methodMap_["setValues"] = MethodMetadata {.argCount = 2, .invoker = __setValues};
    methodMap_["removeValues"] = MethodMetadata {.argCount = 2, .invoker = __removeValues};
    methodMap_["getKeys"] = MethodMetadata {.argCount = 1, .invoker = __getKeys};
    methodMap_["clearStorage"] = MethodMetadata {.argCount = 1, .invoker = __clearStorage};
    methodMap_["legacy_multiGet"] = MethodMetadata {.argCount = 1, .invoker = __legacy_multiGet};
    methodMap_["legacy_multiSet"] = MethodMetadata {.argCount = 1, .invoker = __legacy_multiSet};
    methodMap_["legacy_multiRemove"] = MethodMetadata {.argCount = 1, .invoker = __legacy_multiRemove};
    methodMap_["legacy_multiMerge"] = MethodMetadata {.argCount = 1, .invoker = __legacy_multiMerge};
    methodMap_["legacy_getAllKeys"] = MethodMetadata {.argCount = 0, .invoker = __legacy_getAllKeys};
    methodMap_["legacy_clear"] = MethodMetadata {.argCount = 0, .invoker = __legacy_clear};
  }
  
private:
  static jsi::Value __getValues(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
    static_assert(
      bridging::getParameterCount(&T::getValues) == 3,
      "Expected getValues(...) to have 3 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::getValues,  static_cast<NativeAsyncStorageCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
      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].asObject(rt).asArray(rt));
  }

  static jsi::Value __setValues(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
    static_assert(
      bridging::getParameterCount(&T::setValues) == 3,
      "Expected setValues(...) to have 3 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::setValues,  static_cast<NativeAsyncStorageCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
      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].asObject(rt).asArray(rt));
  }

  static jsi::Value __removeValues(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
    static_assert(
      bridging::getParameterCount(&T::removeValues) == 3,
      "Expected removeValues(...) to have 3 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::removeValues,  static_cast<NativeAsyncStorageCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
      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].asObject(rt).asArray(rt));
  }

  static jsi::Value __getKeys(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
    static_assert(
      bridging::getParameterCount(&T::getKeys) == 2,
      "Expected getKeys(...) to have 2 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::getKeys,  static_cast<NativeAsyncStorageCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
      count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));
  }

  static jsi::Value __clearStorage(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
    static_assert(
      bridging::getParameterCount(&T::clearStorage) == 2,
      "Expected clearStorage(...) to have 2 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::clearStorage,  static_cast<NativeAsyncStorageCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
      count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));
  }

  static jsi::Value __legacy_multiGet(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
    static_assert(
      bridging::getParameterCount(&T::legacy_multiGet) == 2,
      "Expected legacy_multiGet(...) to have 2 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::legacy_multiGet,  static_cast<NativeAsyncStorageCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
      count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt));
  }

  static jsi::Value __legacy_multiSet(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
    static_assert(
      bridging::getParameterCount(&T::legacy_multiSet) == 2,
      "Expected legacy_multiSet(...) to have 2 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::legacy_multiSet,  static_cast<NativeAsyncStorageCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
      count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt));
  }

  static jsi::Value __legacy_multiRemove(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
    static_assert(
      bridging::getParameterCount(&T::legacy_multiRemove) == 2,
      "Expected legacy_multiRemove(...) to have 2 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::legacy_multiRemove,  static_cast<NativeAsyncStorageCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
      count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt));
  }

  static jsi::Value __legacy_multiMerge(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
    static_assert(
      bridging::getParameterCount(&T::legacy_multiMerge) == 2,
      "Expected legacy_multiMerge(...) to have 2 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::legacy_multiMerge,  static_cast<NativeAsyncStorageCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
      count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt).asArray(rt));
  }

  static jsi::Value __legacy_getAllKeys(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
    static_assert(
      bridging::getParameterCount(&T::legacy_getAllKeys) == 1,
      "Expected legacy_getAllKeys(...) to have 1 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::legacy_getAllKeys,  static_cast<NativeAsyncStorageCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
  }

  static jsi::Value __legacy_clear(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
    static_assert(
      bridging::getParameterCount(&T::legacy_clear) == 1,
      "Expected legacy_clear(...) to have 1 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::legacy_clear,  static_cast<NativeAsyncStorageCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
  }
};

} // namespace facebook::react
