///
/// ComparisonPredicateOperator.swift
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

/**
 * Represents the JS enum `ComparisonPredicateOperator`, backed by a C++ enum.
 */
public typealias ComparisonPredicateOperator = margelo.nitro.healthkit.ComparisonPredicateOperator

public extension ComparisonPredicateOperator {
  /**
   * Get a ComparisonPredicateOperator for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "lessThan":
        self = .lessthan
      case "lessThanOrEqualTo":
        self = .lessthanorequalto
      case "greaterThan":
        self = .greaterthan
      case "greaterThanOrEqualTo":
        self = .greaterthanorequalto
      case "equalTo":
        self = .equalto
      case "notEqualTo":
        self = .notequalto
      case "matches":
        self = .matches
      case "like":
        self = .like
      case "beginsWith":
        self = .beginswith
      case "endsWith":
        self = .endswith
      case "IN":
        self = .in
      case "customSelector":
        self = .customselector
      case "contains":
        self = .contains
      case "between":
        self = .between
      default:
        return nil
    }
  }

  /**
   * Get the String value this ComparisonPredicateOperator represents.
   */
  var stringValue: String {
    switch self {
      case .lessthan:
        return "lessThan"
      case .lessthanorequalto:
        return "lessThanOrEqualTo"
      case .greaterthan:
        return "greaterThan"
      case .greaterthanorequalto:
        return "greaterThanOrEqualTo"
      case .equalto:
        return "equalTo"
      case .notequalto:
        return "notEqualTo"
      case .matches:
        return "matches"
      case .like:
        return "like"
      case .beginswith:
        return "beginsWith"
      case .endswith:
        return "endsWith"
      case .in:
        return "IN"
      case .customselector:
        return "customSelector"
      case .contains:
        return "contains"
      case .between:
        return "between"
    }
  }
}
