Class: Hawkular::Alerts::Trigger::Dampening

Inherits:
Object
  • Object
show all
Defined in:
lib/hawkular/alerts/alerts_api.rb

Overview

Representation of one Dampening setting

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(damp_hash) ⇒ Dampening

Returns a new instance of Dampening



533
534
535
536
537
538
539
540
541
# File 'lib/hawkular/alerts/alerts_api.rb', line 533

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_evalsObject

Returns the value of attribute current_evals



531
532
533
# File 'lib/hawkular/alerts/alerts_api.rb', line 531

def current_evals
  @current_evals
end

#dampening_idObject

Returns the value of attribute dampening_id



529
530
531
# File 'lib/hawkular/alerts/alerts_api.rb', line 529

def dampening_id
  @dampening_id
end

#eval_time_settingObject

Returns the value of attribute eval_time_setting



529
530
531
# File 'lib/hawkular/alerts/alerts_api.rb', line 529

def eval_time_setting
  @eval_time_setting
end

#eval_total_settingObject

Returns the value of attribute eval_total_setting



529
530
531
# File 'lib/hawkular/alerts/alerts_api.rb', line 529

def eval_total_setting
  @eval_total_setting
end

#eval_true_settingObject

Returns the value of attribute eval_true_setting



529
530
531
# File 'lib/hawkular/alerts/alerts_api.rb', line 529

def eval_true_setting
  @eval_true_setting
end

#trigger_idObject

Returns the value of attribute trigger_id



529
530
531
# File 'lib/hawkular/alerts/alerts_api.rb', line 529

def trigger_id
  @trigger_id
end

#typeObject

Returns the value of attribute type



529
530
531
# File 'lib/hawkular/alerts/alerts_api.rb', line 529

def type
  @type
end

Instance Method Details

#to_hObject



543
544
545
546
547
548
549
550
551
552
# File 'lib/hawkular/alerts/alerts_api.rb', line 543

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