///
/// LocationPermissionStatus.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 `LocationPermissionStatus`, backed by a C++ enum.
 */
public typealias LocationPermissionStatus = margelo.nitro.one.LocationPermissionStatus

public extension LocationPermissionStatus {
  /**
   * Get a LocationPermissionStatus for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "notDetermined":
        self = .notdetermined
      case "restricted":
        self = .restricted
      case "denied":
        self = .denied
      case "whenInUse":
        self = .wheninuse
      case "always":
        self = .always
      default:
        return nil
    }
  }

  /**
   * Get the String value this LocationPermissionStatus represents.
   */
  var stringValue: String {
    switch self {
      case .notdetermined:
        return "notDetermined"
      case .restricted:
        return "restricted"
      case .denied:
        return "denied"
      case .wheninuse:
        return "whenInUse"
      case .always:
        return "always"
    }
  }
}
