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

/**
 * Represents the JS union `AccessControl`, backed by a C++ enum.
 */
public typealias AccessControl = margelo.nitro.sensitiveinfo.AccessControl

public extension AccessControl {
  /**
   * Get a AccessControl for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "secureEnclaveBiometry":
        self = .secureenclavebiometry
      case "biometryCurrentSet":
        self = .biometrycurrentset
      case "biometryAny":
        self = .biometryany
      case "devicePasscode":
        self = .devicepasscode
      case "none":
        self = .none
      default:
        return nil
    }
  }

  /**
   * Get the String value this AccessControl represents.
   */
  var stringValue: String {
    switch self {
      case .secureenclavebiometry:
        return "secureEnclaveBiometry"
      case .biometrycurrentset:
        return "biometryCurrentSet"
      case .biometryany:
        return "biometryAny"
      case .devicepasscode:
        return "devicePasscode"
      case .none:
        return "none"
    }
  }
}
