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

import NitroModules

/// See ``HybridNativeStorageSpec``
public protocol HybridNativeStorageSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func getString(key: String) throws -> String
  func setString(key: String, value: String) throws -> Void
  func removeString(key: String) throws -> Void
  func getSecureString(key: String) throws -> String
  func setSecureString(key: String, value: String) throws -> Void
  func removeSecureString(key: String) throws -> Void
}

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

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

/**
 * A Swift base-protocol representing the NativeStorage HybridObject.
 * Implement this protocol to create Swift-based instances of NativeStorage.
 * ```swift
 * class HybridNativeStorage : HybridNativeStorageSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridNativeStorageSpec = HybridNativeStorageSpec_protocol & HybridNativeStorageSpec_base
