///
/// JHybridDeviceInfoSpec.cpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

#include "JHybridDeviceInfoSpec.hpp"

// Forward declaration of `NitroDeviceType` to properly resolve imports.
namespace margelo::nitro::nitrodeviceinfo { enum class NitroDeviceType; }
// Forward declaration of `NavigationMode` to properly resolve imports.
namespace margelo::nitro::nitrodeviceinfo { enum class NavigationMode; }
// Forward declaration of `PowerState` to properly resolve imports.
namespace margelo::nitro::nitrodeviceinfo { struct PowerState; }
// Forward declaration of `BatteryState` to properly resolve imports.
namespace margelo::nitro::nitrodeviceinfo { enum class BatteryState; }

#include <string>
#include "NitroDeviceType.hpp"
#include "JNitroDeviceType.hpp"
#include <vector>
#include "NavigationMode.hpp"
#include "JNavigationMode.hpp"
#include "PowerState.hpp"
#include "JPowerState.hpp"
#include "BatteryState.hpp"
#include "JBatteryState.hpp"
#include <NitroModules/Promise.hpp>
#include <NitroModules/JPromise.hpp>

namespace margelo::nitro::nitrodeviceinfo {

  std::shared_ptr<JHybridDeviceInfoSpec> JHybridDeviceInfoSpec::JavaPart::getJHybridDeviceInfoSpec() {
    auto hybridObject = JHybridObject::JavaPart::getJHybridObject();
    auto castHybridObject = std::dynamic_pointer_cast<JHybridDeviceInfoSpec>(hybridObject);
    if (castHybridObject == nullptr) [[unlikely]] {
      throw std::runtime_error("Failed to downcast JHybridObject to JHybridDeviceInfoSpec!");
    }
    return castHybridObject;
  }

  jni::local_ref<JHybridDeviceInfoSpec::CxxPart::jhybriddata> JHybridDeviceInfoSpec::CxxPart::initHybrid(jni::alias_ref<jhybridobject> jThis) {
    return makeCxxInstance(jThis);
  }

  std::shared_ptr<JHybridObject> JHybridDeviceInfoSpec::CxxPart::createHybridObject(const jni::local_ref<JHybridObject::JavaPart>& javaPart) {
    auto castJavaPart = jni::dynamic_ref_cast<JHybridDeviceInfoSpec::JavaPart>(javaPart);
    if (castJavaPart == nullptr) [[unlikely]] {
      throw std::runtime_error("Failed to cast JHybridObject::JavaPart to JHybridDeviceInfoSpec::JavaPart!");
    }
    return std::make_shared<JHybridDeviceInfoSpec>(castJavaPart);
  }

  void JHybridDeviceInfoSpec::CxxPart::registerNatives() {
    registerHybrid({
      makeNativeMethod("initHybrid", JHybridDeviceInfoSpec::CxxPart::initHybrid),
    });
  }

