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
519 520 521 522 523 524 525 526 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 519 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
517 518 519 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 517 def action_id @action_id end |
#action_plugin ⇒ Object
Returns the value of attribute action_plugin
517 518 519 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 517 def action_plugin @action_plugin end |
#states ⇒ Object
Returns the value of attribute states
517 518 519 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 517 def states @states end |
#tenant_id ⇒ Object
Returns the value of attribute tenant_id
517 518 519 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 517 def tenant_id @tenant_id end |
Instance Method Details
#to_h ⇒ Object
528 529 530 531 532 533 534 535 |
# File 'lib/hawkular/alerts/alerts_api.rb', line 528 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 |