Class: OCI::DataSafe::Models::FindingSummary
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::FindingSummary
- Defined in:
- lib/oci/data_safe/models/finding_summary.rb
Overview
The particular finding reported by the security assessment.
Constant Summary collapse
- SEVERITY_ENUM =
[ SEVERITY_HIGH = 'HIGH'.freeze, SEVERITY_MEDIUM = 'MEDIUM'.freeze, SEVERITY_LOW = 'LOW'.freeze, SEVERITY_EVALUATE = 'EVALUATE'.freeze, SEVERITY_ADVISORY = 'ADVISORY'.freeze, SEVERITY_PASS = 'PASS'.freeze, SEVERITY_DEFERRED = 'DEFERRED'.freeze, SEVERITY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#assessment_id ⇒ String
The OCID of the assessment that generated this finding.
-
#category ⇒ String
The category to which the finding belongs to.
-
#details ⇒ Object
The details of the finding.
-
#doclink ⇒ String
Documentation link provided by Oracle that explains a specific security finding or check.
-
#has_target_db_risk_level_changed ⇒ BOOLEAN
Determines if this risk level has changed on the target database since the last time 'severity' was modified by user.
-
#is_risk_modified ⇒ BOOLEAN
Determines if this risk level was modified by user.
-
#is_top_finding ⇒ BOOLEAN
Indicates whether a given finding is marked as topFinding or not.
-
#justification ⇒ String
User provided reason for accepting or modifying this finding if they choose to do so.
-
#key ⇒ String
The unique finding key.
-
#lifecycle_details ⇒ String
Details about the current state of the finding.
-
#lifecycle_state ⇒ String
The current state of the finding.
-
#oneline ⇒ String
Provides a recommended approach to take to remediate the finding reported.
-
#oracle_defined_severity ⇒ String
The severity of the finding as determined by security assessment.
-
#references ⇒ OCI::DataSafe::Models::References
Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, a STIG rule, or a GDPR Article/Recital.
-
#remarks ⇒ String
The explanation of the issue in this finding.
-
#severity ⇒ String
The severity of the finding as determined by security assessment and is same as oracleDefinedSeverity, unless modified by user.
-
#summary ⇒ String
The brief summary of the finding.
-
#target_id ⇒ String
The OCID of the target database.
-
#time_updated ⇒ DateTime
The date and time the risk level of finding was last updated, in the format defined by RFC3339.
-
#time_valid_until ⇒ DateTime
The time until which the change in severity(deferred / modified) of this finding is valid.
-
#title ⇒ String
The short title for the finding.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ FindingSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ FindingSummary
Initializes the object
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 201 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.severity = attributes[:'severity'] if attributes[:'severity'] self.assessment_id = attributes[:'assessmentId'] if attributes[:'assessmentId'] raise 'You cannot provide both :assessmentId and :assessment_id' if attributes.key?(:'assessmentId') && attributes.key?(:'assessment_id') self.assessment_id = attributes[:'assessment_id'] if attributes[:'assessment_id'] self.target_id = attributes[:'targetId'] if attributes[:'targetId'] raise 'You cannot provide both :targetId and :target_id' if attributes.key?(:'targetId') && attributes.key?(:'target_id') self.target_id = attributes[:'target_id'] if attributes[:'target_id'] self.key = attributes[:'key'] if attributes[:'key'] self.is_top_finding = attributes[:'isTopFinding'] unless attributes[:'isTopFinding'].nil? raise 'You cannot provide both :isTopFinding and :is_top_finding' if attributes.key?(:'isTopFinding') && attributes.key?(:'is_top_finding') self.is_top_finding = attributes[:'is_top_finding'] unless attributes[:'is_top_finding'].nil? self.title = attributes[:'title'] if attributes[:'title'] self.category = attributes[:'category'] if attributes[:'category'] self.remarks = attributes[:'remarks'] if attributes[:'remarks'] self.details = attributes[:'details'] if attributes[:'details'] self.summary = attributes[:'summary'] if attributes[:'summary'] self.oneline = attributes[:'oneline'] if attributes[:'oneline'] self.doclink = attributes[:'doclink'] if attributes[:'doclink'] self.references = attributes[:'references'] if attributes[:'references'] self.oracle_defined_severity = attributes[:'oracleDefinedSeverity'] if attributes[:'oracleDefinedSeverity'] raise 'You cannot provide both :oracleDefinedSeverity and :oracle_defined_severity' if attributes.key?(:'oracleDefinedSeverity') && attributes.key?(:'oracle_defined_severity') self.oracle_defined_severity = attributes[:'oracle_defined_severity'] if attributes[:'oracle_defined_severity'] self.is_risk_modified = attributes[:'isRiskModified'] unless attributes[:'isRiskModified'].nil? self.is_risk_modified = false if is_risk_modified.nil? && !attributes.key?(:'isRiskModified') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isRiskModified and :is_risk_modified' if attributes.key?(:'isRiskModified') && attributes.key?(:'is_risk_modified') self.is_risk_modified = attributes[:'is_risk_modified'] unless attributes[:'is_risk_modified'].nil? self.is_risk_modified = false if is_risk_modified.nil? && !attributes.key?(:'isRiskModified') && !attributes.key?(:'is_risk_modified') # rubocop:disable Style/StringLiterals self.has_target_db_risk_level_changed = attributes[:'hasTargetDbRiskLevelChanged'] unless attributes[:'hasTargetDbRiskLevelChanged'].nil? self.has_target_db_risk_level_changed = false if has_target_db_risk_level_changed.nil? && !attributes.key?(:'hasTargetDbRiskLevelChanged') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :hasTargetDbRiskLevelChanged and :has_target_db_risk_level_changed' if attributes.key?(:'hasTargetDbRiskLevelChanged') && attributes.key?(:'has_target_db_risk_level_changed') self.has_target_db_risk_level_changed = attributes[:'has_target_db_risk_level_changed'] unless attributes[:'has_target_db_risk_level_changed'].nil? self.has_target_db_risk_level_changed = false if has_target_db_risk_level_changed.nil? && !attributes.key?(:'hasTargetDbRiskLevelChanged') && !attributes.key?(:'has_target_db_risk_level_changed') # rubocop:disable Style/StringLiterals self.justification = attributes[:'justification'] if attributes[:'justification'] self.time_valid_until = attributes[:'timeValidUntil'] if attributes[:'timeValidUntil'] raise 'You cannot provide both :timeValidUntil and :time_valid_until' if attributes.key?(:'timeValidUntil') && attributes.key?(:'time_valid_until') self.time_valid_until = attributes[:'time_valid_until'] if attributes[:'time_valid_until'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] end |
Instance Attribute Details
#assessment_id ⇒ String
The OCID of the assessment that generated this finding.
37 38 39 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 37 def assessment_id @assessment_id end |
#category ⇒ String
The category to which the finding belongs to.
57 58 59 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 57 def category @category end |
#details ⇒ Object
The details of the finding. Provides detailed information to explain the finding summary, typically results from the assessed database, followed by any recommendations for changes.
65 66 67 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 65 def details @details end |
#doclink ⇒ String
Documentation link provided by Oracle that explains a specific security finding or check.
77 78 79 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 77 def doclink @doclink end |
#has_target_db_risk_level_changed ⇒ BOOLEAN
Determines if this risk level has changed on the target database since the last time 'severity' was modified by user.
93 94 95 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 93 def has_target_db_risk_level_changed @has_target_db_risk_level_changed end |
#is_risk_modified ⇒ BOOLEAN
Determines if this risk level was modified by user.
89 90 91 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 89 def is_risk_modified @is_risk_modified end |
#is_top_finding ⇒ BOOLEAN
Indicates whether a given finding is marked as topFinding or not.
49 50 51 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 49 def is_top_finding @is_top_finding end |
#justification ⇒ String
User provided reason for accepting or modifying this finding if they choose to do so.
97 98 99 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 97 def justification @justification end |
#key ⇒ String
The unique finding key. This is a system-generated identifier. To get the finding key for a finding, use ListFindings.
45 46 47 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 45 def key @key end |
#lifecycle_details ⇒ String
Details about the current state of the finding.
114 115 116 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 114 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
The current state of the finding.
110 111 112 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 110 def lifecycle_state @lifecycle_state end |
#oneline ⇒ String
Provides a recommended approach to take to remediate the finding reported.
73 74 75 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 73 def oneline @oneline end |
#oracle_defined_severity ⇒ String
The severity of the finding as determined by security assessment. This cannot be modified by user.
85 86 87 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 85 def oracle_defined_severity @oracle_defined_severity end |
#references ⇒ OCI::DataSafe::Models::References
Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, a STIG rule, or a GDPR Article/Recital.
81 82 83 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 81 def references @references end |
#remarks ⇒ String
The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation.
61 62 63 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 61 def remarks @remarks end |
#severity ⇒ String
The severity of the finding as determined by security assessment and is same as oracleDefinedSeverity, unless modified by user.
33 34 35 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 33 def severity @severity end |
#summary ⇒ String
The brief summary of the finding. When the finding is informational, the summary typically reports only the number of data elements that were examined.
69 70 71 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 69 def summary @summary end |
#target_id ⇒ String
The OCID of the target database.
41 42 43 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 41 def target_id @target_id end |
#time_updated ⇒ DateTime
The date and time the risk level of finding was last updated, in the format defined by RFC3339.
106 107 108 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 106 def time_updated @time_updated end |
#time_valid_until ⇒ DateTime
The time until which the change in severity(deferred / modified) of this finding is valid.
101 102 103 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 101 def time_valid_until @time_valid_until end |
#title ⇒ String
The short title for the finding.
53 54 55 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 53 def title @title end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 117 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'severity': :'severity', 'assessment_id': :'assessmentId', 'target_id': :'targetId', 'key': :'key', 'is_top_finding': :'isTopFinding', 'title': :'title', 'category': :'category', 'remarks': :'remarks', 'details': :'details', 'summary': :'summary', 'oneline': :'oneline', 'doclink': :'doclink', 'references': :'references', 'oracle_defined_severity': :'oracleDefinedSeverity', 'is_risk_modified': :'isRiskModified', 'has_target_db_risk_level_changed': :'hasTargetDbRiskLevelChanged', 'justification': :'justification', 'time_valid_until': :'timeValidUntil', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 146 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'severity': :'String', 'assessment_id': :'String', 'target_id': :'String', 'key': :'String', 'is_top_finding': :'BOOLEAN', 'title': :'String', 'category': :'String', 'remarks': :'String', 'details': :'Object', 'summary': :'String', 'oneline': :'String', 'doclink': :'String', 'references': :'OCI::DataSafe::Models::References', 'oracle_defined_severity': :'String', 'is_risk_modified': :'BOOLEAN', 'has_target_db_risk_level_changed': :'BOOLEAN', 'justification': :'String', 'time_valid_until': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String', 'lifecycle_details': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 327 def ==(other) return true if equal?(other) self.class == other.class && severity == other.severity && assessment_id == other.assessment_id && target_id == other.target_id && key == other.key && is_top_finding == other.is_top_finding && title == other.title && category == other.category && remarks == other.remarks && details == other.details && summary == other.summary && oneline == other.oneline && doclink == other.doclink && references == other.references && oracle_defined_severity == other.oracle_defined_severity && is_risk_modified == other.is_risk_modified && has_target_db_risk_level_changed == other.has_target_db_risk_level_changed && justification == other.justification && time_valid_until == other.time_valid_until && time_updated == other.time_updated && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 377 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
357 358 359 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 357 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
366 367 368 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 366 def hash [severity, assessment_id, target_id, key, is_top_finding, title, category, remarks, details, summary, oneline, doclink, references, oracle_defined_severity, is_risk_modified, has_target_db_risk_level_changed, justification, time_valid_until, time_updated, lifecycle_state, lifecycle_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
410 411 412 413 414 415 416 417 418 419 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 410 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
404 405 406 |
# File 'lib/oci/data_safe/models/finding_summary.rb', line 404 def to_s to_hash.to_s end |