Class: OCI::Adm::Models::VulnerabilityAudit

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/adm/models/vulnerability_audit.rb

Overview

A vulnerability audit associates the application dependencies of a project with their associated Vulnerabilities. Each Vulnerability is associated with a score (Common Vulnerability Scoring System V2 or V3). A vulnerable application dependency can be ignored based on the configuration of the vulnerability audit. maxObservedCvssV2Score, maxObservedCvssV3Score and vulnerableArtifactsCount do not take into account non-vulnerable application dependency.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_DETAILS_ENUM =
[
  LIFECYCLE_DETAILS_USAGE_DATA_NOT_FOUND_OR_NOT_AUTHORIZED = 'USAGE_DATA_NOT_FOUND_OR_NOT_AUTHORIZED'.freeze,
  LIFECYCLE_DETAILS_USAGE_DATA_PARSE_FAILED = 'USAGE_DATA_PARSE_FAILED'.freeze,
  LIFECYCLE_DETAILS_USAGE_DATA_COMPRESSED_SIZE_LIMIT_EXCEEDED = 'USAGE_DATA_COMPRESSED_SIZE_LIMIT_EXCEEDED'.freeze,
  LIFECYCLE_DETAILS_USAGE_DATA_UNCOMPRESSED_SIZE_LIMIT_EXCEEDED = 'USAGE_DATA_UNCOMPRESSED_SIZE_LIMIT_EXCEEDED'.freeze,
  LIFECYCLE_DETAILS_USAGE_DATA_UNKNOWN_ERROR = 'USAGE_DATA_UNKNOWN_ERROR'.freeze,
  LIFECYCLE_DETAILS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
MAX_OBSERVED_SEVERITY_ENUM =
[
  MAX_OBSERVED_SEVERITY_NONE = 'NONE'.freeze,
  MAX_OBSERVED_SEVERITY_LOW = 'LOW'.freeze,
  MAX_OBSERVED_SEVERITY_MEDIUM = 'MEDIUM'.freeze,
  MAX_OBSERVED_SEVERITY_HIGH = 'HIGH'.freeze,
  MAX_OBSERVED_SEVERITY_CRITICAL = 'CRITICAL'.freeze,
  MAX_OBSERVED_SEVERITY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
MAX_OBSERVED_SEVERITY_WITH_IGNORED_ENUM =
[
  MAX_OBSERVED_SEVERITY_WITH_IGNORED_NONE = 'NONE'.freeze,
  MAX_OBSERVED_SEVERITY_WITH_IGNORED_LOW = 'LOW'.freeze,
  MAX_OBSERVED_SEVERITY_WITH_IGNORED_MEDIUM = 'MEDIUM'.freeze,
  MAX_OBSERVED_SEVERITY_WITH_IGNORED_HIGH = 'HIGH'.freeze,
  MAX_OBSERVED_SEVERITY_WITH_IGNORED_CRITICAL = 'CRITICAL'.freeze,
  MAX_OBSERVED_SEVERITY_WITH_IGNORED_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
BUILD_TYPE_ENUM =
[
  BUILD_TYPE_MAVEN = 'MAVEN'.freeze,
  BUILD_TYPE_UNSET = 'UNSET'.freeze,
  BUILD_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ VulnerabilityAudit

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 259

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

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

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

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

  self.knowledge_base_id = attributes[:'knowledgeBaseId'] if attributes[:'knowledgeBaseId']

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

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

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

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

  self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails']

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

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

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

  self.max_observed_cvss_v2_score = attributes[:'maxObservedCvssV2Score'] if attributes[:'maxObservedCvssV2Score']

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

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

  self.max_observed_cvss_v3_score = attributes[:'maxObservedCvssV3Score'] if attributes[:'maxObservedCvssV3Score']

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

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

  self.max_observed_severity = attributes[:'maxObservedSeverity'] if attributes[:'maxObservedSeverity']

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

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

  self.max_observed_cvss_v2_score_with_ignored = attributes[:'maxObservedCvssV2ScoreWithIgnored'] if attributes[:'maxObservedCvssV2ScoreWithIgnored']

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

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

  self.max_observed_cvss_v3_score_with_ignored = attributes[:'maxObservedCvssV3ScoreWithIgnored'] if attributes[:'maxObservedCvssV3ScoreWithIgnored']

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

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

  self.max_observed_severity_with_ignored = attributes[:'maxObservedSeverityWithIgnored'] if attributes[:'maxObservedSeverityWithIgnored']

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

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

  self.vulnerable_artifacts_count_with_ignored = attributes[:'vulnerableArtifactsCountWithIgnored'] if attributes[:'vulnerableArtifactsCountWithIgnored']

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

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

  self.vulnerable_artifacts_count = attributes[:'vulnerableArtifactsCount'] if attributes[:'vulnerableArtifactsCount']

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

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

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

  self.usage_data = attributes[:'usageData'] if attributes[:'usageData']

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

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

  self.is_success = attributes[:'isSuccess'] unless attributes[:'isSuccess'].nil?

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

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

  self.build_type = attributes[:'buildType'] if attributes[:'buildType']

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

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

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

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

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

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

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

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

  self.system_tags = attributes[:'systemTags'] if attributes[:'systemTags']

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

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

Instance Attribute Details

#build_typeString

[Required] The type of the build tool is restricted to only two values MAVEN or UNSET. Use UNSET when the list of application dependencies is not Maven-related or is a mix of Maven and other ecosystems. This option is soon to be deprecated.

Returns:

  • (String)


134
135
136
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 134

def build_type
  @build_type
end

#compartment_idString

[Required] The compartment Oracle Cloud identifier (OCID) of the vulnerability audit.

Returns:

  • (String)


142
143
144
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 142

def compartment_id
  @compartment_id
end

#configurationOCI::Adm::Models::VulnerabilityAuditConfiguration



123
124
125
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 123

def configuration
  @configuration
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


154
155
156
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 154

def defined_tags
  @defined_tags
end

#display_nameString

The name of the vulnerability audit.

Returns:

  • (String)


64
65
66
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 64

def display_name
  @display_name
end

#freeform_tagsHash<String, String>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}

Returns:

  • (Hash<String, String>)


148
149
150
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 148

def freeform_tags
  @freeform_tags
end

#idString

[Required] The Oracle Cloud identifier (OCID) of the vulnerability audit.

Returns:

  • (String)


60
61
62
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 60

def id
  @id
end

#is_successBOOLEAN

Indicates if an audit succeeded according to the configuration. The value is null if the audit is in the CREATING state.

Returns:

  • (BOOLEAN)


130
131
132
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 130

def is_success
  @is_success
end

#knowledge_base_idString

[Required] The Oracle Cloud identifier (OCID) of the knowledge base.

Returns:

  • (String)


68
69
70
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 68

def knowledge_base_id
  @knowledge_base_id
end

#lifecycle_detailsString

Details on the lifecycle state.

Returns:

  • (String)


84
85
86
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 84

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current lifecycle state of the vulnerability audit.

Returns:

  • (String)


80
81
82
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 80

def lifecycle_state
  @lifecycle_state
end

#max_observed_cvss_v2_scoreFloat

Maximum Common Vulnerability Scoring System Version 2 score observed for non-ignored vulnerable application dependencies.

Returns:

  • (Float)


92
93
94
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 92

def max_observed_cvss_v2_score
  @max_observed_cvss_v2_score
end

#max_observed_cvss_v2_score_with_ignoredFloat

Maximum Common Vulnerability Scoring System Version 2 score observed for vulnerable application dependencies including ignored ones.

Returns:

  • (Float)


104
105
106
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 104

def max_observed_cvss_v2_score_with_ignored
  @max_observed_cvss_v2_score_with_ignored
end

#max_observed_cvss_v3_scoreFloat

Maximum Common Vulnerability Scoring System Version 3 score observed for non-ignored vulnerable application dependencies.

Returns:

  • (Float)


96
97
98
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 96

def max_observed_cvss_v3_score
  @max_observed_cvss_v3_score
end

#max_observed_cvss_v3_score_with_ignoredFloat

Maximum Common Vulnerability Scoring System Version 3 score observed for vulnerable application dependencies including ignored ones.

Returns:

  • (Float)


108
109
110
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 108

def max_observed_cvss_v3_score_with_ignored
  @max_observed_cvss_v3_score_with_ignored
end

#max_observed_severityString

Maximum ADM Severity observed for non-ignored vulnerable application dependencies.

Returns:

  • (String)


100
101
102
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 100

def max_observed_severity
  @max_observed_severity
end

#max_observed_severity_with_ignoredString

Maximum ADM Severity observed for vulnerable application dependencies including ignored ones.

Returns:

  • (String)


112
113
114
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 112

def max_observed_severity_with_ignored
  @max_observed_severity_with_ignored
end

#sourceOCI::Adm::Models::VulnerabilityAuditSource

This attribute is required.



138
139
140
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 138

def source
  @source
end

#system_tagsHash<String, Hash<String, Object>>

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


160
161
162
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 160

def system_tags
  @system_tags
end

#time_createdDateTime

[Required] The creation date and time of the vulnerability audit (formatted according to RFC3339).

Returns:

  • (DateTime)


72
73
74
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 72

def time_created
  @time_created
end

#time_updatedDateTime

[Required] The update date and time of the vulnerability audit (formatted according to RFC3339).

Returns:

  • (DateTime)


76
77
78
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 76

def time_updated
  @time_updated
end

#usage_dataOCI::Adm::Models::UsageDataDetails



126
127
128
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 126

def usage_data
  @usage_data
end

#vulnerabilitiesArray<OCI::Adm::Models::Vulnerability>

[Required] List of vulnerabilities found in the vulnerability audit. If a vulnerability affects multiple dependencies, the metadata returned here consists of audit-wide aggregates.



88
89
90
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 88

def vulnerabilities
  @vulnerabilities
end

#vulnerable_artifacts_countInteger

[Required] Count of non-ignored vulnerable application dependencies.

Returns:

  • (Integer)


120
121
122
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 120

def vulnerable_artifacts_count
  @vulnerable_artifacts_count
end

#vulnerable_artifacts_count_with_ignoredInteger

[Required] Count of all vulnerable application dependencies.

Returns:

  • (Integer)


116
117
118
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 116

def vulnerable_artifacts_count_with_ignored
  @vulnerable_artifacts_count_with_ignored
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 163

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'display_name': :'displayName',
    'knowledge_base_id': :'knowledgeBaseId',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'vulnerabilities': :'vulnerabilities',
    'max_observed_cvss_v2_score': :'maxObservedCvssV2Score',
    'max_observed_cvss_v3_score': :'maxObservedCvssV3Score',
    'max_observed_severity': :'maxObservedSeverity',
    'max_observed_cvss_v2_score_with_ignored': :'maxObservedCvssV2ScoreWithIgnored',
    'max_observed_cvss_v3_score_with_ignored': :'maxObservedCvssV3ScoreWithIgnored',
    'max_observed_severity_with_ignored': :'maxObservedSeverityWithIgnored',
    'vulnerable_artifacts_count_with_ignored': :'vulnerableArtifactsCountWithIgnored',
    'vulnerable_artifacts_count': :'vulnerableArtifactsCount',
    'configuration': :'configuration',
    'usage_data': :'usageData',
    'is_success': :'isSuccess',
    'build_type': :'buildType',
    'source': :'source',
    'compartment_id': :'compartmentId',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'system_tags': :'systemTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 196

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'display_name': :'String',
    'knowledge_base_id': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'vulnerabilities': :'Array<OCI::Adm::Models::Vulnerability>',
    'max_observed_cvss_v2_score': :'Float',
    'max_observed_cvss_v3_score': :'Float',
    'max_observed_severity': :'String',
    'max_observed_cvss_v2_score_with_ignored': :'Float',
    'max_observed_cvss_v3_score_with_ignored': :'Float',
    'max_observed_severity_with_ignored': :'String',
    'vulnerable_artifacts_count_with_ignored': :'Integer',
    'vulnerable_artifacts_count': :'Integer',
    'configuration': :'OCI::Adm::Models::VulnerabilityAuditConfiguration',
    'usage_data': :'OCI::Adm::Models::UsageDataDetails',
    'is_success': :'BOOLEAN',
    'build_type': :'String',
    'source': :'OCI::Adm::Models::VulnerabilityAuditSource',
    'compartment_id': :'String',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'system_tags': :'Hash<String, Hash<String, Object>>'
    # 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



472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 472

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

  self.class == other.class &&
    id == other.id &&
    display_name == other.display_name &&
    knowledge_base_id == other.knowledge_base_id &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    vulnerabilities == other.vulnerabilities &&
    max_observed_cvss_v2_score == other.max_observed_cvss_v2_score &&
    max_observed_cvss_v3_score == other.max_observed_cvss_v3_score &&
    max_observed_severity == other.max_observed_severity &&
    max_observed_cvss_v2_score_with_ignored == other.max_observed_cvss_v2_score_with_ignored &&
    max_observed_cvss_v3_score_with_ignored == other.max_observed_cvss_v3_score_with_ignored &&
    max_observed_severity_with_ignored == other.max_observed_severity_with_ignored &&
    vulnerable_artifacts_count_with_ignored == other.vulnerable_artifacts_count_with_ignored &&
    vulnerable_artifacts_count == other.vulnerable_artifacts_count &&
    configuration == other.configuration &&
    usage_data == other.usage_data &&
    is_success == other.is_success &&
    build_type == other.build_type &&
    source == other.source &&
    compartment_id == other.compartment_id &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    system_tags == other.system_tags
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



526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 526

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


506
507
508
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 506

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



515
516
517
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 515

def hash
  [id, display_name, knowledge_base_id, time_created, time_updated, lifecycle_state, lifecycle_details, vulnerabilities, max_observed_cvss_v2_score, max_observed_cvss_v3_score, max_observed_severity, max_observed_cvss_v2_score_with_ignored, max_observed_cvss_v3_score_with_ignored, max_observed_severity_with_ignored, vulnerable_artifacts_count_with_ignored, vulnerable_artifacts_count, configuration, usage_data, is_success, build_type, source, compartment_id, freeform_tags, defined_tags, system_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



559
560
561
562
563
564
565
566
567
568
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 559

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



553
554
555
# File 'lib/oci/adm/models/vulnerability_audit.rb', line 553

def to_s
  to_hash.to_s
end