Class: MistApi::AamwProfileCategoryCategoryEnum

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

Overview

enum: ‘archive`, `document`, `pdf`, `executable`, `rich_application`, `library`, `os_package`, `mobile`, `java`, `configuration`, `script`

Constant Summary collapse

AAMW_PROFILE_CATEGORY_CATEGORY_ENUM =
[
  # TODO: Write general description for ARCHIVE
  ARCHIVE = 'archive'.freeze,

  # TODO: Write general description for DOCUMENT
  DOCUMENT = 'document'.freeze,

  # TODO: Write general description for PDF
  PDF = 'pdf'.freeze,

  # TODO: Write general description for EXECUTABLE
  EXECUTABLE = 'executable'.freeze,

  # TODO: Write general description for RICH_APPLICATION
  RICH_APPLICATION = 'rich_application'.freeze,

  # TODO: Write general description for LIBRARY
  LIBRARY = 'library'.freeze,

  # TODO: Write general description for OS_PACKAGE
  OS_PACKAGE = 'os_package'.freeze,

  # TODO: Write general description for MOBILE
  MOBILE = 'mobile'.freeze,

  # TODO: Write general description for JAVA
  JAVA = 'java'.freeze,

  # TODO: Write general description for CONFIGURATION
  CONFIGURATION = 'configuration'.freeze,

  # TODO: Write general description for SCRIPT
  SCRIPT = 'script'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = ARCHIVE) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/mist_api/models/aamw_profile_category_category_enum.rb', line 51

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

  str = value.to_s.strip

  case str.downcase
  when 'archive' then ARCHIVE
  when 'document' then DOCUMENT
  when 'pdf' then PDF
  when 'executable' then EXECUTABLE
  when 'rich_application' then RICH_APPLICATION
  when 'library' then LIBRARY
  when 'os_package' then OS_PACKAGE
  when 'mobile' then MOBILE
  when 'java' then JAVA
  when 'configuration' then CONFIGURATION
  when 'script' then SCRIPT
  else
    default_value
  end
end

.validate(value) ⇒ Object



45
46
47
48
49
# File 'lib/mist_api/models/aamw_profile_category_category_enum.rb', line 45

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

  AAMW_PROFILE_CATEGORY_CATEGORY_ENUM.include?(value)
end