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

public extension BloodType {
  /**
   * Get a BloodType for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "notSet":
        self = .notset
      case "aPositive":
        self = .apositive
      case "aNegative":
        self = .anegative
      case "bPositive":
        self = .bpositive
      case "bNegative":
        self = .bnegative
      case "abPositive":
        self = .abpositive
      case "abNegative":
        self = .abnegative
      case "oPositive":
        self = .opositive
      case "oNegative":
        self = .onegative
      default:
        return nil
    }
  }

  /**
   * Get the String value this BloodType represents.
   */
  var stringValue: String {
    switch self {
      case .notset:
        return "notSet"
      case .apositive:
        return "aPositive"
      case .anegative:
        return "aNegative"
      case .bpositive:
        return "bPositive"
      case .bnegative:
        return "bNegative"
      case .abpositive:
        return "abPositive"
      case .abnegative:
        return "abNegative"
      case .opositive:
        return "oPositive"
      case .onegative:
        return "oNegative"
    }
  }
}
