Class: Hawkular::Alerts::Trigger::Condition
- Inherits:
-
Object
- Object
- Hawkular::Alerts::Trigger::Condition
- Defined in:
- lib/hawkular/alerts/alerts_api.rb
Overview
Representing of one Condition
Instance Attribute Summary collapse
-
#condition_id ⇒ Object
Returns the value of attribute condition_id.
-
#condition_set_index ⇒ Object
readonly
Returns the value of attribute condition_set_index.
-
#condition_set_size ⇒ Object
readonly
Returns the value of attribute condition_set_size.
-
#data2_id ⇒ Object
Returns the value of attribute data2_id.
-
#data2_multiplier ⇒ Object
Returns the value of attribute data2_multiplier.
-
#data_id ⇒ Object
Returns the value of attribute data_id.
-
#operator ⇒ Object
Returns the value of attribute operator.
-
#threshold ⇒ Object
Returns the value of attribute threshold.
-
#trigger_id ⇒ Object
readonly
Returns the value of attribute trigger_id.
-
#trigger_mode ⇒ Object
Returns the value of attribute trigger_mode.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(cond_hash) ⇒ Condition
constructor
A new instance of Condition.
- #to_h ⇒ Object
Constructor Details
#initialize(cond_hash) ⇒ Condition
Returns a new instance of Condition
414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 414 def initialize(cond_hash) @condition_id = cond_hash['conditionId'] @type = cond_hash['type'] @operator = cond_hash['operator'] @threshold = cond_hash['threshold'] @type = cond_hash['type'] @trigger_mode = cond_hash['triggerMode'] @data_id = cond_hash['dataId'] @data2_id = cond_hash['data2Id'] @data2_multiplier = cond_hash['data2Multiplier'] @trigger_id = cond_hash['triggerId'] @interval = cond_hash['interval'] end |
Instance Attribute Details
#condition_id ⇒ Object
Returns the value of attribute condition_id
410 411 412 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 410 def condition_id @condition_id end |
#condition_set_index ⇒ Object (readonly)
Returns the value of attribute condition_set_index
412 413 414 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 412 def condition_set_index @condition_set_index end |
#condition_set_size ⇒ Object (readonly)
Returns the value of attribute condition_set_size
412 413 414 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 412 def condition_set_size @condition_set_size end |
#data2_id ⇒ Object
Returns the value of attribute data2_id
411 412 413 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 411 def data2_id @data2_id end |
#data2_multiplier ⇒ Object
Returns the value of attribute data2_multiplier
411 412 413 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 411 def data2_multiplier @data2_multiplier end |
#data_id ⇒ Object
Returns the value of attribute data_id
411 412 413 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 411 def data_id @data_id end |
#operator ⇒ Object
Returns the value of attribute operator
410 411 412 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 410 def operator @operator end |
#threshold ⇒ Object
Returns the value of attribute threshold
410 411 412 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 410 def threshold @threshold end |
#trigger_id ⇒ Object (readonly)
Returns the value of attribute trigger_id
412 413 414 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 412 def trigger_id @trigger_id end |
#trigger_mode ⇒ Object
Returns the value of attribute trigger_mode
411 412 413 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 411 def trigger_mode @trigger_mode end |
#type ⇒ Object
Returns the value of attribute type
410 411 412 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 410 def type @type end |
Instance Method Details
#to_h ⇒ Object
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 428 def to_h cond_hash = {} cond_hash['conditionId'] = @condition_id cond_hash['type'] = @type cond_hash['operator'] = @operator cond_hash['threshold'] = @threshold cond_hash['type'] = @type cond_hash['triggerMode'] = @trigger_mode cond_hash['dataId'] = @data_id cond_hash['data2Id'] = @data2_id cond_hash['data2Multiplier'] = @data2_multiplier cond_hash['triggerId'] = @trigger_id cond_hash['interval'] = @interval cond_hash end |