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

#pragma once

#include "HybridDeviceInfoSpec.hpp"

// Forward declaration of `HybridDeviceInfoSpec_cxx` to properly resolve imports.
namespace NitroDeviceInfo { class HybridDeviceInfoSpec_cxx; }

// 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 <vector>
#include "NavigationMode.hpp"
#include "PowerState.hpp"
#include "BatteryState.hpp"
#include <NitroModules/Promise.hpp>

#include "NitroDeviceInfo-Swift-Cxx-Umbrella.hpp"

namespace margelo::nitro::nitrodeviceinfo {

  /**
   * The C++ part of HybridDeviceInfoSpec_cxx.swift.
   *
   * HybridDeviceInfoSpecSwift (C++) accesses HybridDeviceInfoSpec_cxx (Swift), and might
   * contain some additional bridging code for C++ <> Swift interop.
   *
   * Since this obviously introduces an overhead, I hope at some point in
   * the future, HybridDeviceInfoSpec_cxx can directly inherit from the C++ class HybridDeviceInfoSpec
   * to simplify the whole structure and memory management.
   */
  class HybridDeviceInfoSpecSwift: public virtual HybridDeviceInfoSpec {
  public:
    // Constructor from a Swift instance
    explicit HybridDeviceInfoSpecSwift(const NitroDeviceInfo::HybridDeviceInfoSpec_cxx& swiftPart):
      HybridObject(HybridDeviceInfoSpec::TAG),
      _swiftPart(swiftPart) { }

  public:
    // Get the Swift part
    inline NitroDeviceInfo::HybridDeviceInfoSpec_cxx& getSwiftPart() noexcept {
      return _swiftPart;
    }

  public:
    inline size_t getExternalMemorySize() noexcept override {
      return _swiftPart.getMemorySize();
    }
    bool equals(const std::shared_ptr<HybridObject>& other) override {
      if (auto otherCast = std::dynamic_pointer_cast<HybridDeviceInfoSpecSwift>(other)) {
        return _swiftPart.equals(otherCast->_swiftPart);
      }
      return false;
    }
    void dispose() noexcept override {
      _swiftPart.dispose();
    }
    std::string toString() override {
      return _swiftPart.toString();
    }

