=begin
#Daytona

#Daytona AI platform API Docs

The version of the OpenAPI document: 1.0
Contact: support@daytona.com
Generated by: https://openapi-generator.tech
Generator version: 7.21.0

=end

require 'date'
require 'time'

module DaytonaApiClient
  class WebhookEvent
    SANDBOX_CREATED = "sandbox.created".freeze
    SANDBOX_STATE_UPDATED = "sandbox.state.updated".freeze
    SNAPSHOT_CREATED = "snapshot.created".freeze
    SNAPSHOT_STATE_UPDATED = "snapshot.state.updated".freeze
    SNAPSHOT_REMOVED = "snapshot.removed".freeze
    VOLUME_CREATED = "volume.created".freeze
    VOLUME_STATE_UPDATED = "volume.state.updated".freeze
    UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze

    def self.all_vars
      @all_vars ||= [SANDBOX_CREATED, SANDBOX_STATE_UPDATED, SNAPSHOT_CREATED, SNAPSHOT_STATE_UPDATED, SNAPSHOT_REMOVED, VOLUME_CREATED, VOLUME_STATE_UPDATED, UNKNOWN_DEFAULT_OPEN_API].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 WebhookEvent.all_vars.include?(value)
      UNKNOWN_DEFAULT_OPEN_API
    end
  end
end
