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

import NitroModules

/// See ``HybridSensitiveInfoSpec``
public protocol HybridSensitiveInfoSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func setItem(request: SensitiveInfoSetRequest) throws -> Promise<MutationResult>
  func getItem(request: SensitiveInfoGetRequest) throws -> Promise<Variant_NullType_SensitiveInfoItem>
  func deleteItem(request: SensitiveInfoDeleteRequest) throws -> Promise<Bool>
  func hasItem(request: SensitiveInfoHasRequest) throws -> Promise<Bool>
  func getAllItems(request: SensitiveInfoEnumerateRequest?) throws -> Promise<[SensitiveInfoItem]>
  func clearService(request: SensitiveInfoOptions?) throws -> Promise<Void>
  func getSupportedSecurityLevels() throws -> Promise<SecurityAvailability>
  func rotateKeys(request: RotateKeysRequest?) throws -> Promise<RotationResult>
  func getKeyVersion(request: SensitiveInfoOptions?) throws -> Promise<Double>
}

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

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

/**
 * A Swift base-protocol representing the SensitiveInfo HybridObject.
 * Implement this protocol to create Swift-based instances of SensitiveInfo.
 * ```swift
 * class HybridSensitiveInfo : HybridSensitiveInfoSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridSensitiveInfoSpec = HybridSensitiveInfoSpec_protocol & HybridSensitiveInfoSpec_base