  public:
    // Properties
    inline std::string getDeviceId() noexcept override {
      auto __result = _swiftPart.getDeviceId();
      return __result;
    }
    inline std::string getBrand() noexcept override {
      auto __result = _swiftPart.getBrand();
      return __result;
    }
    inline std::string getModel() noexcept override {
      auto __result = _swiftPart.getModel();
      return __result;
    }
    inline std::string getSystemName() noexcept override {
      auto __result = _swiftPart.getSystemName();
      return __result;
    }
    inline std::string getSystemVersion() noexcept override {
      auto __result = _swiftPart.getSystemVersion();
      return __result;
    }
    inline NitroDeviceType getDeviceType() noexcept override {
      auto __result = _swiftPart.getDeviceType();
      return static_cast<NitroDeviceType>(__result);
    }
    inline std::string getUniqueId() noexcept override {
      auto __result = _swiftPart.getUniqueId();
      return __result;
    }
    inline std::string getManufacturer() noexcept override {
      auto __result = _swiftPart.getManufacturer();
      return __result;
    }
    inline std::string getDeviceName() noexcept override {
      auto __result = _swiftPart.getDeviceName();
      return __result;
    }
    inline bool getIsTablet() noexcept override {
      return _swiftPart.isTablet();
    }
    inline bool getIsEmulator() noexcept override {
      return _swiftPart.isEmulator();
    }
    inline double getDeviceYearClass() noexcept override {
      return _swiftPart.getDeviceYearClass();
    }
    inline bool getIsCameraPresent() noexcept override {
      return _swiftPart.isCameraPresent();
    }
    inline bool getIsPinOrFingerprintSet() noexcept override {
      return _swiftPart.isPinOrFingerprintSet();
    }
    inline bool getIsHardwareKeyStoreAvailable() noexcept override {
      return _swiftPart.isHardwareKeyStoreAvailable();
    }
    inline bool getIsLowRamDevice() noexcept override {
      return _swiftPart.isLowRamDevice();
    }
    inline bool getIsDisplayZoomed() noexcept override {
      return _swiftPart.isDisplayZoomed();
    }
    inline bool getIsLiquidGlassAvailable() noexcept override {
      return _swiftPart.isLiquidGlassAvailable();
    }
    inline double getTotalMemory() noexcept override {
      return _swiftPart.getTotalMemory();
    }
    inline double getMaxMemory() noexcept override {
      return _swiftPart.getMaxMemory();
    }
    inline double getTotalDiskCapacity() noexcept override {
      return _swiftPart.getTotalDiskCapacity();
    }
    inline double getStartupTime() noexcept override {
      return _swiftPart.getStartupTime();
    }
    inline std::string getVersion() noexcept override {
      auto __result = _swiftPart.getVersion();
      return __result;
    }
    inline std::string getBuildNumber() noexcept override {
      auto __result = _swiftPart.getBuildNumber();
      return __result;
    }
    inline std::string getBundleId() noexcept override {
      auto __result = _swiftPart.getBundleId();
      return __result;
    }
    inline std::string getApplicationName() noexcept override {
      auto __result = _swiftPart.getApplicationName();
      return __result;
    }
    inline std::string getReadableVersion() noexcept override {
      auto __result = _swiftPart.getReadableVersion();
      return __result;
    }
    inline double getFirstInstallTimeSync() noexcept override {
      return _swiftPart.getFirstInstallTimeSync();
    }
    inline double getLastUpdateTimeSync() noexcept override {
      return _swiftPart.getLastUpdateTimeSync();
    }
    inline bool getCarrierAllowsVOIP() noexcept override {
      return _swiftPart.getCarrierAllowsVOIP();
    }
    inline std::string getCarrierIsoCountryCode() noexcept override {
      auto __result = _swiftPart.getCarrierIsoCountryCode();
      return __result;
    }
    inline std::string getMobileCountryCode() noexcept override {
      auto __result = _swiftPart.getMobileCountryCode();
      return __result;
    }
    inline std::string getMobileNetworkCode() noexcept override {
      auto __result = _swiftPart.getMobileNetworkCode();
      return __result;
    }
    inline std::string getMobileNetworkOperator() noexcept override {
      auto __result = _swiftPart.getMobileNetworkOperator();
      return __result;
    }
    inline std::string getSystemLanguage() noexcept override {
      auto __result = _swiftPart.getSystemLanguage();
      return __result;
    }
    inline std::vector<std::string> getSupportedAbis() noexcept override {
      auto __result = _swiftPart.getSupportedAbis();
      return __result;
    }
    inline std::vector<std::string> getSupported32BitAbis() noexcept override {
      auto __result = _swiftPart.getSupported32BitAbis();
      return __result;
    }
    inline std::vector<std::string> getSupported64BitAbis() noexcept override {
      auto __result = _swiftPart.getSupported64BitAbis();
      return __result;
    }
    inline double getApiLevel() noexcept override {
      return _swiftPart.getApiLevel();
    }
    inline NavigationMode getNavigationMode() noexcept override {
      auto __result = _swiftPart.getNavigationMode();
      return static_cast<NavigationMode>(__result);
    }
    inline std::vector<std::string> getSystemAvailableFeatures() noexcept override {
      auto __result = _swiftPart.getSystemAvailableFeatures();
      return __result;
    }
    inline std::vector<std::string> getSupportedMediaTypeList() noexcept override {
      auto __result = _swiftPart.getSupportedMediaTypeList();
      return __result;
    }
    inline std::string getSerialNumber() noexcept override {
      auto __result = _swiftPart.getSerialNumber();
      return __result;
    }
    inline std::string getAndroidId() noexcept override {
      auto __result = _swiftPart.getAndroidId();
      return __result;
    }
    inline double getPreviewSdkInt() noexcept override {
      return _swiftPart.getPreviewSdkInt();
    }
    inline std::string getSecurityPatch() noexcept override {
      auto __result = _swiftPart.getSecurityPatch();
      return __result;
    }
    inline std::string getCodename() noexcept override {
      auto __result = _swiftPart.getCodename();
      return __result;
    }
    inline std::string getIncremental() noexcept override {
      auto __result = _swiftPart.getIncremental();
      return __result;
    }
    inline std::string getBoard() noexcept override {
      auto __result = _swiftPart.getBoard();
      return __result;
    }
    inline std::string getBootloader() noexcept override {
      auto __result = _swiftPart.getBootloader();
      return __result;
    }
    inline std::string getDevice() noexcept override {
      auto __result = _swiftPart.getDevice();
      return __result;
    }
    inline std::string getDisplay() noexcept override {
      auto __result = _swiftPart.getDisplay();
      return __result;
    }
    inline std::string getFingerprint() noexcept override {
      auto __result = _swiftPart.getFingerprint();
      return __result;
    }
    inline std::string getHardware() noexcept override {
      auto __result = _swiftPart.getHardware();
      return __result;
    }
    inline std::string getHost() noexcept override {
      auto __result = _swiftPart.getHost();
      return __result;
    }
    inline std::string getProduct() noexcept override {
      auto __result = _swiftPart.getProduct();
      return __result;
    }
    inline std::string getTags() noexcept override {
      auto __result = _swiftPart.getTags();
      return __result;
    }
    inline std::string getType() noexcept override {
      auto __result = _swiftPart.getType();
      return __result;
    }
    inline std::string getBaseOs() noexcept override {
      auto __result = _swiftPart.getBaseOs();
      return __result;
    }
    inline std::string getRadioVersion() noexcept override {
      auto __result = _swiftPart.getRadioVersion();
      return __result;
    }
    inline std::string getBuildId() noexcept override {
      auto __result = _swiftPart.getBuildId();
      return __result;
    }
    inline std::string getInstallerPackageName() noexcept override {
      auto __result = _swiftPart.getInstallerPackageName();
      return __result;
    }
    inline double getTotalDiskCapacityOld() noexcept override {
      return _swiftPart.getTotalDiskCapacityOld();
    }
    inline bool getIsMouseConnected() noexcept override {
      return _swiftPart.isMouseConnected();
    }
    inline bool getIsKeyboardConnected() noexcept override {
      return _swiftPart.isKeyboardConnected();
    }
    inline std::vector<std::string> getHostNames() noexcept override {
      auto __result = _swiftPart.getHostNames();
      return __result;
    }
    inline bool getIsTabletMode() noexcept override {
      return _swiftPart.isTabletMode();
    }

