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

#pragma once

#if __has_include(<NitroModules/HybridObject.hpp>)
#include <NitroModules/HybridObject.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif

// Forward declaration of `RequestOptions` to properly resolve imports.
namespace margelo::nitro::fastio { struct RequestOptions; }

#include <NitroModules/Promise.hpp>
#include "RequestOptions.hpp"

namespace margelo::nitro::fastio {

  using namespace margelo::nitro;

  /**
   * An abstract base class for `Network`
   * Inherit this class to create instances of `HybridNetworkSpec` in C++.
   * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
   * @example
   * ```cpp
   * class HybridNetwork: public HybridNetworkSpec {
   * public:
   *   HybridNetwork(...): HybridObject(TAG) { ... }
   *   // ...
   * };
   * ```
   */
  class HybridNetworkSpec: public virtual HybridObject {
    public:
      // Constructor
      explicit HybridNetworkSpec(): HybridObject(TAG) { }

      // Destructor
      virtual ~HybridNetworkSpec() { }

    public:
      // Properties
      

    public:
      // Methods
      virtual std::shared_ptr<Promise<void>> request(const RequestOptions& opts) = 0;

    protected:
      // Hybrid Setup
      void loadHybridMethods() override;

    protected:
      // Tag for logging
      static constexpr auto TAG = "Network";
  };

} // namespace margelo::nitro::fastio