  // Properties
  std::string JHybridDeviceInfoSpec::getDeviceId() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getDeviceId");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getBrand() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getBrand");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getModel() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getModel");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getSystemName() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getSystemName");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getSystemVersion() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getSystemVersion");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  NitroDeviceType JHybridDeviceInfoSpec::getDeviceType() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroDeviceType>()>("getDeviceType");
    auto __result = method(_javaPart);
    return __result->toCpp();
  }
  std::string JHybridDeviceInfoSpec::getUniqueId() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getUniqueId");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getManufacturer() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getManufacturer");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getDeviceName() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getDeviceName");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  bool JHybridDeviceInfoSpec::getIsTablet() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isTablet");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getIsEmulator() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isEmulator");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  double JHybridDeviceInfoSpec::getDeviceYearClass() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getDeviceYearClass");
    auto __result = method(_javaPart);
    return __result;
  }
  bool JHybridDeviceInfoSpec::getIsCameraPresent() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isCameraPresent");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getIsPinOrFingerprintSet() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isPinOrFingerprintSet");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getIsHardwareKeyStoreAvailable() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isHardwareKeyStoreAvailable");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getIsLowRamDevice() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isLowRamDevice");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getIsDisplayZoomed() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isDisplayZoomed");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getIsLiquidGlassAvailable() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isLiquidGlassAvailable");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  double JHybridDeviceInfoSpec::getTotalMemory() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTotalMemory");
    auto __result = method(_javaPart);
    return __result;
  }
  double JHybridDeviceInfoSpec::getMaxMemory() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getMaxMemory");
    auto __result = method(_javaPart);
    return __result;
  }
  double JHybridDeviceInfoSpec::getTotalDiskCapacity() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTotalDiskCapacity");
    auto __result = method(_javaPart);
    return __result;
  }
  double JHybridDeviceInfoSpec::getStartupTime() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getStartupTime");
    auto __result = method(_javaPart);
    return __result;
  }
  std::string JHybridDeviceInfoSpec::getVersion() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getVersion");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getBuildNumber() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getBuildNumber");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getBundleId() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getBundleId");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getApplicationName() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getApplicationName");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getReadableVersion() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getReadableVersion");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  double JHybridDeviceInfoSpec::getFirstInstallTimeSync() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getFirstInstallTimeSync");
    auto __result = method(_javaPart);
    return __result;
  }
  double JHybridDeviceInfoSpec::getLastUpdateTimeSync() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getLastUpdateTimeSync");
    auto __result = method(_javaPart);
    return __result;
  }
  bool JHybridDeviceInfoSpec::getCarrierAllowsVOIP() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getCarrierAllowsVOIP");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  std::string JHybridDeviceInfoSpec::getCarrierIsoCountryCode() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getCarrierIsoCountryCode");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getMobileCountryCode() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getMobileCountryCode");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getMobileNetworkCode() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getMobileNetworkCode");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getMobileNetworkOperator() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getMobileNetworkOperator");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getSystemLanguage() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getSystemLanguage");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::vector<std::string> JHybridDeviceInfoSpec::getSupportedAbis() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JArrayClass<jni::JString>>()>("getSupportedAbis");
    auto __result = method(_javaPart);
    return [&](auto&& __input) {
      size_t __size = __input->size();
      std::vector<std::string> __vector;
      __vector.reserve(__size);
      for (size_t __i = 0; __i < __size; __i++) {
        auto __element = __input->getElement(__i);
        __vector.push_back(__element->toStdString());
      }
      return __vector;
    }(__result);
  }
  std::vector<std::string> JHybridDeviceInfoSpec::getSupported32BitAbis() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JArrayClass<jni::JString>>()>("getSupported32BitAbis");
    auto __result = method(_javaPart);
    return [&](auto&& __input) {
      size_t __size = __input->size();
      std::vector<std::string> __vector;
      __vector.reserve(__size);
      for (size_t __i = 0; __i < __size; __i++) {
        auto __element = __input->getElement(__i);
        __vector.push_back(__element->toStdString());
      }
      return __vector;
    }(__result);
  }
  std::vector<std::string> JHybridDeviceInfoSpec::getSupported64BitAbis() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JArrayClass<jni::JString>>()>("getSupported64BitAbis");
    auto __result = method(_javaPart);
    return [&](auto&& __input) {
      size_t __size = __input->size();
      std::vector<std::string> __vector;
      __vector.reserve(__size);
      for (size_t __i = 0; __i < __size; __i++) {
        auto __element = __input->getElement(__i);
        __vector.push_back(__element->toStdString());
      }
      return __vector;
    }(__result);
  }
  double JHybridDeviceInfoSpec::getApiLevel() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getApiLevel");
    auto __result = method(_javaPart);
    return __result;
  }
  NavigationMode JHybridDeviceInfoSpec::getNavigationMode() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNavigationMode>()>("getNavigationMode");
    auto __result = method(_javaPart);
    return __result->toCpp();
  }
  std::vector<std::string> JHybridDeviceInfoSpec::getSystemAvailableFeatures() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JArrayClass<jni::JString>>()>("getSystemAvailableFeatures");
    auto __result = method(_javaPart);
    return [&](auto&& __input) {
      size_t __size = __input->size();
      std::vector<std::string> __vector;
      __vector.reserve(__size);
      for (size_t __i = 0; __i < __size; __i++) {
        auto __element = __input->getElement(__i);
        __vector.push_back(__element->toStdString());
      }
      return __vector;
    }(__result);
  }
  std::vector<std::string> JHybridDeviceInfoSpec::getSupportedMediaTypeList() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JArrayClass<jni::JString>>()>("getSupportedMediaTypeList");
    auto __result = method(_javaPart);
    return [&](auto&& __input) {
      size_t __size = __input->size();
      std::vector<std::string> __vector;
      __vector.reserve(__size);
      for (size_t __i = 0; __i < __size; __i++) {
        auto __element = __input->getElement(__i);
        __vector.push_back(__element->toStdString());
      }
      return __vector;
    }(__result);
  }
  std::string JHybridDeviceInfoSpec::getSerialNumber() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getSerialNumber");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getAndroidId() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getAndroidId");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  double JHybridDeviceInfoSpec::getPreviewSdkInt() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getPreviewSdkInt");
    auto __result = method(_javaPart);
    return __result;
  }
  std::string JHybridDeviceInfoSpec::getSecurityPatch() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getSecurityPatch");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getCodename() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getCodename");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getIncremental() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getIncremental");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getBoard() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getBoard");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getBootloader() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getBootloader");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getDevice() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getDevice");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getDisplay() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getDisplay");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getFingerprint() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getFingerprint");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getHardware() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getHardware");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getHost() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getHost");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getProduct() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getProduct");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getTags() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getTags");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getType() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getType");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getBaseOs() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getBaseOs");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getRadioVersion() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getRadioVersion");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getBuildId() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getBuildId");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::string JHybridDeviceInfoSpec::getInstallerPackageName() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getInstallerPackageName");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  double JHybridDeviceInfoSpec::getTotalDiskCapacityOld() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTotalDiskCapacityOld");
    auto __result = method(_javaPart);
    return __result;
  }
  bool JHybridDeviceInfoSpec::getIsMouseConnected() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isMouseConnected");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getIsKeyboardConnected() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isKeyboardConnected");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  std::vector<std::string> JHybridDeviceInfoSpec::getHostNames() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JArrayClass<jni::JString>>()>("getHostNames");
    auto __result = method(_javaPart);
    return [&](auto&& __input) {
      size_t __size = __input->size();
      std::vector<std::string> __vector;
      __vector.reserve(__size);
      for (size_t __i = 0; __i < __size; __i++) {
        auto __element = __input->getElement(__i);
        __vector.push_back(__element->toStdString());
      }
      return __vector;
    }(__result);
  }
  bool JHybridDeviceInfoSpec::getIsTabletMode() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isTabletMode");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }

  // Methods
  bool JHybridDeviceInfoSpec::getHasNotch() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getHasNotch");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getHasDynamicIsland() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getHasDynamicIsland");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getIsLandscape() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getIsLandscape");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  double JHybridDeviceInfoSpec::getBrightness() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getBrightness");
    auto __result = method(_javaPart);
    return __result;
  }
  double JHybridDeviceInfoSpec::getFontScale() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getFontScale");
    auto __result = method(_javaPart);
    return __result;
  }
  double JHybridDeviceInfoSpec::getUsedMemory() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getUsedMemory");
    auto __result = method(_javaPart);
    return __result;
  }
  double JHybridDeviceInfoSpec::getFreeDiskStorage() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getFreeDiskStorage");
    auto __result = method(_javaPart);
    return __result;
  }
  double JHybridDeviceInfoSpec::getUptime() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getUptime");
    auto __result = method(_javaPart);
    return __result;
  }
  double JHybridDeviceInfoSpec::getBatteryLevel() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getBatteryLevel");
    auto __result = method(_javaPart);
    return __result;
  }
  PowerState JHybridDeviceInfoSpec::getPowerState() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPowerState>()>("getPowerState");
    auto __result = method(_javaPart);
    return __result->toCpp();
  }
  bool JHybridDeviceInfoSpec::getIsBatteryCharging() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getIsBatteryCharging");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::isLowBatteryLevel(double threshold) {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean(double /* threshold */)>("isLowBatteryLevel");
    auto __result = method(_javaPart, threshold);
    return static_cast<bool>(__result);
  }
  std::shared_ptr<Promise<double>> JHybridDeviceInfoSpec::getFirstInstallTime() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("getFirstInstallTime");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<double>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JDouble>(__boxedResult);
        __promise->resolve(__result->value());
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }
  std::shared_ptr<Promise<double>> JHybridDeviceInfoSpec::getLastUpdateTime() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("getLastUpdateTime");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<double>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JDouble>(__boxedResult);
        __promise->resolve(__result->value());
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }
  std::shared_ptr<Promise<std::string>> JHybridDeviceInfoSpec::getIpAddress() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("getIpAddress");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<std::string>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JString>(__boxedResult);
        __promise->resolve(__result->toStdString());
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }
  std::string JHybridDeviceInfoSpec::getIpAddressSync() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getIpAddressSync");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::shared_ptr<Promise<std::string>> JHybridDeviceInfoSpec::getMacAddress() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("getMacAddress");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<std::string>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JString>(__boxedResult);
        __promise->resolve(__result->toStdString());
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }
  std::string JHybridDeviceInfoSpec::getMacAddressSync() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getMacAddressSync");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::shared_ptr<Promise<std::string>> JHybridDeviceInfoSpec::getUserAgent() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("getUserAgent");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<std::string>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JString>(__boxedResult);
        __promise->resolve(__result->toStdString());
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }
  bool JHybridDeviceInfoSpec::getIsAirplaneMode() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getIsAirplaneMode");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  std::shared_ptr<Promise<std::string>> JHybridDeviceInfoSpec::getCarrier() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("getCarrier");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<std::string>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JString>(__boxedResult);
        __promise->resolve(__result->toStdString());
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }
  std::string JHybridDeviceInfoSpec::getCarrierSync() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getCarrierSync");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  std::shared_ptr<Promise<bool>> JHybridDeviceInfoSpec::isHeadphonesConnected() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("isHeadphonesConnected");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<bool>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JBoolean>(__boxedResult);
        __promise->resolve(static_cast<bool>(__result->value()));
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }
  bool JHybridDeviceInfoSpec::getIsHeadphonesConnected() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getIsHeadphonesConnected");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getIsWiredHeadphonesConnected() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getIsWiredHeadphonesConnected");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getIsBluetoothHeadphonesConnected() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getIsBluetoothHeadphonesConnected");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  std::shared_ptr<Promise<bool>> JHybridDeviceInfoSpec::isLocationEnabled() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("isLocationEnabled");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<bool>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JBoolean>(__boxedResult);
        __promise->resolve(static_cast<bool>(__result->value()));
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }
  bool JHybridDeviceInfoSpec::getIsLocationEnabled() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getIsLocationEnabled");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  std::vector<std::string> JHybridDeviceInfoSpec::getAvailableLocationProviders() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JArrayClass<jni::JString>>()>("getAvailableLocationProviders");
    auto __result = method(_javaPart);
    return [&](auto&& __input) {
      size_t __size = __input->size();
      std::vector<std::string> __vector;
      __vector.reserve(__size);
      for (size_t __i = 0; __i < __size; __i++) {
        auto __element = __input->getElement(__i);
        __vector.push_back(__element->toStdString());
      }
      return __vector;
    }(__result);
  }
  bool JHybridDeviceInfoSpec::getHasGms() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getHasGms");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::getHasHms() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getHasHms");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  bool JHybridDeviceInfoSpec::hasSystemFeature(const std::string& feature) {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean(jni::alias_ref<jni::JString> /* feature */)>("hasSystemFeature");
    auto __result = method(_javaPart, jni::make_jstring(feature));
    return static_cast<bool>(__result);
  }
  std::shared_ptr<Promise<std::string>> JHybridDeviceInfoSpec::getDeviceToken() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("getDeviceToken");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<std::string>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JString>(__boxedResult);
        __promise->resolve(__result->toStdString());
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }
  std::shared_ptr<Promise<std::string>> JHybridDeviceInfoSpec::syncUniqueId() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("syncUniqueId");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<std::string>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JString>(__boxedResult);
        __promise->resolve(__result->toStdString());
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }
  std::shared_ptr<Promise<std::string>> JHybridDeviceInfoSpec::getInstallReferrer() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("getInstallReferrer");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<std::string>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JString>(__boxedResult);
        __promise->resolve(__result->toStdString());
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }
  bool JHybridDeviceInfoSpec::isSideLoadingEnabled() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isSideLoadingEnabled");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  double JHybridDeviceInfoSpec::getFreeDiskStorageOld() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getFreeDiskStorageOld");
    auto __result = method(_javaPart);
    return __result;
  }
  bool JHybridDeviceInfoSpec::isDeviceCompromised() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("isDeviceCompromised");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  std::shared_ptr<Promise<bool>> JHybridDeviceInfoSpec::verifyDeviceIntegrity() {
    static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("verifyDeviceIntegrity");
    auto __result = method(_javaPart);
    return [&]() {
      auto __promise = Promise<bool>::create();
      __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
        auto __result = jni::static_ref_cast<jni::JBoolean>(__boxedResult);
        __promise->resolve(static_cast<bool>(__result->value()));
      });
      __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
        jni::JniException __jniError(__throwable);
        __promise->reject(std::make_exception_ptr(__jniError));
      });
      return __promise;
    }();
  }

} // namespace margelo::nitro::nitrodeviceinfo
