Class: UpGuard::EventAction
- Inherits:
-
BaseObject
- Object
- BaseObject
- UpGuard::EventAction
- Defined in:
- lib/upguard/EventAction.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
-
#type ⇒ Object
Returns the value of attribute type.
-
#variables ⇒ Object
Returns the value of attribute variables.
-
#view ⇒ Object
Returns the value of attribute view.
Attributes inherited from BaseObject
#appliance_api_key, #appliance_url, #insecure, #sec_key
Instance Method Summary collapse
- #from_hash(h) ⇒ Object
-
#initialize(appliance_url, appliance_api_key, sec_key, insecure = false) ⇒ EventAction
constructor
A new instance of EventAction.
- #to_hash ⇒ Object
- #to_json(options = nil) ⇒ Object
Methods inherited from BaseObject
#http_delete, #http_get, #http_post, #http_put, #make_headers
Constructor Details
#initialize(appliance_url, appliance_api_key, sec_key, insecure = false) ⇒ EventAction
Returns a new instance of EventAction.
9 10 11 12 13 14 15 16 17 |
# File 'lib/upguard/EventAction.rb', line 9 def initialize(appliance_url, appliance_api_key, sec_key, insecure = false) super(appliance_url, appliance_api_key, sec_key, insecure) self.id = nil self.name = nil self.status = nil self.type = nil self.variables = nil self.view = nil end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/upguard/EventAction.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/upguard/EventAction.rb', line 4 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
5 6 7 |
# File 'lib/upguard/EventAction.rb', line 5 def status @status end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/upguard/EventAction.rb', line 6 def type @type end |
#variables ⇒ Object
Returns the value of attribute variables.
7 8 9 |
# File 'lib/upguard/EventAction.rb', line 7 def variables @variables end |
#view ⇒ Object
Returns the value of attribute view.
8 9 10 |
# File 'lib/upguard/EventAction.rb', line 8 def view @view end |
Instance Method Details
#from_hash(h) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/upguard/EventAction.rb', line 19 def from_hash(h) self.id = h['id'] if h.include?('id') self.name = h['name'] if h.include?('name') self.status = h['status'] if h.include?('status') self.type = h['type'] if h.include?('type') self.variables = h['variables'] if h.include?('variables') self.view = h['view'] if h.include?('view') end |
#to_hash ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/upguard/EventAction.rb', line 27 def to_hash h = {} h['id'] = self.id h['name'] = self.name h['status'] = self.status h['type'] = self.type h['variables'] = self.variables h['view'] = self.view return h end |
#to_json(options = nil) ⇒ Object
37 38 39 40 |
# File 'lib/upguard/EventAction.rb', line 37 def to_json( = nil) h = to_hash return h.to_json() end |