Class: DaytonaApiClient::SandboxState

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona_api_client/models/sandbox_state.rb

Constant Summary collapse

CREATING =
"creating".freeze
RESTORING =
"restoring".freeze
DESTROYED =
"destroyed".freeze
DESTROYING =
"destroying".freeze
STARTED =
"started".freeze
STOPPED =
"stopped".freeze
STARTING =
"starting".freeze
STOPPING =
"stopping".freeze
ERROR =
"error".freeze
BUILD_FAILED =
"build_failed".freeze
PENDING_BUILD =
"pending_build".freeze
BUILDING_SNAPSHOT =
"building_snapshot".freeze
UNKNOWN =
"unknown".freeze
PULLING_SNAPSHOT =
"pulling_snapshot".freeze
ARCHIVED =
"archived".freeze
ARCHIVING =
"archiving".freeze
RESIZING =
"resizing".freeze
SNAPSHOTTING =
"snapshotting".freeze
FORKING =
"forking".freeze
PAUSING =
"pausing".freeze
PAUSED =
"paused".freeze
RESUMING =
"resuming".freeze
UNKNOWN_DEFAULT_OPEN_API =
"unknown_default_open_api".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



42
43
44
# File 'lib/daytona_api_client/models/sandbox_state.rb', line 42

def self.all_vars
  @all_vars ||= [CREATING, RESTORING, DESTROYED, DESTROYING, STARTED, STOPPED, STARTING, STOPPING, ERROR, BUILD_FAILED, PENDING_BUILD, BUILDING_SNAPSHOT, UNKNOWN, PULLING_SNAPSHOT, ARCHIVED, ARCHIVING, RESIZING, SNAPSHOTTING, FORKING, PAUSING, PAUSED, RESUMING, UNKNOWN_DEFAULT_OPEN_API].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



49
50
51
# File 'lib/daytona_api_client/models/sandbox_state.rb', line 49

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



56
57
58
59
# File 'lib/daytona_api_client/models/sandbox_state.rb', line 56

def build_from_hash(value)
  return value if SandboxState.all_vars.include?(value)
  UNKNOWN_DEFAULT_OPEN_API
end