Class: TogaiClient::MetricName
- Inherits:
-
Object
- Object
- TogaiClient::MetricName
- Defined in:
- lib/togai_client/models/metric_name.rb
Constant Summary collapse
- EVENTS =
"EVENTS".freeze
- USAGE =
"USAGE".freeze
- METER_USAGE =
"METER_USAGE".freeze
- NAMED_LICENSE_USAGE =
"NAMED_LICENSE_USAGE".freeze
- REVENUE =
"REVENUE".freeze
- USAGE_FOR_CYCLE =
"USAGE_FOR_CYCLE".freeze
- REVENUE_FOR_CYCLE =
"REVENUE_FOR_CYCLE".freeze
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
26 27 28 |
# File 'lib/togai_client/models/metric_name.rb', line 26 def self.all_vars @all_vars ||= [EVENTS, USAGE, METER_USAGE, NAMED_LICENSE_USAGE, REVENUE, USAGE_FOR_CYCLE, REVENUE_FOR_CYCLE].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
33 34 35 |
# File 'lib/togai_client/models/metric_name.rb', line 33 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
40 41 42 43 |
# File 'lib/togai_client/models/metric_name.rb', line 40 def build_from_hash(value) return value if MetricName.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #MetricName" end |