Class: UntitledApi::ApiV1SitesSleScopeIdMetricMetricThresholdResponse2
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UntitledApi::ApiV1SitesSleScopeIdMetricMetricThresholdResponse2
- Defined in:
- lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb
Overview
ApiV1SitesSleScopeIdMetricMetricThresholdResponse2 Model.
Instance Attribute Summary collapse
-
#default ⇒ Float
TODO: Write general description for this method.
-
#direction ⇒ String
TODO: Write general description for this method.
-
#maximum ⇒ Float
TODO: Write general description for this method.
-
#metric ⇒ String
TODO: Write general description for this method.
-
#minimum ⇒ Float
TODO: Write general description for this method.
-
#threshold ⇒ Float
TODO: Write general description for this method.
-
#units ⇒ String
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(metric = SKIP, minimum = SKIP, maximum = SKIP, default = SKIP, units = SKIP, direction = SKIP, threshold = SKIP) ⇒ ApiV1SitesSleScopeIdMetricMetricThresholdResponse2
constructor
A new instance of ApiV1SitesSleScopeIdMetricMetricThresholdResponse2.
Methods inherited from BaseModel
Constructor Details
#initialize(metric = SKIP, minimum = SKIP, maximum = SKIP, default = SKIP, units = SKIP, direction = SKIP, threshold = SKIP) ⇒ ApiV1SitesSleScopeIdMetricMetricThresholdResponse2
Returns a new instance of ApiV1SitesSleScopeIdMetricMetricThresholdResponse2.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 71 def initialize(metric = SKIP, minimum = SKIP, maximum = SKIP, default = SKIP, units = SKIP, direction = SKIP, threshold = SKIP) @metric = metric unless metric == SKIP @minimum = minimum unless minimum == SKIP @maximum = maximum unless maximum == SKIP @default = default unless default == SKIP @units = units unless units == SKIP @direction = direction unless direction == SKIP @threshold = threshold unless threshold == SKIP end |
Instance Attribute Details
#default ⇒ Float
TODO: Write general description for this method
26 27 28 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 26 def default @default end |
#direction ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 34 def direction @direction end |
#maximum ⇒ Float
TODO: Write general description for this method
22 23 24 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 22 def maximum @maximum end |
#metric ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 14 def metric @metric end |
#minimum ⇒ Float
TODO: Write general description for this method
18 19 20 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 18 def minimum @minimum end |
#threshold ⇒ Float
TODO: Write general description for this method
38 39 40 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 38 def threshold @threshold end |
#units ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 30 def units @units end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 88 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. metric = hash.key?('metric') ? hash['metric'] : SKIP minimum = hash.key?('minimum') ? hash['minimum'] : SKIP maximum = hash.key?('maximum') ? hash['maximum'] : SKIP default = hash.key?('default') ? hash['default'] : SKIP units = hash.key?('units') ? hash['units'] : SKIP direction = hash.key?('direction') ? hash['direction'] : SKIP threshold = hash.key?('threshold') ? hash['threshold'] : SKIP # Create object from extracted values. ApiV1SitesSleScopeIdMetricMetricThresholdResponse2.new(metric, minimum, maximum, default, units, direction, threshold) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['metric'] = 'metric' @_hash['minimum'] = 'minimum' @_hash['maximum'] = 'maximum' @_hash['default'] = 'default' @_hash['units'] = 'units' @_hash['direction'] = 'direction' @_hash['threshold'] = 'threshold' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/untitled_api/models/api_v1_sites_sle_scope_id_metric_metric_threshold_response2.rb', line 54 def self.optionals %w[ metric minimum maximum default units direction threshold ] end |