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

public extension MeteringMode {
  /**
   * Get a MeteringMode for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "AE":
        self = .ae
      case "AF":
        self = .af
      case "AWB":
        self = .awb
      default:
        return nil
    }
  }

  /**
   * Get the String value this MeteringMode represents.
   */
  var stringValue: String {
    switch self {
      case .ae:
        return "AE"
      case .af:
        return "AF"
      case .awb:
        return "AWB"
    }
  }
}
