Class: MistApi::JsiSirtItem
- Defined in:
- lib/mist_api/models/jsi_sirt_item.rb
Overview
SIRT advisory item
Instance Attribute Summary collapse
-
#cvss_score ⇒ Float
CVSS score.
-
#id ⇒ String
ID of the SIRT.
-
#models ⇒ Array[String]
OS models affected.
-
#problem ⇒ String
Problem description.
-
#published_date ⇒ Integer
Release date of the SIRT issue.
-
#release_notes ⇒ String
Release notes if any.
-
#severity ⇒ String
Severity of the issue.
-
#solution ⇒ String
Solution for the security issue.
-
#title ⇒ String
Title of the SIRT.
-
#updated_date ⇒ Integer
JSA updated timestamp.
-
#versions ⇒ Array[String]
OS versions affected.
-
#workaround ⇒ String
Workaround provided.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(cvss_score = SKIP, id = SKIP, models = SKIP, problem = SKIP, published_date = SKIP, release_notes = SKIP, severity = SKIP, solution = SKIP, title = SKIP, updated_date = SKIP, versions = SKIP, workaround = SKIP) ⇒ JsiSirtItem
constructor
A new instance of JsiSirtItem.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(cvss_score = SKIP, id = SKIP, models = SKIP, problem = SKIP, published_date = SKIP, release_notes = SKIP, severity = SKIP, solution = SKIP, title = SKIP, updated_date = SKIP, versions = SKIP, workaround = SKIP) ⇒ JsiSirtItem
Returns a new instance of JsiSirtItem.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 101 def initialize(cvss_score = SKIP, id = SKIP, models = SKIP, problem = SKIP, published_date = SKIP, release_notes = SKIP, severity = SKIP, solution = SKIP, title = SKIP, updated_date = SKIP, versions = SKIP, workaround = SKIP) @cvss_score = cvss_score unless cvss_score == SKIP @id = id unless id == SKIP @models = models unless models == SKIP @problem = problem unless problem == SKIP @published_date = published_date unless published_date == SKIP @release_notes = release_notes unless release_notes == SKIP @severity = severity unless severity == SKIP @solution = solution unless solution == SKIP @title = title unless title == SKIP @updated_date = updated_date unless updated_date == SKIP @versions = versions unless versions == SKIP @workaround = workaround unless workaround == SKIP end |
Instance Attribute Details
#cvss_score ⇒ Float
CVSS score
14 15 16 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 14 def cvss_score @cvss_score end |
#id ⇒ String
ID of the SIRT
18 19 20 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 18 def id @id end |
#models ⇒ Array[String]
OS models affected
22 23 24 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 22 def models @models end |
#problem ⇒ String
Problem description
26 27 28 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 26 def problem @problem end |
#published_date ⇒ Integer
Release date of the SIRT issue
30 31 32 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 30 def published_date @published_date end |
#release_notes ⇒ String
Release notes if any
34 35 36 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 34 def release_notes @release_notes end |
#severity ⇒ String
Severity of the issue
38 39 40 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 38 def severity @severity end |
#solution ⇒ String
Solution for the security issue
42 43 44 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 42 def solution @solution end |
#title ⇒ String
Title of the SIRT
46 47 48 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 46 def title @title end |
#updated_date ⇒ Integer
JSA updated timestamp
50 51 52 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 50 def updated_date @updated_date end |
#versions ⇒ Array[String]
OS versions affected
54 55 56 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 54 def versions @versions end |
#workaround ⇒ String
Workaround provided
58 59 60 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 58 def workaround @workaround end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 120 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. cvss_score = hash.key?('cvss_score') ? hash['cvss_score'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP models = hash.key?('models') ? hash['models'] : SKIP problem = hash.key?('problem') ? hash['problem'] : SKIP published_date = hash.key?('published_date') ? hash['published_date'] : SKIP release_notes = hash.key?('release_notes') ? hash['release_notes'] : SKIP severity = hash.key?('severity') ? hash['severity'] : SKIP solution = hash.key?('solution') ? hash['solution'] : SKIP title = hash.key?('title') ? hash['title'] : SKIP updated_date = hash.key?('updated_date') ? hash['updated_date'] : SKIP versions = hash.key?('versions') ? hash['versions'] : SKIP workaround = hash.key?('workaround') ? hash['workaround'] : SKIP # Create object from extracted values. JsiSirtItem.new(cvss_score, id, models, problem, published_date, release_notes, severity, solution, title, updated_date, versions, workaround) end |
.names ⇒ Object
A mapping from model property names to API property names.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 61 def self.names @_hash = {} if @_hash.nil? @_hash['cvss_score'] = 'cvss_score' @_hash['id'] = 'id' @_hash['models'] = 'models' @_hash['problem'] = 'problem' @_hash['published_date'] = 'published_date' @_hash['release_notes'] = 'release_notes' @_hash['severity'] = 'severity' @_hash['solution'] = 'solution' @_hash['title'] = 'title' @_hash['updated_date'] = 'updated_date' @_hash['versions'] = 'versions' @_hash['workaround'] = 'workaround' @_hash end |
.nullables ⇒ Object
An array for nullable fields
97 98 99 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 97 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 79 def self.optionals %w[ cvss_score id models problem published_date release_notes severity solution title updated_date versions workaround ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
163 164 165 166 167 168 169 170 171 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 163 def inspect class_name = self.class.name.split('::').last "<#{class_name} cvss_score: #{@cvss_score.inspect}, id: #{@id.inspect}, models:"\ " #{@models.inspect}, problem: #{@problem.inspect}, published_date:"\ " #{@published_date.inspect}, release_notes: #{@release_notes.inspect}, severity:"\ " #{@severity.inspect}, solution: #{@solution.inspect}, title: #{@title.inspect},"\ " updated_date: #{@updated_date.inspect}, versions: #{@versions.inspect}, workaround:"\ " #{@workaround.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
154 155 156 157 158 159 160 |
# File 'lib/mist_api/models/jsi_sirt_item.rb', line 154 def to_s class_name = self.class.name.split('::').last "<#{class_name} cvss_score: #{@cvss_score}, id: #{@id}, models: #{@models}, problem:"\ " #{@problem}, published_date: #{@published_date}, release_notes: #{@release_notes},"\ " severity: #{@severity}, solution: #{@solution}, title: #{@title}, updated_date:"\ " #{@updated_date}, versions: #{@versions}, workaround: #{@workaround}>" end |