Class: OCI::DataSafe::Models::FindingAnalyticsDimensions

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ FindingAnalyticsDimensions

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :key (String)

    The value to assign to the #key property

  • :top_finding_category (String)

    The value to assign to the #top_finding_category property

  • :category (String)

    The value to assign to the #category property

  • :title (String)

    The value to assign to the #title property

  • :top_finding_status (String)

    The value to assign to the #top_finding_status property

  • :severity (String)

    The value to assign to the #severity property

  • :remarks (String)

    The value to assign to the #remarks property

  • :target_id (String)

    The value to assign to the #target_id property

  • :references (OCI::DataSafe::Models::References)

    The value to assign to the #references property



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
152
153
154
155
156
157
158
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 123

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.category = attributes[:'category'] if attributes[:'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.remarks = attributes[:'remarks'] if attributes[:'remarks']

  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.references = attributes[:'references'] if attributes[:'references']
end

Instance Attribute Details

#categoryString

The category of the top finding.

Returns:

  • (String)


44
45
46
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 44

def category
  @category
end

#keyString

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.

Returns:

  • (String)


36
37
38
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 36

def key
  @key
end

#referencesOCI::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.



72
73
74
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 72

def references
  @references
end

#remarksString

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.

Returns:

  • (String)


64
65
66
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 64

def remarks
  @remarks
end

#severityString

The severity (risk level) of the finding.

Returns:

  • (String)


60
61
62
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 60

def severity
  @severity
end

#target_idString

The OCID of the target database.

Returns:

  • (String)


68
69
70
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 68

def target_id
  @target_id
end

#titleString

The short title of the finding.

Returns:

  • (String)


48
49
50
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 48

def title
  @title
end

#top_finding_categoryString

The category of the top finding.

Returns:

  • (String)


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_statusString

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.

Returns:

  • (String)


56
57
58
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 56

def top_finding_status
  @top_finding_status
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 75

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'top_finding_category': :'topFindingCategory',
    'category': :'category',
    'title': :'title',
    'top_finding_status': :'topFindingStatus',
    'severity': :'severity',
    'remarks': :'remarks',
    'target_id': :'targetId',
    'references': :'references'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 92

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'top_finding_category': :'String',
    'category': :'String',
    'title': :'String',
    'top_finding_status': :'String',
    'severity': :'String',
    'remarks': :'String',
    'target_id': :'String',
    'references': :'OCI::DataSafe::Models::References'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 193

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    key == other.key &&
    top_finding_category == other.top_finding_category &&
    category == other.category &&
    title == other.title &&
    top_finding_status == other.top_finding_status &&
    severity == other.severity &&
    remarks == other.remarks &&
    target_id == other.target_id &&
    references == other.references
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 231

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


211
212
213
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 211

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



220
221
222
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 220

def hash
  [key, top_finding_category, category, title, top_finding_status, severity, remarks, target_id, references].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



264
265
266
267
268
269
270
271
272
273
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 264

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



258
259
260
# File 'lib/oci/data_safe/models/finding_analytics_dimensions.rb', line 258

def to_s
  to_hash.to_s
end