Class: OCI::DataSafe::Models::FindingsChangeAuditLogSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_safe/models/findings_change_audit_log_summary.rb

Overview

Summary of audit log of risk updates of findings of specified security assessment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ FindingsChangeAuditLogSummary

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

  • :finding_key (String)

    The value to assign to the #finding_key property

  • :finding_title (String)

    The value to assign to the #finding_title 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

  • :time_updated (DateTime)

    The value to assign to the #time_updated property

  • :severity (String)

    The value to assign to the #severity property

  • :oracle_defined_severity (String)

    The value to assign to the #oracle_defined_severity property

  • :is_risk_deferred (BOOLEAN)

    The value to assign to the #is_risk_deferred property

  • :previous_severity (String)

    The value to assign to the #previous_severity property

  • :justification (String)

    The value to assign to the #justification property

  • :time_valid_until (DateTime)

    The value to assign to the #time_valid_until property

  • :modified_by (String)

    The value to assign to the #modified_by property



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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 130

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

  raise 'You cannot provide both :findingKey and :finding_key' if attributes.key?(:'findingKey') && attributes.key?(:'finding_key')

  self.finding_key = attributes[:'finding_key'] if attributes[:'finding_key']

  self.finding_title = attributes[:'findingTitle'] if attributes[:'findingTitle']

  raise 'You cannot provide both :findingTitle and :finding_title' if attributes.key?(:'findingTitle') && attributes.key?(:'finding_title')

  self.finding_title = attributes[:'finding_title'] if attributes[:'finding_title']

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

  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_deferred = attributes[:'isRiskDeferred'] unless attributes[:'isRiskDeferred'].nil?

  raise 'You cannot provide both :isRiskDeferred and :is_risk_deferred' if attributes.key?(:'isRiskDeferred') && attributes.key?(:'is_risk_deferred')

  self.is_risk_deferred = attributes[:'is_risk_deferred'] unless attributes[:'is_risk_deferred'].nil?

  self.previous_severity = attributes[:'previousSeverity'] if attributes[:'previousSeverity']

  raise 'You cannot provide both :previousSeverity and :previous_severity' if attributes.key?(:'previousSeverity') && attributes.key?(:'previous_severity')

  self.previous_severity = attributes[:'previous_severity'] if attributes[:'previous_severity']

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

  raise 'You cannot provide both :modifiedBy and :modified_by' if attributes.key?(:'modifiedBy') && attributes.key?(:'modified_by')

  self.modified_by = attributes[:'modified_by'] if attributes[:'modified_by']
end

Instance Attribute Details

#assessment_idString

[Required] The OCID of the latest security assessment.

Returns:

  • (String)


25
26
27
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 25

def assessment_id
  @assessment_id
end

#finding_keyString

[Required] The unique key that identifies the finding.

Returns:

  • (String)


17
18
19
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 17

def finding_key
  @finding_key
end

#finding_titleString

[Required] The short title for the finding whose risk is being modified.

Returns:

  • (String)


21
22
23
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 21

def finding_title
  @finding_title
end

#is_risk_deferredBOOLEAN

[Required] Determines if the user has deferred the risk level of this finding when he is ok with it and does not plan to do anything about it.

Returns:

  • (BOOLEAN)


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

def is_risk_deferred
  @is_risk_deferred
end

#justificationString

[Required] The justification given by the user for accepting or modifying the risk level.

Returns:

  • (String)


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

def justification
  @justification
end

#keyString

[Required] The unique key that identifies the finding risk change.

Returns:

  • (String)


13
14
15
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 13

def key
  @key
end

#modified_byString

[Required] The user who initiated change of risk level of the finding

Returns:

  • (String)


67
68
69
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 67

def modified_by
  @modified_by
end

#oracle_defined_severityString

[Required] The severity of the finding as determined by security assessment by Oracle.

Returns:

  • (String)


42
43
44
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 42

def oracle_defined_severity
  @oracle_defined_severity
end

#previous_severityString

[Required] If the risk level is changed more than once, the previous modified value.

Returns:

  • (String)


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

def previous_severity
  @previous_severity
end

#severityString

[Required] The original severity / risk level of the finding as determined by security assessment.

Returns:

  • (String)


38
39
40
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 38

def severity
  @severity
end

#target_idString

[Required] The OCID of the target database.

Returns:

  • (String)


29
30
31
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 29

def target_id
  @target_id
end

#time_updatedDateTime

[Required] The date and time the risk level of finding was last updated, in the format defined by RFC3339.

Returns:

  • (DateTime)


34
35
36
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 34

def time_updated
  @time_updated
end

#time_valid_untilDateTime

The date and time, in the format defined by RFC3339, the risk level change as updated by user is valid until. After this date passes, the risk level will be that of what is determined by the latest security assessment.

Returns:

  • (DateTime)


63
64
65
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 63

def time_valid_until
  @time_valid_until
end

Class Method Details

.attribute_mapObject

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



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 70

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'finding_key': :'findingKey',
    'finding_title': :'findingTitle',
    'assessment_id': :'assessmentId',
    'target_id': :'targetId',
    'time_updated': :'timeUpdated',
    'severity': :'severity',
    'oracle_defined_severity': :'oracleDefinedSeverity',
    'is_risk_deferred': :'isRiskDeferred',
    'previous_severity': :'previousSeverity',
    'justification': :'justification',
    'time_valid_until': :'timeValidUntil',
    'modified_by': :'modifiedBy'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'finding_key': :'String',
    'finding_title': :'String',
    'assessment_id': :'String',
    'target_id': :'String',
    'time_updated': :'DateTime',
    'severity': :'String',
    'oracle_defined_severity': :'String',
    'is_risk_deferred': :'BOOLEAN',
    'previous_severity': :'String',
    'justification': :'String',
    'time_valid_until': :'DateTime',
    'modified_by': :'String'
    # 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



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 210

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

  self.class == other.class &&
    key == other.key &&
    finding_key == other.finding_key &&
    finding_title == other.finding_title &&
    assessment_id == other.assessment_id &&
    target_id == other.target_id &&
    time_updated == other.time_updated &&
    severity == other.severity &&
    oracle_defined_severity == other.oracle_defined_severity &&
    is_risk_deferred == other.is_risk_deferred &&
    previous_severity == other.previous_severity &&
    justification == other.justification &&
    time_valid_until == other.time_valid_until &&
    modified_by == other.modified_by
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



252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 252

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


232
233
234
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 232

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



241
242
243
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 241

def hash
  [key, finding_key, finding_title, assessment_id, target_id, time_updated, severity, oracle_defined_severity, is_risk_deferred, previous_severity, justification, time_valid_until, modified_by].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



285
286
287
288
289
290
291
292
293
294
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 285

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



279
280
281
# File 'lib/oci/data_safe/models/findings_change_audit_log_summary.rb', line 279

def to_s
  to_hash.to_s
end