  public:
    // Methods
    inline bool getHasNotch() override {
      auto __result = _swiftPart.getHasNotch();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool getHasDynamicIsland() override {
      auto __result = _swiftPart.getHasDynamicIsland();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool getIsLandscape() override {
      auto __result = _swiftPart.getIsLandscape();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline double getBrightness() override {
      auto __result = _swiftPart.getBrightness();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline double getFontScale() override {
      auto __result = _swiftPart.getFontScale();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline double getUsedMemory() override {
      auto __result = _swiftPart.getUsedMemory();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline double getFreeDiskStorage() override {
      auto __result = _swiftPart.getFreeDiskStorage();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline double getUptime() override {
      auto __result = _swiftPart.getUptime();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline double getBatteryLevel() override {
      auto __result = _swiftPart.getBatteryLevel();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline PowerState getPowerState() override {
      auto __result = _swiftPart.getPowerState();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool getIsBatteryCharging() override {
      auto __result = _swiftPart.getIsBatteryCharging();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool isLowBatteryLevel(double threshold) override {
      auto __result = _swiftPart.isLowBatteryLevel(std::forward<decltype(threshold)>(threshold));
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<double>> getFirstInstallTime() override {
      auto __result = _swiftPart.getFirstInstallTime();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<double>> getLastUpdateTime() override {
      auto __result = _swiftPart.getLastUpdateTime();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<std::string>> getIpAddress() override {
      auto __result = _swiftPart.getIpAddress();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::string getIpAddressSync() override {
      auto __result = _swiftPart.getIpAddressSync();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<std::string>> getMacAddress() override {
      auto __result = _swiftPart.getMacAddress();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::string getMacAddressSync() override {
      auto __result = _swiftPart.getMacAddressSync();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<std::string>> getUserAgent() override {
      auto __result = _swiftPart.getUserAgent();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool getIsAirplaneMode() override {
      auto __result = _swiftPart.getIsAirplaneMode();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<std::string>> getCarrier() override {
      auto __result = _swiftPart.getCarrier();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::string getCarrierSync() override {
      auto __result = _swiftPart.getCarrierSync();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<bool>> isHeadphonesConnected() override {
      auto __result = _swiftPart.isHeadphonesConnected();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool getIsHeadphonesConnected() override {
      auto __result = _swiftPart.getIsHeadphonesConnected();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool getIsWiredHeadphonesConnected() override {
      auto __result = _swiftPart.getIsWiredHeadphonesConnected();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool getIsBluetoothHeadphonesConnected() override {
      auto __result = _swiftPart.getIsBluetoothHeadphonesConnected();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<bool>> isLocationEnabled() override {
      auto __result = _swiftPart.isLocationEnabled();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool getIsLocationEnabled() override {
      auto __result = _swiftPart.getIsLocationEnabled();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::vector<std::string> getAvailableLocationProviders() override {
      auto __result = _swiftPart.getAvailableLocationProviders();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool getHasGms() override {
      auto __result = _swiftPart.getHasGms();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool getHasHms() override {
      auto __result = _swiftPart.getHasHms();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool hasSystemFeature(const std::string& feature) override {
      auto __result = _swiftPart.hasSystemFeature(feature);
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<std::string>> getDeviceToken() override {
      auto __result = _swiftPart.getDeviceToken();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<std::string>> syncUniqueId() override {
      auto __result = _swiftPart.syncUniqueId();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<std::string>> getInstallReferrer() override {
      auto __result = _swiftPart.getInstallReferrer();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool isSideLoadingEnabled() override {
      auto __result = _swiftPart.isSideLoadingEnabled();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline double getFreeDiskStorageOld() override {
      auto __result = _swiftPart.getFreeDiskStorageOld();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool isDeviceCompromised() override {
      auto __result = _swiftPart.isDeviceCompromised();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline std::shared_ptr<Promise<bool>> verifyDeviceIntegrity() override {
      auto __result = _swiftPart.verifyDeviceIntegrity();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }

  private:
    NitroDeviceInfo::HybridDeviceInfoSpec_cxx _swiftPart;
  };

} // namespace margelo::nitro::nitrodeviceinfo
