Class: Hawkular::Alerts::Trigger::Dampening
- Inherits:
-
Object
- Object
- Hawkular::Alerts::Trigger::Dampening
- Defined in:
- lib/hawkular/alerts/alerts_api.rb
Overview
Representation of one Dampening setting
Instance Attribute Summary collapse
-
#current_evals ⇒ Object
Returns the value of attribute current_evals.
-
#dampening_id ⇒ Object
Returns the value of attribute dampening_id.
-
#eval_time_setting ⇒ Object
Returns the value of attribute eval_time_setting.
-
#eval_total_setting ⇒ Object
Returns the value of attribute eval_total_setting.
-
#eval_true_setting ⇒ Object
Returns the value of attribute eval_true_setting.
-
#trigger_id ⇒ Object
Returns the value of attribute trigger_id.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(damp_hash) ⇒ Dampening
constructor
A new instance of Dampening.
- #to_h ⇒ Object
Constructor Details
#initialize(damp_hash) ⇒ Dampening
Returns a new instance of Dampening
494 495 496 497 498 499 500 501 502 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 494 def initialize(damp_hash) @current_evals = {} @dampening_id = damp_hash['dampeningId'] @trigger_id = damp_hash['triggerId'] @type = damp_hash['type'] @eval_true_setting = damp_hash['evalTrueSetting'] @eval_total_setting = damp_hash['evalTotalSetting'] @eval_time_setting = damp_hash['evalTimeSetting'] end |
Instance Attribute Details
#current_evals ⇒ Object
Returns the value of attribute current_evals
492 493 494 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 492 def current_evals @current_evals end |
#dampening_id ⇒ Object
Returns the value of attribute dampening_id
490 491 492 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 490 def dampening_id @dampening_id end |
#eval_time_setting ⇒ Object
Returns the value of attribute eval_time_setting
490 491 492 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 490 def eval_time_setting @eval_time_setting end |
#eval_total_setting ⇒ Object
Returns the value of attribute eval_total_setting
490 491 492 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 490 def eval_total_setting @eval_total_setting end |
#eval_true_setting ⇒ Object
Returns the value of attribute eval_true_setting
490 491 492 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 490 def eval_true_setting @eval_true_setting end |
#trigger_id ⇒ Object
Returns the value of attribute trigger_id
490 491 492 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 490 def trigger_id @trigger_id end |
#type ⇒ Object
Returns the value of attribute type
490 491 492 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 490 def type @type end |
Instance Method Details
#to_h ⇒ Object
504 505 506 507 508 509 510 511 512 513 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 504 def to_h cond_hash = {} cond_hash['dampeningId'] = @dampening_id cond_hash['triggerId'] = @trigger_id cond_hash['type'] = @type cond_hash['evalTrueSetting'] = @eval_true_setting cond_hash['evalTotalSetting'] = @eval_total_setting cond_hash['evalTimeSetting'] = @eval_time_setting cond_hash end |