Class: Hawkular::Alerts::Trigger::GroupConditionsInfo
- Inherits:
-
Object
- Object
- Hawkular::Alerts::Trigger::GroupConditionsInfo
- Defined in:
- lib/hawkular/alerts/alerts_api.rb
Overview
Representing of one GroupConditionsInfo
-
The data_id_member_map should be null if the group has no members.
-
The data_id_member_map should be null if this is a [data-driven] group trigger. In this case the member triggers are removed and will be re-populated as incoming data demands.
-
For [non-data-driven] group triggers with existing members the data_id_member_map is handled as follows. For members not included in the dataIdMemberMap their most recently supplied dataIdMap will be used. This means that it is not necessary to supply mappings if the new condition set uses only dataIds found in the old condition set. If the new conditions introduce new dataIds a full dataIdMemberMap must be supplied.
Instance Attribute Summary collapse
-
#conditions ⇒ Object
Returns the value of attribute conditions.
-
#data_id_member_map ⇒ Object
Returns the value of attribute data_id_member_map.
Instance Method Summary collapse
-
#initialize(conditions) ⇒ GroupConditionsInfo
constructor
A new instance of GroupConditionsInfo.
- #to_h ⇒ Object
Constructor Details
#initialize(conditions) ⇒ GroupConditionsInfo
Returns a new instance of GroupConditionsInfo
456 457 458 459 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 456 def initialize(conditions) @conditions = conditions @data_id_member_map = {} end |
Instance Attribute Details
#conditions ⇒ Object
Returns the value of attribute conditions
454 455 456 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 454 def conditions @conditions end |
#data_id_member_map ⇒ Object
Returns the value of attribute data_id_member_map
454 455 456 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 454 def data_id_member_map @data_id_member_map end |
Instance Method Details
#to_h ⇒ Object
461 462 463 464 465 466 467 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 461 def to_h cond_hash = {} cond_hash['conditions'] = [] @conditions.each { |c| cond_hash['conditions'].push(c.to_h) } cond_hash['dataIdMemberMap'] = @data_id_member_map cond_hash end |