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

import Foundation
import NitroModules

/// See ``HybridNetworkSpec``
public protocol HybridNetworkSpec_protocol: AnyObject {
  // Properties
  

  // Methods
  func request(opts: RequestOptions) throws -> Promise<Void>
}

/// See ``HybridNetworkSpec``
public class HybridNetworkSpec_base: HybridObjectSpec {
  private weak var cxxWrapper: HybridNetworkSpec_cxx? = nil
  public func getCxxWrapper() -> HybridNetworkSpec_cxx {
  #if DEBUG
    guard self is HybridNetworkSpec else {
      fatalError("`self` is not a `HybridNetworkSpec`! Did you accidentally inherit from `HybridNetworkSpec_base` instead of `HybridNetworkSpec`?")
    }
  #endif
    if let cxxWrapper = self.cxxWrapper {
      return cxxWrapper
    } else {
      let cxxWrapper = HybridNetworkSpec_cxx(self as! HybridNetworkSpec)
      self.cxxWrapper = cxxWrapper
      return cxxWrapper
    }
  }
  public var memorySize: Int { return 0 }
}

/**
 * A Swift base-protocol representing the Network HybridObject.
 * Implement this protocol to create Swift-based instances of Network.
 * ```swift
 * class HybridNetwork : HybridNetworkSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridNetworkSpec = HybridNetworkSpec_protocol & HybridNetworkSpec_base
