Class: Tenable::Models::Scan
- Inherits:
-
Data
- Object
- Data
- Tenable::Models::Scan
- Defined in:
- lib/tenable/models/scan.rb
Overview
Represents a Tenable.io scan.
Instance Attribute Summary collapse
-
#creation_date ⇒ Object
readonly
Returns the value of attribute creation_date.
-
#folder_id ⇒ Object
readonly
Returns the value of attribute folder_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last_modification_date ⇒ Object
readonly
Returns the value of attribute last_modification_date.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#uuid ⇒ Object
readonly
Returns the value of attribute uuid.
Class Method Summary collapse
-
.from_api(data) ⇒ Scan
Builds a Scan from a raw API response hash.
Instance Attribute Details
#creation_date ⇒ Object (readonly)
Returns the value of attribute creation_date
6 7 8 |
# File 'lib/tenable/models/scan.rb', line 6 def creation_date @creation_date end |
#folder_id ⇒ Object (readonly)
Returns the value of attribute folder_id
6 7 8 |
# File 'lib/tenable/models/scan.rb', line 6 def folder_id @folder_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id
6 7 8 |
# File 'lib/tenable/models/scan.rb', line 6 def id @id end |
#last_modification_date ⇒ Object (readonly)
Returns the value of attribute last_modification_date
6 7 8 |
# File 'lib/tenable/models/scan.rb', line 6 def last_modification_date @last_modification_date end |
#name ⇒ Object (readonly)
Returns the value of attribute name
6 7 8 |
# File 'lib/tenable/models/scan.rb', line 6 def name @name end |
#status ⇒ Object (readonly)
Returns the value of attribute status
6 7 8 |
# File 'lib/tenable/models/scan.rb', line 6 def status @status end |
#type ⇒ Object (readonly)
Returns the value of attribute type
6 7 8 |
# File 'lib/tenable/models/scan.rb', line 6 def type @type end |
#uuid ⇒ Object (readonly)
Returns the value of attribute uuid
6 7 8 |
# File 'lib/tenable/models/scan.rb', line 6 def uuid @uuid end |
Class Method Details
.from_api(data) ⇒ Scan
Builds a Scan from a raw API response hash.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/tenable/models/scan.rb', line 11 def self.from_api(data) data = data.transform_keys(&:to_sym) new( id: data[:id], uuid: data[:uuid], name: data[:name], status: data[:status], folder_id: data[:folder_id], type: data[:type], creation_date: data[:creation_date], last_modification_date: data[:last_modification_date] ) end |