Class: OCI::DataSafe::Models::FindingSummary

Inherits:
Object
  • Object
show all
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_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ FindingSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :severity (String)

    The value to assign to the #severity property

  • :assessment_id (String)

    The value to assign to the #assessment_id property

  • :target_id (String)

    The value to assign to the #target_id property

  • :key (String)

    The value to assign to the #key property

  • :title (String)

    The value to assign to the #title property

  • :remarks (String)

    The value to assign to the #remarks property

  • :details (Object)

    The value to assign to the #details property

  • :summary (String)

    The value to assign to the #summary property

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

    The value to assign to the #references property



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
132
133
134
135
136
137
138
# File 'lib/oci/data_safe/models/finding_summary.rb', line 107

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.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

#assessment_idString

The OCID of the assessment that generated this finding.

Returns:

  • (String)


28
29
30
# File 'lib/oci/data_safe/models/finding_summary.rb', line 28

def assessment_id
  @assessment_id
end

#detailsObject

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.

Returns:

  • (Object)


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

def details
  @details
end

#keyString

The unique finding key. This is a system-generated identifier. To get the finding key for a finding, use ListFindings.

Returns:

  • (String)


36
37
38
# File 'lib/oci/data_safe/models/finding_summary.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, a STIG rule, or a GDPR Article/Recital.



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

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)


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

def remarks
  @remarks
end

#severityString

The severity of the finding.

Returns:

  • (String)


24
25
26
# File 'lib/oci/data_safe/models/finding_summary.rb', line 24

def severity
  @severity
end

#summaryString

The brief summary of the finding. When the finding is informational, the summary typically reports only the number of data elements that were examined.

Returns:

  • (String)


52
53
54
# File 'lib/oci/data_safe/models/finding_summary.rb', line 52

def summary
  @summary
end

#target_idString

The OCID of the target database.

Returns:

  • (String)


32
33
34
# File 'lib/oci/data_safe/models/finding_summary.rb', line 32

def target_id
  @target_id
end

#titleString

The short title for the finding.

Returns:

  • (String)


40
41
42
# File 'lib/oci/data_safe/models/finding_summary.rb', line 40

def title
  @title
end

Class Method Details

.attribute_mapObject

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



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/oci/data_safe/models/finding_summary.rb', line 59

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'severity': :'severity',
    'assessment_id': :'assessmentId',
    'target_id': :'targetId',
    'key': :'key',
    'title': :'title',
    'remarks': :'remarks',
    'details': :'details',
    'summary': :'summary',
    'references': :'references'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'severity': :'String',
    'assessment_id': :'String',
    'target_id': :'String',
    'key': :'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.

Parameters:

  • other (Object)

    the other object to be compared



160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/oci/data_safe/models/finding_summary.rb', line 160

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 &&
    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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/oci/data_safe/models/finding_summary.rb', line 198

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


178
179
180
# File 'lib/oci/data_safe/models/finding_summary.rb', line 178

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



187
188
189
# File 'lib/oci/data_safe/models/finding_summary.rb', line 187

def hash
  [severity, assessment_id, target_id, key, title, remarks, details, summary, references].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



231
232
233
234
235
236
237
238
239
240
# File 'lib/oci/data_safe/models/finding_summary.rb', line 231

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



225
226
227
# File 'lib/oci/data_safe/models/finding_summary.rb', line 225

def to_s
  to_hash.to_s
end