=begin
#Hatchet API

#The Hatchet API

The version of the OpenAPI document: 1.0.0

Generated by: https://openapi-generator.tech
Generator version: 7.14.0

=end

require 'date'
require 'time'

module HatchetSdkRest
  class StepRunEventReason
    REQUEUED_NO_WORKER = "REQUEUED_NO_WORKER".freeze
    REQUEUED_RATE_LIMIT = "REQUEUED_RATE_LIMIT".freeze
    SCHEDULING_TIMED_OUT = "SCHEDULING_TIMED_OUT".freeze
    ASSIGNED = "ASSIGNED".freeze
    STARTED = "STARTED".freeze
    ACKNOWLEDGED = "ACKNOWLEDGED".freeze
    FINISHED = "FINISHED".freeze
    FAILED = "FAILED".freeze
    RETRYING = "RETRYING".freeze
    CANCELLED = "CANCELLED".freeze
    TIMEOUT_REFRESHED = "TIMEOUT_REFRESHED".freeze
    REASSIGNED = "REASSIGNED".freeze
    TIMED_OUT = "TIMED_OUT".freeze
    SLOT_RELEASED = "SLOT_RELEASED".freeze
    RETRIED_BY_USER = "RETRIED_BY_USER".freeze
    WORKFLOW_RUN_GROUP_KEY_SUCCEEDED = "WORKFLOW_RUN_GROUP_KEY_SUCCEEDED".freeze
    WORKFLOW_RUN_GROUP_KEY_FAILED = "WORKFLOW_RUN_GROUP_KEY_FAILED".freeze

    def self.all_vars
      @all_vars ||= [REQUEUED_NO_WORKER, REQUEUED_RATE_LIMIT, SCHEDULING_TIMED_OUT, ASSIGNED, STARTED, ACKNOWLEDGED, FINISHED, FAILED, RETRYING, CANCELLED, TIMEOUT_REFRESHED, REASSIGNED, TIMED_OUT, SLOT_RELEASED, RETRIED_BY_USER, WORKFLOW_RUN_GROUP_KEY_SUCCEEDED, WORKFLOW_RUN_GROUP_KEY_FAILED].freeze
    end

    # Builds the enum from string
    # @param [String] The enum value in the form of the string
    # @return [String] The enum value
    def self.build_from_hash(value)
      new.build_from_hash(value)
    end

    # Builds the enum from string
    # @param [String] The enum value in the form of the string
    # @return [String] The enum value
    def build_from_hash(value)
      return value if StepRunEventReason.all_vars.include?(value)
      raise "Invalid ENUM value #{value} for class #StepRunEventReason"
    end
  end
end
