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.
496 497 498 499 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 496 def initialize(conditions) @conditions = conditions @data_id_member_map = {} end |
Instance Attribute Details
#conditions ⇒ Object
Returns the value of attribute conditions.
494 495 496 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 494 def conditions @conditions end |
#data_id_member_map ⇒ Object
Returns the value of attribute data_id_member_map.
494 495 496 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 494 def data_id_member_map @data_id_member_map end |
Instance Method Details
#to_h ⇒ Object
501 502 503 504 505 506 507 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 501 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 |