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

#pragma once

#include "HybridCameraDeviceSpec.hpp"

// Forward declaration of `HybridCameraDeviceSpec_cxx` to properly resolve imports.
namespace VisionCamera { class HybridCameraDeviceSpec_cxx; }

// Forward declaration of `DeviceType` to properly resolve imports.
namespace margelo::nitro::camera { enum class DeviceType; }
// Forward declaration of `CameraPosition` to properly resolve imports.
namespace margelo::nitro::camera { enum class CameraPosition; }
// Forward declaration of `HybridCameraDeviceSpec` to properly resolve imports.
namespace margelo::nitro::camera { class HybridCameraDeviceSpec; }
// Forward declaration of `PixelFormat` to properly resolve imports.
namespace margelo::nitro::camera { enum class PixelFormat; }
// Forward declaration of `DynamicRange` to properly resolve imports.
namespace margelo::nitro::camera { struct DynamicRange; }
// Forward declaration of `DynamicRangeBitDepth` to properly resolve imports.
namespace margelo::nitro::camera { enum class DynamicRangeBitDepth; }
// Forward declaration of `ColorSpace` to properly resolve imports.
namespace margelo::nitro::camera { enum class ColorSpace; }
// Forward declaration of `ColorRange` to properly resolve imports.
namespace margelo::nitro::camera { enum class ColorRange; }
// Forward declaration of `Range` to properly resolve imports.
namespace margelo::nitro::camera { struct Range; }
// Forward declaration of `MediaType` to properly resolve imports.
namespace margelo::nitro::camera { enum class MediaType; }
// Forward declaration of `Size` to properly resolve imports.
namespace margelo::nitro::camera { struct Size; }
// Forward declaration of `OutputStreamType` to properly resolve imports.
namespace margelo::nitro::camera { enum class OutputStreamType; }
// Forward declaration of `HybridCameraOutputSpec` to properly resolve imports.
namespace margelo::nitro::camera { class HybridCameraOutputSpec; }
// Forward declaration of `TargetStabilizationMode` to properly resolve imports.
namespace margelo::nitro::camera { enum class TargetStabilizationMode; }
// Forward declaration of `HybridCameraSessionConfigSpec` to properly resolve imports.
namespace margelo::nitro::camera { class HybridCameraSessionConfigSpec; }

#include <string>
#include "DeviceType.hpp"
#include "CameraPosition.hpp"
#include <memory>
#include "HybridCameraDeviceSpec.hpp"
#include <vector>
#include "PixelFormat.hpp"
#include "DynamicRange.hpp"
#include "DynamicRangeBitDepth.hpp"
#include "ColorSpace.hpp"
#include "ColorRange.hpp"
#include "Range.hpp"
#include <optional>
#include "MediaType.hpp"
#include "Size.hpp"
#include "OutputStreamType.hpp"
#include "HybridCameraOutputSpec.hpp"
#include "TargetStabilizationMode.hpp"
#include "HybridCameraSessionConfigSpec.hpp"

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

namespace margelo::nitro::camera {

  /**
   * The C++ part of HybridCameraDeviceSpec_cxx.swift.
   *
   * HybridCameraDeviceSpecSwift (C++) accesses HybridCameraDeviceSpec_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, HybridCameraDeviceSpec_cxx can directly inherit from the C++ class HybridCameraDeviceSpec
   * to simplify the whole structure and memory management.
   */
  class HybridCameraDeviceSpecSwift: public virtual HybridCameraDeviceSpec {
  public:
    // Constructor from a Swift instance
    explicit HybridCameraDeviceSpecSwift(const VisionCamera::HybridCameraDeviceSpec_cxx& swiftPart):
      HybridObject(HybridCameraDeviceSpec::TAG),
      _swiftPart(swiftPart) { }

