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

import NitroModules

/// See ``HybridOneProtectedStoreSpec``
public protocol HybridOneProtectedStoreSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func createItem(key: String, value: String, policy: ProtectedStorePolicy) throws -> Promise<Void>
  func getItem(key: String, reason: String, policy: ProtectedStorePolicy) throws -> Promise<String?>
  func updateItem(key: String, value: String, reason: String, policy: ProtectedStorePolicy) throws -> Promise<Void>
  func deleteItem(key: String, reason: String, policy: ProtectedStorePolicy) throws -> Promise<Void>
}

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

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

/**
 * A Swift base-protocol representing the OneProtectedStore HybridObject.
 * Implement this protocol to create Swift-based instances of OneProtectedStore.
 * ```swift
 * class HybridOneProtectedStore : HybridOneProtectedStoreSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridOneProtectedStoreSpec = HybridOneProtectedStoreSpec_protocol & HybridOneProtectedStoreSpec_base
