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

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

  /**
   * Get the String value this PhotoLibraryPermissionStatus represents.
   */
  var stringValue: String {
    switch self {
      case .authorized:
        return "authorized"
      case .notdetermined:
        return "notDetermined"
      case .restricted:
        return "restricted"
      case .denied:
        return "denied"
      case .limited:
        return "limited"
    }
  }
}
