Class: OCI::DataSafe::Models::Finding
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::Finding
- Defined in:
- lib/oci/data_safe/models/finding.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_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#details ⇒ Object
The details of the finding.
-
#key ⇒ String
A unique identifier for the finding.
-
#references ⇒ OCI::DataSafe::Models::References
Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital.
-
#remarks ⇒ String
The explanation of the issue in this finding.
-
#severity ⇒ String
The severity of the finding.
-
#summary ⇒ String
The brief summary of the finding.
-
#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 = {}) ⇒ Finding
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 = {}) ⇒ Finding
Initializes the object
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/data_safe/models/finding.rb', line 93 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.key = attributes[:'key'] if attributes[:'key'] self.severity = attributes[:'severity'] if attributes[:'severity'] self.title = attributes[:'title'] if attributes[:'title'] self.remarks = attributes[:'remarks'] if attributes[:'remarks'] self.details = attributes[:'details'] if attributes[:'details'] self.summary = attributes[:'summary'] if attributes[:'summary'] self.references = attributes[:'references'] if attributes[:'references'] end |
Instance Attribute Details
#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.
40 41 42 |
# File 'lib/oci/data_safe/models/finding.rb', line 40 def details @details end |
#key ⇒ String
A unique identifier for the finding. This is common for the finding across targets.
24 25 26 |
# File 'lib/oci/data_safe/models/finding.rb', line 24 def key @key end |
#references ⇒ OCI::DataSafe::Models::References
Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital.
48 49 50 |
# File 'lib/oci/data_safe/models/finding.rb', line 48 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.
36 37 38 |
# File 'lib/oci/data_safe/models/finding.rb', line 36 def remarks @remarks end |
#severity ⇒ String
The severity of the finding.
28 29 30 |
# File 'lib/oci/data_safe/models/finding.rb', line 28 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.
44 45 46 |
# File 'lib/oci/data_safe/models/finding.rb', line 44 def summary @summary end |
#title ⇒ String
The short title for the finding.
32 33 34 |
# File 'lib/oci/data_safe/models/finding.rb', line 32 def title @title end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/oci/data_safe/models/finding.rb', line 51 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'severity': :'severity', 'title': :'title', 'remarks': :'remarks', 'details': :'details', 'summary': :'summary', 'references': :'references' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/data_safe/models/finding.rb', line 66 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'severity': :'String', 'title': :'String', 'remarks': :'String', 'details': :'Object', 'summary': :'String', 'references': :'OCI::DataSafe::Models::References' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/oci/data_safe/models/finding.rb', line 134 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && severity == other.severity && title == other.title && remarks == other.remarks && details == other.details && summary == other.summary && references == other.references end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/oci/data_safe/models/finding.rb', line 170 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
150 151 152 |
# File 'lib/oci/data_safe/models/finding.rb', line 150 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
159 160 161 |
# File 'lib/oci/data_safe/models/finding.rb', line 159 def hash [key, severity, title, remarks, details, summary, references].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
203 204 205 206 207 208 209 210 211 212 |
# File 'lib/oci/data_safe/models/finding.rb', line 203 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
197 198 199 |
# File 'lib/oci/data_safe/models/finding.rb', line 197 def to_s to_hash.to_s end |