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

public extension TargetDynamicRangeBitDepth {
  /**
   * Get a TargetDynamicRangeBitDepth for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "sdr-8-bit":
        self = .sdr8Bit
      case "hdr-10-bit":
        self = .hdr10Bit
      default:
        return nil
    }
  }

  /**
   * Get the String value this TargetDynamicRangeBitDepth represents.
   */
  var stringValue: String {
    switch self {
      case .sdr8Bit:
        return "sdr-8-bit"
      case .hdr10Bit:
        return "hdr-10-bit"
    }
  }
}
