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

#pragma once

// Forward declarations of C++ defined types
// Forward declaration of `HybridClarionAzureSpec` to properly resolve imports.
namespace margelo::nitro::clarion::azure { class HybridClarionAzureSpec; }
// Forward declaration of `NativeAzureError` to properly resolve imports.
namespace margelo::nitro::clarion::azure { struct NativeAzureError; }
// Forward declaration of `NativeTranscriptResult` to properly resolve imports.
namespace margelo::nitro::clarion::azure { struct NativeTranscriptResult; }
// Forward declaration of `NativeTranscriptSegment` to properly resolve imports.
namespace margelo::nitro::clarion::azure { struct NativeTranscriptSegment; }

// Forward declarations of Swift defined types
// Forward declaration of `HybridClarionAzureSpec_cxx` to properly resolve imports.
namespace ClarionAzure { class HybridClarionAzureSpec_cxx; }

// Include C++ defined types
#include "HybridClarionAzureSpec.hpp"
#include "NativeAzureError.hpp"
#include "NativeTranscriptResult.hpp"
#include "NativeTranscriptSegment.hpp"
#include <NitroModules/Promise.hpp>
#include <NitroModules/PromiseHolder.hpp>
#include <NitroModules/Result.hpp>
#include <exception>
#include <functional>
#include <memory>
#include <string>
#include <vector>

/**
 * Contains specialized versions of C++ templated types so they can be accessed from Swift,
 * as well as helper functions to interact with those C++ types from Swift.
 */
namespace margelo::nitro::clarion::azure::bridge::swift {