  public:
    // Get the Swift part
    inline VisionCamera::HybridCameraDeviceSpec_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<HybridCameraDeviceSpecSwift>(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 getId() noexcept override {
      auto __result = _swiftPart.getId();
      return __result;
    }
    inline std::string getModelID() noexcept override {
      auto __result = _swiftPart.getModelID();
      return __result;
    }
    inline std::string getLocalizedName() noexcept override {
      auto __result = _swiftPart.getLocalizedName();
      return __result;
    }
    inline std::string getManufacturer() noexcept override {
      auto __result = _swiftPart.getManufacturer();
      return __result;
    }
    inline DeviceType getType() noexcept override {
      auto __result = _swiftPart.getType();
      return static_cast<DeviceType>(__result);
    }
    inline CameraPosition getPosition() noexcept override {
      auto __result = _swiftPart.getPosition();
      return static_cast<CameraPosition>(__result);
    }
    inline std::vector<std::shared_ptr<HybridCameraDeviceSpec>> getPhysicalDevices() noexcept override {
      auto __result = _swiftPart.getPhysicalDevices();
      return __result;
    }
    inline bool getIsVirtualDevice() noexcept override {
      return _swiftPart.isVirtualDevice();
    }
    inline std::vector<PixelFormat> getSupportedPixelFormats() noexcept override {
      auto __result = _swiftPart.getSupportedPixelFormats();
      return __result;
    }
    inline bool getSupportsPhotoHDR() noexcept override {
      return _swiftPart.getSupportsPhotoHDR();
    }
    inline std::vector<DynamicRange> getSupportedVideoDynamicRanges() noexcept override {
      auto __result = _swiftPart.getSupportedVideoDynamicRanges();
      return __result;
    }
    inline std::vector<Range> getSupportedFPSRanges() noexcept override {
      auto __result = _swiftPart.getSupportedFPSRanges();
      return __result;
    }
    inline bool getSupportsPreviewImage() noexcept override {
      return _swiftPart.getSupportsPreviewImage();
    }
    inline bool getSupportsSpeedQualityPrioritization() noexcept override {
      return _swiftPart.getSupportsSpeedQualityPrioritization();
    }
    inline std::optional<double> getFocalLength() noexcept override {
      auto __result = _swiftPart.getFocalLength();
      return __result;
    }
    inline double getLensAperture() noexcept override {
      return _swiftPart.getLensAperture();
    }
    inline bool getIsContinuityCamera() noexcept override {
      return _swiftPart.isContinuityCamera();
    }
    inline std::optional<std::shared_ptr<HybridCameraDeviceSpec>> getCompanionDeskViewCamera() noexcept override {
      auto __result = _swiftPart.getCompanionDeskViewCamera();
      return __result;
    }
    inline std::vector<MediaType> getMediaTypes() noexcept override {
      auto __result = _swiftPart.getMediaTypes();
      return __result;
    }
    inline bool getSupportsFocusMetering() noexcept override {
      return _swiftPart.getSupportsFocusMetering();
    }
    inline bool getSupportsFocusLocking() noexcept override {
      return _swiftPart.getSupportsFocusLocking();
    }
    inline bool getSupportsSmoothAutoFocus() noexcept override {
      return _swiftPart.getSupportsSmoothAutoFocus();
    }
    inline bool getSupportsExposureMetering() noexcept override {
      return _swiftPart.getSupportsExposureMetering();
    }
    inline bool getSupportsExposureLocking() noexcept override {
      return _swiftPart.getSupportsExposureLocking();
    }
    inline bool getSupportsExposureBias() noexcept override {
      return _swiftPart.getSupportsExposureBias();
    }
    inline double getMinExposureBias() noexcept override {
      return _swiftPart.getMinExposureBias();
    }
    inline double getMaxExposureBias() noexcept override {
      return _swiftPart.getMaxExposureBias();
    }
    inline bool getSupportsWhiteBalanceMetering() noexcept override {
      return _swiftPart.getSupportsWhiteBalanceMetering();
    }
    inline double getMaxWhiteBalanceGain() noexcept override {
      return _swiftPart.getMaxWhiteBalanceGain();
    }
    inline bool getSupportsWhiteBalanceLocking() noexcept override {
      return _swiftPart.getSupportsWhiteBalanceLocking();
    }
    inline bool getHasFlash() noexcept override {
      return _swiftPart.hasFlash();
    }
    inline bool getHasTorch() noexcept override {
      return _swiftPart.hasTorch();
    }
    inline bool getSupportsTorchStrength() noexcept override {
      return _swiftPart.getSupportsTorchStrength();
    }
    inline double getMinTorchStrength() noexcept override {
      return _swiftPart.getMinTorchStrength();
    }
    inline double getMaxTorchStrength() noexcept override {
      return _swiftPart.getMaxTorchStrength();
    }
    inline bool getSupportsLowLightBoost() noexcept override {
      return _swiftPart.getSupportsLowLightBoost();
    }
    inline double getMinZoom() noexcept override {
      return _swiftPart.getMinZoom();
    }
    inline double getMaxZoom() noexcept override {
      return _swiftPart.getMaxZoom();
    }
    inline std::vector<double> getZoomLensSwitchFactors() noexcept override {
      auto __result = _swiftPart.getZoomLensSwitchFactors();
      return __result;
    }
    inline bool getSupportsDistortionCorrection() noexcept override {
      return _swiftPart.getSupportsDistortionCorrection();
    }

  public:
    // Methods
    inline std::vector<Size> getSupportedResolutions(OutputStreamType outputStreamType) override {
      auto __result = _swiftPart.getSupportedResolutions(static_cast<int>(outputStreamType));
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool supportsOutput(const std::shared_ptr<HybridCameraOutputSpec>& output) override {
      auto __result = _swiftPart.supportsOutput(output);
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool supportsFPS(double fps) override {
      auto __result = _swiftPart.supportsFPS(std::forward<decltype(fps)>(fps));
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool supportsVideoStabilizationMode(TargetStabilizationMode videoStabilizationMode) override {
      auto __result = _swiftPart.supportsVideoStabilizationMode(static_cast<int>(videoStabilizationMode));
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool supportsPreviewStabilizationMode(TargetStabilizationMode previewStabilizationMode) override {
      auto __result = _swiftPart.supportsPreviewStabilizationMode(static_cast<int>(previewStabilizationMode));
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline bool isSessionConfigSupported(const std::shared_ptr<HybridCameraSessionConfigSpec>& config) override {
      auto __result = _swiftPart.isSessionConfigSupported(config);
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }

  private:
    VisionCamera::HybridCameraDeviceSpec_cxx _swiftPart;
  };

} // namespace margelo::nitro::camera
