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

public extension WeatherCondition {
  /**
   * Get a WeatherCondition for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "none":
        self = .none
      case "clear":
        self = .clear
      case "fair":
        self = .fair
      case "partlyCloudy":
        self = .partlycloudy
      case "mostlyCloudy":
        self = .mostlycloudy
      case "cloudy":
        self = .cloudy
      case "foggy":
        self = .foggy
      case "haze":
        self = .haze
      case "windy":
        self = .windy
      case "blustery":
        self = .blustery
      case "smoky":
        self = .smoky
      case "dust":
        self = .dust
      case "snow":
        self = .snow
      case "hail":
        self = .hail
      case "sleet":
        self = .sleet
      case "freezingDrizzle":
        self = .freezingdrizzle
      case "freezingRain":
        self = .freezingrain
      case "mixedRainAndHail":
        self = .mixedrainandhail
      case "mixedRainAndSnow":
        self = .mixedrainandsnow
      case "mixedRainAndSleet":
        self = .mixedrainandsleet
      case "mixedSnowAndSleet":
        self = .mixedsnowandsleet
      case "drizzle":
        self = .drizzle
      case "scatteredShowers":
        self = .scatteredshowers
      case "showers":
        self = .showers
      case "thunderstorms":
        self = .thunderstorms
      case "tropicalStorm":
        self = .tropicalstorm
      case "hurricane":
        self = .hurricane
      case "tornado":
        self = .tornado
      default:
        return nil
    }
  }

  /**
   * Get the String value this WeatherCondition represents.
   */
  var stringValue: String {
    switch self {
      case .none:
        return "none"
      case .clear:
        return "clear"
      case .fair:
        return "fair"
      case .partlycloudy:
        return "partlyCloudy"
      case .mostlycloudy:
        return "mostlyCloudy"
      case .cloudy:
        return "cloudy"
      case .foggy:
        return "foggy"
      case .haze:
        return "haze"
      case .windy:
        return "windy"
      case .blustery:
        return "blustery"
      case .smoky:
        return "smoky"
      case .dust:
        return "dust"
      case .snow:
        return "snow"
      case .hail:
        return "hail"
      case .sleet:
        return "sleet"
      case .freezingdrizzle:
        return "freezingDrizzle"
      case .freezingrain:
        return "freezingRain"
      case .mixedrainandhail:
        return "mixedRainAndHail"
      case .mixedrainandsnow:
        return "mixedRainAndSnow"
      case .mixedrainandsleet:
        return "mixedRainAndSleet"
      case .mixedsnowandsleet:
        return "mixedSnowAndSleet"
      case .drizzle:
        return "drizzle"
      case .scatteredshowers:
        return "scatteredShowers"
      case .showers:
        return "showers"
      case .thunderstorms:
        return "thunderstorms"
      case .tropicalstorm:
        return "tropicalStorm"
      case .hurricane:
        return "hurricane"
      case .tornado:
        return "tornado"
    }
  }
}