  // pragma MARK: std::shared_ptr<Promise<bool>>
  /**
   * Specialized version of `std::shared_ptr<Promise<bool>>`.
   */
  using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
  inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
    return Promise<bool>::create();
  }
  inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
    return PromiseHolder<bool>(std::move(promise));
  }
  
  // pragma MARK: std::function<void(bool /* result */)>
  /**
   * Specialized version of `std::function<void(bool)>`.
   */
  using Func_void_bool = std::function<void(bool /* result */)>;
  /**
   * Wrapper class for a `std::function<void(bool / * result * /)>`, this can be used from Swift.
   */
  class Func_void_bool_Wrapper final {
  public:
    explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::make_unique<std::function<void(bool /* result */)>>(std::move(func))) {}
    inline void call(bool result) const noexcept {
      _function->operator()(result);
    }
  private:
    std::unique_ptr<std::function<void(bool /* result */)>> _function;
  } SWIFT_NONCOPYABLE;
  Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
  inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
    return Func_void_bool_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
  /**
   * Specialized version of `std::function<void(const std::exception_ptr&)>`.
   */
  using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
  /**
   * Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
   */
  class Func_void_std__exception_ptr_Wrapper final {
  public:
    explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::make_unique<std::function<void(const std::exception_ptr& /* error */)>>(std::move(func))) {}
    inline void call(std::exception_ptr error) const noexcept {
      _function->operator()(error);
    }
  private:
    std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
  } SWIFT_NONCOPYABLE;
  Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
  inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
    return Func_void_std__exception_ptr_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::shared_ptr<Promise<void>>
  /**
   * Specialized version of `std::shared_ptr<Promise<void>>`.
   */
  using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
  inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
    return Promise<void>::create();
  }
  inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
    return PromiseHolder<void>(std::move(promise));
  }
  
  // pragma MARK: std::function<void()>
  /**
   * Specialized version of `std::function<void()>`.
   */
  using Func_void = std::function<void()>;
  /**
   * Wrapper class for a `std::function<void()>`, this can be used from Swift.
   */
  class Func_void_Wrapper final {
  public:
    explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_unique<std::function<void()>>(std::move(func))) {}
    inline void call() const noexcept {
      _function->operator()();
    }
  private:
    std::unique_ptr<std::function<void()>> _function;
  } SWIFT_NONCOPYABLE;
  Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
  inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
    return Func_void_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::vector<std::string>
  /**
   * Specialized version of `std::vector<std::string>`.
   */
  using std__vector_std__string_ = std::vector<std::string>;
  inline std::vector<std::string> create_std__vector_std__string_(size_t size) noexcept {
    std::vector<std::string> vector;
    vector.reserve(size);
    return vector;
  }
  
  // pragma MARK: std::vector<NativeTranscriptSegment>
  /**
   * Specialized version of `std::vector<NativeTranscriptSegment>`.
   */
  using std__vector_NativeTranscriptSegment_ = std::vector<NativeTranscriptSegment>;
  inline std::vector<NativeTranscriptSegment> create_std__vector_NativeTranscriptSegment_(size_t size) noexcept {
    std::vector<NativeTranscriptSegment> vector;
    vector.reserve(size);
    return vector;
  }
  
  // pragma MARK: std::shared_ptr<Promise<NativeTranscriptResult>>
  /**
   * Specialized version of `std::shared_ptr<Promise<NativeTranscriptResult>>`.
   */
  using std__shared_ptr_Promise_NativeTranscriptResult__ = std::shared_ptr<Promise<NativeTranscriptResult>>;
  inline std::shared_ptr<Promise<NativeTranscriptResult>> create_std__shared_ptr_Promise_NativeTranscriptResult__() noexcept {
    return Promise<NativeTranscriptResult>::create();
  }
  inline PromiseHolder<NativeTranscriptResult> wrap_std__shared_ptr_Promise_NativeTranscriptResult__(std::shared_ptr<Promise<NativeTranscriptResult>> promise) noexcept {
    return PromiseHolder<NativeTranscriptResult>(std::move(promise));
  }
  
  // pragma MARK: std::function<void(const NativeTranscriptResult& /* result */)>
  /**
   * Specialized version of `std::function<void(const NativeTranscriptResult&)>`.
   */
  using Func_void_NativeTranscriptResult = std::function<void(const NativeTranscriptResult& /* result */)>;
  /**
   * Wrapper class for a `std::function<void(const NativeTranscriptResult& / * result * /)>`, this can be used from Swift.
   */
  class Func_void_NativeTranscriptResult_Wrapper final {
  public:
    explicit Func_void_NativeTranscriptResult_Wrapper(std::function<void(const NativeTranscriptResult& /* result */)>&& func): _function(std::make_unique<std::function<void(const NativeTranscriptResult& /* result */)>>(std::move(func))) {}
    inline void call(NativeTranscriptResult result) const noexcept {
      _function->operator()(result);
    }
  private:
    std::unique_ptr<std::function<void(const NativeTranscriptResult& /* result */)>> _function;
  } SWIFT_NONCOPYABLE;
  Func_void_NativeTranscriptResult create_Func_void_NativeTranscriptResult(void* NON_NULL swiftClosureWrapper) noexcept;
  inline Func_void_NativeTranscriptResult_Wrapper wrap_Func_void_NativeTranscriptResult(Func_void_NativeTranscriptResult value) noexcept {
    return Func_void_NativeTranscriptResult_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::function<void(const std::string& /* state */)>
  /**
   * Specialized version of `std::function<void(const std::string&)>`.
   */
  using Func_void_std__string = std::function<void(const std::string& /* state */)>;
  /**
   * Wrapper class for a `std::function<void(const std::string& / * state * /)>`, this can be used from Swift.
   */
  class Func_void_std__string_Wrapper final {
  public:
    explicit Func_void_std__string_Wrapper(std::function<void(const std::string& /* state */)>&& func): _function(std::make_unique<std::function<void(const std::string& /* state */)>>(std::move(func))) {}
    inline void call(std::string state) const noexcept {
      _function->operator()(state);
    }
  private:
    std::unique_ptr<std::function<void(const std::string& /* state */)>> _function;
  } SWIFT_NONCOPYABLE;
  Func_void_std__string create_Func_void_std__string(void* NON_NULL swiftClosureWrapper) noexcept;
  inline Func_void_std__string_Wrapper wrap_Func_void_std__string(Func_void_std__string value) noexcept {
    return Func_void_std__string_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::function<void(double /* rms */, double /* peak */)>
  /**
   * Specialized version of `std::function<void(double, double)>`.
   */
  using Func_void_double_double = std::function<void(double /* rms */, double /* peak */)>;
  /**
   * Wrapper class for a `std::function<void(double / * rms * /, double / * peak * /)>`, this can be used from Swift.
   */
  class Func_void_double_double_Wrapper final {
  public:
    explicit Func_void_double_double_Wrapper(std::function<void(double /* rms */, double /* peak */)>&& func): _function(std::make_unique<std::function<void(double /* rms */, double /* peak */)>>(std::move(func))) {}
    inline void call(double rms, double peak) const noexcept {
      _function->operator()(rms, peak);
    }
  private:
    std::unique_ptr<std::function<void(double /* rms */, double /* peak */)>> _function;
  } SWIFT_NONCOPYABLE;
  Func_void_double_double create_Func_void_double_double(void* NON_NULL swiftClosureWrapper) noexcept;
  inline Func_void_double_double_Wrapper wrap_Func_void_double_double(Func_void_double_double value) noexcept {
    return Func_void_double_double_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::function<void(const NativeAzureError& /* error */)>
  /**
   * Specialized version of `std::function<void(const NativeAzureError&)>`.
   */
  using Func_void_NativeAzureError = std::function<void(const NativeAzureError& /* error */)>;
  /**
   * Wrapper class for a `std::function<void(const NativeAzureError& / * error * /)>`, this can be used from Swift.
   */
  class Func_void_NativeAzureError_Wrapper final {
  public:
    explicit Func_void_NativeAzureError_Wrapper(std::function<void(const NativeAzureError& /* error */)>&& func): _function(std::make_unique<std::function<void(const NativeAzureError& /* error */)>>(std::move(func))) {}
    inline void call(NativeAzureError error) const noexcept {
      _function->operator()(error);
    }
  private:
    std::unique_ptr<std::function<void(const NativeAzureError& /* error */)>> _function;
  } SWIFT_NONCOPYABLE;
  Func_void_NativeAzureError create_Func_void_NativeAzureError(void* NON_NULL swiftClosureWrapper) noexcept;
  inline Func_void_NativeAzureError_Wrapper wrap_Func_void_NativeAzureError(Func_void_NativeAzureError value) noexcept {
    return Func_void_NativeAzureError_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::function<void(const std::string& /* kind */, double /* offsetMs */)>
  /**
   * Specialized version of `std::function<void(const std::string&, double)>`.
   */
  using Func_void_std__string_double = std::function<void(const std::string& /* kind */, double /* offsetMs */)>;
  /**
   * Wrapper class for a `std::function<void(const std::string& / * kind * /, double / * offsetMs * /)>`, this can be used from Swift.
   */
  class Func_void_std__string_double_Wrapper final {
  public:
    explicit Func_void_std__string_double_Wrapper(std::function<void(const std::string& /* kind */, double /* offsetMs */)>&& func): _function(std::make_unique<std::function<void(const std::string& /* kind */, double /* offsetMs */)>>(std::move(func))) {}
    inline void call(std::string kind, double offsetMs) const noexcept {
      _function->operator()(kind, offsetMs);
    }
  private:
    std::unique_ptr<std::function<void(const std::string& /* kind */, double /* offsetMs */)>> _function;
  } SWIFT_NONCOPYABLE;
  Func_void_std__string_double create_Func_void_std__string_double(void* NON_NULL swiftClosureWrapper) noexcept;
  inline Func_void_std__string_double_Wrapper wrap_Func_void_std__string_double(Func_void_std__string_double value) noexcept {
    return Func_void_std__string_double_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::shared_ptr<HybridClarionAzureSpec>
  /**
   * Specialized version of `std::shared_ptr<HybridClarionAzureSpec>`.
   */
  using std__shared_ptr_HybridClarionAzureSpec_ = std::shared_ptr<HybridClarionAzureSpec>;
  std::shared_ptr<HybridClarionAzureSpec> create_std__shared_ptr_HybridClarionAzureSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
  void* NON_NULL get_std__shared_ptr_HybridClarionAzureSpec_(std__shared_ptr_HybridClarionAzureSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<HybridClarionAzureSpec>
  using std__weak_ptr_HybridClarionAzureSpec_ = std::weak_ptr<HybridClarionAzureSpec>;
  inline std__weak_ptr_HybridClarionAzureSpec_ weakify_std__shared_ptr_HybridClarionAzureSpec_(const std::shared_ptr<HybridClarionAzureSpec>& strong) noexcept { return strong; }
  
  // pragma MARK: Result<std::shared_ptr<Promise<bool>>>
  using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
  inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
    return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
  }
  inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
    return Result<std::shared_ptr<Promise<bool>>>::withError(error);
  }
  
  // pragma MARK: Result<std::shared_ptr<Promise<void>>>
  using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
  inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
    return Result<std::shared_ptr<Promise<void>>>::withValue(value);
  }
  inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
    return Result<std::shared_ptr<Promise<void>>>::withError(error);
  }
  
  // pragma MARK: Result<std::shared_ptr<Promise<NativeTranscriptResult>>>
  using Result_std__shared_ptr_Promise_NativeTranscriptResult___ = Result<std::shared_ptr<Promise<NativeTranscriptResult>>>;
  inline Result_std__shared_ptr_Promise_NativeTranscriptResult___ create_Result_std__shared_ptr_Promise_NativeTranscriptResult___(const std::shared_ptr<Promise<NativeTranscriptResult>>& value) noexcept {
    return Result<std::shared_ptr<Promise<NativeTranscriptResult>>>::withValue(value);
  }
  inline Result_std__shared_ptr_Promise_NativeTranscriptResult___ create_Result_std__shared_ptr_Promise_NativeTranscriptResult___(const std::exception_ptr& error) noexcept {
    return Result<std::shared_ptr<Promise<NativeTranscriptResult>>>::withError(error);
  }
  
  // pragma MARK: Result<double>
  using Result_double_ = Result<double>;
  inline Result_double_ create_Result_double_(double value) noexcept {
    return Result<double>::withValue(std::move(value));
  }
  inline Result_double_ create_Result_double_(const std::exception_ptr& error) noexcept {
    return Result<double>::withError(error);
  }
  
  // pragma MARK: Result<void>
  using Result_void_ = Result<void>;
  inline Result_void_ create_Result_void_() noexcept {
    return Result<void>::withValue();
  }
  inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
    return Result<void>::withError(error);
  }

} // namespace margelo::nitro::clarion::azure::bridge::swift
