Class: MistApi::ResponseAutoOrientationInfoStatusEnum

Inherits:
Object
  • Object
show all
Defined in:
lib/mist_api/models/response_auto_orientation_info_status_enum.rb

Overview

The status of auto orient for a given map. enum: * ‘pending`: Auto orient has not been requested for this map * `inprogress`: Auto orient is currently processing * `done`: The auto orient process has completed * `error`: There was an error in the auto orient process

Constant Summary collapse

RESPONSE_AUTO_ORIENTATION_INFO_STATUS_ENUM =
[
  # TODO: Write general description for PENDING
  PENDING = 'pending'.freeze,

  # TODO: Write general description for INPROGRESS
  INPROGRESS = 'inprogress'.freeze,

  # TODO: Write general description for DONE
  DONE = 'done'.freeze,

  # TODO: Write general description for ERROR
  ERROR = 'error'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = PENDING) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/mist_api/models/response_auto_orientation_info_status_enum.rb', line 32

def self.from_value(value, default_value = PENDING)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'pending' then PENDING
  when 'inprogress' then INPROGRESS
  when 'done' then DONE
  when 'error' then ERROR
  else
    default_value
  end
end

.validate(value) ⇒ Object



26
27
28
29
30
# File 'lib/mist_api/models/response_auto_orientation_info_status_enum.rb', line 26

def self.validate(value)
  return false if value.nil?

  RESPONSE_AUTO_ORIENTATION_INFO_STATUS_ENUM.include?(value)
end