Class: MistApi::OauthPingIdentityRegionEnum
- Inherits:
-
Object
- Object
- MistApi::OauthPingIdentityRegionEnum
- Defined in:
- lib/mist_api/models/oauth_ping_identity_region_enum.rb
Overview
enum: ‘us` (United States, default), `ca` (Canada), `eu` (Europe), `asia` (Asia), `au` (Australia)
Constant Summary collapse
- OAUTH_PING_IDENTITY_REGION_ENUM =
[ # TODO: Write general description for ASIA ASIA = 'asia'.freeze, # TODO: Write general description for AU AU = 'au'.freeze, # TODO: Write general description for CA CA = 'ca'.freeze, # TODO: Write general description for EU EU = 'eu'.freeze, # TODO: Write general description for US US = 'us'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ASIA) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/mist_api/models/oauth_ping_identity_region_enum.rb', line 33 def self.from_value(value, default_value = ASIA) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'asia' then ASIA when 'au' then AU when 'ca' then CA when 'eu' then EU when 'us' then US else default_value end end |
.validate(value) ⇒ Object
27 28 29 30 31 |
# File 'lib/mist_api/models/oauth_ping_identity_region_enum.rb', line 27 def self.validate(value) return false if value.nil? OAUTH_PING_IDENTITY_REGION_ENUM.include?(value) end |