/// /// FingerContactState.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 `FingerContactState`, backed by a C++ enum. */ public typealias FingerContactState = margelo.nitro.haptika.ppg.FingerContactState public extension FingerContactState { /** * Get a FingerContactState for the given String value, or * return `nil` if the given value was invalid/unknown. */ init?(fromString string: String) { switch string { case "absent": self = .absent case "adjusting": self = .adjusting case "valid": self = .valid case "tooMuchPressure": self = .toomuchpressure case "overexposed": self = .overexposed case "unstable": self = .unstable default: return nil } } /** * Get the String value this FingerContactState represents. */ var stringValue: String { switch self { case .absent: return "absent" case .adjusting: return "adjusting" case .valid: return "valid" case .toomuchpressure: return "tooMuchPressure" case .overexposed: return "overexposed" case .unstable: return "unstable" } } }