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

import NitroModules

/// See ``HybridNitroOtaSpec``
public protocol HybridNitroOtaSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func checkForUpdates(versionCheckUrl: String) throws -> Promise<Bool>
  func downloadZipFromUrl(downloadUrl: String, onProgress: Variant_NullType____received__Double____total__Double_____Void?, bundleFilePath: Variant_NullType_String?) throws -> Promise<String>
  func getStoredOtaVersion() throws -> Variant_NullType_String
  func getStoredUnzippedPath() throws -> Variant_NullType_String
  func reloadApp() throws -> Void
  func scheduleBackgroundOTACheck(versionCheckUrl: String, downloadUrl: Variant_NullType_String?, interval: Double) throws -> Void
  func rollbackToPreviousBundle() throws -> Promise<Bool>
  func confirmBundle() throws -> Void
  func getBlacklistedVersions() throws -> Promise<String>
  func getRollbackHistory() throws -> Promise<String>
  func markCurrentBundleAsBad(reason: String) throws -> Promise<Void>
  func getNotifiedRollbackCount() throws -> Double
  func acknowledgeRollbackHistory() throws -> Void
}

public extension HybridNitroOtaSpec_protocol {
  /// Default implementation of ``HybridObject.toString``
  func toString() -> String {
    return "[HybridObject NitroOta]"
  }
}

/// See ``HybridNitroOtaSpec``
open class HybridNitroOtaSpec_base {
  private weak var cxxWrapper: HybridNitroOtaSpec_cxx? = nil
  public init() { }
  public func getCxxWrapper() -> HybridNitroOtaSpec_cxx {
  #if DEBUG
    guard self is any HybridNitroOtaSpec else {
      fatalError("`self` is not a `HybridNitroOtaSpec`! Did you accidentally inherit from `HybridNitroOtaSpec_base` instead of `HybridNitroOtaSpec`?")
    }
  #endif
    if let cxxWrapper = self.cxxWrapper {
      return cxxWrapper
    } else {
      let cxxWrapper = HybridNitroOtaSpec_cxx(self as! any HybridNitroOtaSpec)
      self.cxxWrapper = cxxWrapper
      return cxxWrapper
    }
  }
}

/**
 * A Swift base-protocol representing the NitroOta HybridObject.
 * Implement this protocol to create Swift-based instances of NitroOta.
 * ```swift
 * class HybridNitroOta : HybridNitroOtaSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridNitroOtaSpec = HybridNitroOtaSpec_protocol & HybridNitroOtaSpec_base
