Class: OCI::DataSafe::Models::FindingAnalyticsDimensions
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::FindingAnalyticsDimensions
- Defined in:
- lib/oci/data_safe/models/finding_analytics_dimensions.rb
Overview
The scope of analytics data.
Constant Summary collapse
- TOP_FINDING_STATUS_ENUM =
[ TOP_FINDING_STATUS_RISK = 'RISK'.freeze, TOP_FINDING_STATUS_EVALUATE = 'EVALUATE'.freeze, TOP_FINDING_STATUS_ADVISORY = 'ADVISORY'.freeze, TOP_FINDING_STATUS_PASS = 'PASS'.freeze, TOP_FINDING_STATUS_DEFERRED = 'DEFERRED'.freeze, TOP_FINDING_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- 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
Instance Attribute Summary collapse
-
#key ⇒ String
Each finding in security assessment has an associated key (think of key as a finding's name).
-
#severity ⇒ String
The severity (risk level) of the finding.
-
#target_id ⇒ String
The OCID of the target database.
-
#title ⇒ String
The short title of the finding.
-
#top_finding_category ⇒ String
The category of the top finding.
-
#top_finding_status ⇒ String
The status of the top 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 = {}) ⇒ FindingAnalyticsDimensions
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 = {}) ⇒ FindingAnalyticsDimensions
Initializes the object
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 102 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.top_finding_category = attributes[:'topFindingCategory'] if attributes[:'topFindingCategory'] raise 'You cannot provide both :topFindingCategory and :top_finding_category' if attributes.key?(:'topFindingCategory') && attributes.key?(:'top_finding_category') self.top_finding_category = attributes[:'top_finding_category'] if attributes[:'top_finding_category'] self.title = attributes[:'title'] if attributes[:'title'] self.top_finding_status = attributes[:'topFindingStatus'] if attributes[:'topFindingStatus'] raise 'You cannot provide both :topFindingStatus and :top_finding_status' if attributes.key?(:'topFindingStatus') && attributes.key?(:'top_finding_status') self.top_finding_status = attributes[:'top_finding_status'] if attributes[:'top_finding_status'] self.severity = attributes[:'severity'] if attributes[:'severity'] 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'] end |
Instance Attribute Details
#key ⇒ String
Each finding in security assessment has an associated key (think of key as a finding's name). For a given finding, the key will be the same across targets. The user can use these keys to filter the findings.
36 37 38 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 36 def key @key end |
#severity ⇒ String
The severity (risk level) of the finding.
56 57 58 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 56 def severity @severity end |
#target_id ⇒ String
The OCID of the target database.
60 61 62 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 60 def target_id @target_id end |
#title ⇒ String
The short title of the finding.
44 45 46 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 44 def title @title end |
#top_finding_category ⇒ String
The category of the top finding.
40 41 42 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 40 def top_finding_category @top_finding_category end |
#top_finding_status ⇒ String
The status of the top finding. All findings will have "severity" to indicate the risk level, but only top findings will have "status". Possible status: Pass / Risk (Low, Medium, High)/ Evaluate / Advisory / Deferred Instead of having "Low, Medium, High" in severity, "Risk" will include these three situations in status.
52 53 54 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 52 def top_finding_status @top_finding_status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 63 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'top_finding_category': :'topFindingCategory', 'title': :'title', 'top_finding_status': :'topFindingStatus', 'severity': :'severity', 'target_id': :'targetId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 77 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'top_finding_category': :'String', 'title': :'String', 'top_finding_status': :'String', 'severity': :'String', 'target_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 166 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && top_finding_category == other.top_finding_category && title == other.title && top_finding_status == other.top_finding_status && severity == other.severity && target_id == other.target_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 201 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
181 182 183 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 181 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
190 191 192 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 190 def hash [key, top_finding_category, title, top_finding_status, severity, target_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
234 235 236 237 238 239 240 241 242 243 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 234 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
228 229 230 |
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 228 def to_s to_hash.to_s end |