Class: MistApi::SynthetictestConfigCustomProbeTypeEnum

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

Overview

enum: ‘application`, `curl`, `icmp`, `reachability`, `tcp`

Constant Summary collapse

SYNTHETICTEST_CONFIG_CUSTOM_PROBE_TYPE_ENUM =
[
  # TODO: Write general description for APPLICATION
  APPLICATION = 'application'.freeze,

  # TODO: Write general description for CURL
  CURL = 'curl'.freeze,

  # TODO: Write general description for ICMP
  ICMP = 'icmp'.freeze,

  # TODO: Write general description for REACHABILITY
  REACHABILITY = 'reachability'.freeze,

  # TODO: Write general description for TCP
  TCP = 'tcp'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = APPLICATION) ⇒ Object



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

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

  str = value.to_s.strip

  case str.downcase
  when 'application' then APPLICATION
  when 'curl' then CURL
  when 'icmp' then ICMP
  when 'reachability' then REACHABILITY
  when 'tcp' then TCP
  else
    default_value
  end
end

.validate(value) ⇒ Object



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

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

  SYNTHETICTEST_CONFIG_CUSTOM_PROBE_TYPE_ENUM.include?(value)
end