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

public extension OutputStreamType {
  /**
   * Get a OutputStreamType for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "video":
        self = .video
      case "photo":
        self = .photo
      case "stream":
        self = .stream
      case "depth-photo":
        self = .depthPhoto
      case "depth-stream":
        self = .depthStream
      default:
        return nil
    }
  }

  /**
   * Get the String value this OutputStreamType represents.
   */
  var stringValue: String {
    switch self {
      case .video:
        return "video"
      case .photo:
        return "photo"
      case .stream:
        return "stream"
      case .depthPhoto:
        return "depth-photo"
      case .depthStream:
        return "depth-stream"
    }
  }
}
