Class: Hawkular::Alerts::Trigger::Action
- Inherits:
-
Object
- Object
- Hawkular::Alerts::Trigger::Action
- Defined in:
- lib/hawkular/alerts/alerts_api.rb
Instance Attribute Summary collapse
-
#action_id ⇒ Object
Returns the value of attribute action_id.
-
#action_plugin ⇒ Object
Returns the value of attribute action_plugin.
-
#states ⇒ Object
Returns the value of attribute states.
-
#tenant_id ⇒ Object
Returns the value of attribute tenant_id.
Instance Method Summary collapse
-
#initialize(action_hash) ⇒ Action
constructor
A new instance of Action.
- #to_h ⇒ Object
Constructor Details
#initialize(action_hash) ⇒ Action
Returns a new instance of Action
558 559 560 561 562 563 564 565 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 558 def initialize(action_hash) return if action_hash.nil? @action_plugin = action_hash['actionPlugin'] @action_id = action_hash['actionId'] @tenant_id = action_hash['tenantId'] @states = action_hash['states'] end |
Instance Attribute Details
#action_id ⇒ Object
Returns the value of attribute action_id
556 557 558 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 556 def action_id @action_id end |
#action_plugin ⇒ Object
Returns the value of attribute action_plugin
556 557 558 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 556 def action_plugin @action_plugin end |
#states ⇒ Object
Returns the value of attribute states
556 557 558 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 556 def states @states end |
#tenant_id ⇒ Object
Returns the value of attribute tenant_id
556 557 558 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 556 def tenant_id @tenant_id end |
Instance Method Details
#to_h ⇒ Object
567 568 569 570 571 572 573 574 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 567 def to_h action_hash = {} action_hash['actionPlugin'] = @action_plugin action_hash['actionId'] = @action_id action_hash['tenantId'] = @tenant_id action_hash['states'] = @states action_hash end |