Class: MicrosoftGraph::Models::SecurityVulnerability

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/security_vulnerability.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new securityVulnerability and sets the default values.



125
126
127
# File 'lib/models/security_vulnerability.rb', line 125

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a security_vulnerability

Raises:

  • (StandardError)


148
149
150
151
# File 'lib/models/security_vulnerability.rb', line 148

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return SecurityVulnerability.new
end

Instance Method Details

#active_exploits_observedObject

Gets the activeExploitsObserved property value. Indicates whether this vulnerability has any known exploits associated to known bad actors.

Returns:

  • a boolean



65
66
67
# File 'lib/models/security_vulnerability.rb', line 65

def active_exploits_observed
    return @active_exploits_observed
end

#active_exploits_observed=(value) ⇒ Object

Sets the activeExploitsObserved property value. Indicates whether this vulnerability has any known exploits associated to known bad actors.

Parameters:

  • value

    Value to set for the activeExploitsObserved property.

Returns:

  • a void



73
74
75
# File 'lib/models/security_vulnerability.rb', line 73

def active_exploits_observed=(value)
    @active_exploits_observed = value
end

#articlesObject

Gets the articles property value. Articles related to this vulnerability.

Returns:

  • a security_article



80
81
82
# File 'lib/models/security_vulnerability.rb', line 80

def articles
    return @articles
end

#articles=(value) ⇒ Object

Sets the articles property value. Articles related to this vulnerability.

Parameters:

  • value

    Value to set for the articles property.

Returns:

  • a void



88
89
90
# File 'lib/models/security_vulnerability.rb', line 88

def articles=(value)
    @articles = value
end

#common_weakness_enumeration_idsObject

Gets the commonWeaknessEnumerationIds property value. Community-defined common weakness enumerations (CWE).

Returns:

  • a string



95
96
97
# File 'lib/models/security_vulnerability.rb', line 95

def common_weakness_enumeration_ids
    return @common_weakness_enumeration_ids
end

#common_weakness_enumeration_ids=(value) ⇒ Object

Sets the commonWeaknessEnumerationIds property value. Community-defined common weakness enumerations (CWE).

Parameters:

  • value

    Value to set for the commonWeaknessEnumerationIds property.

Returns:

  • a void



103
104
105
# File 'lib/models/security_vulnerability.rb', line 103

def common_weakness_enumeration_ids=(value)
    @common_weakness_enumeration_ids = value
end

#componentsObject

Gets the components property value. Components related to this vulnerability article.

Returns:

  • a security_vulnerability_component



110
111
112
# File 'lib/models/security_vulnerability.rb', line 110

def components
    return @components
end

#components=(value) ⇒ Object

Sets the components property value. Components related to this vulnerability article.

Parameters:

  • value

    Value to set for the components property.

Returns:

  • a void



118
119
120
# File 'lib/models/security_vulnerability.rb', line 118

def components=(value)
    @components = value
end

#created_date_timeObject

Gets the createdDateTime property value. The date and time when this vulnerability article was first created.

Returns:

  • a date_time



132
133
134
# File 'lib/models/security_vulnerability.rb', line 132

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. The date and time when this vulnerability article was first created.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



140
141
142
# File 'lib/models/security_vulnerability.rb', line 140

def created_date_time=(value)
    @created_date_time = value
end

#cvss2_summaryObject

Gets the cvss2Summary property value. The cvss2Summary property

Returns:

  • a security_cvss_summary



156
157
158
# File 'lib/models/security_vulnerability.rb', line 156

def cvss2_summary
    return @cvss2_summary
end

#cvss2_summary=(value) ⇒ Object

Sets the cvss2Summary property value. The cvss2Summary property

Parameters:

  • value

    Value to set for the cvss2Summary property.

Returns:

  • a void



164
165
166
# File 'lib/models/security_vulnerability.rb', line 164

def cvss2_summary=(value)
    @cvss2_summary = value
end

#cvss3_summaryObject

Gets the cvss3Summary property value. The cvss3Summary property

Returns:

  • a security_cvss_summary



171
172
173
# File 'lib/models/security_vulnerability.rb', line 171

def cvss3_summary
    return @cvss3_summary
end

#cvss3_summary=(value) ⇒ Object

Sets the cvss3Summary property value. The cvss3Summary property

Parameters:

  • value

    Value to set for the cvss3Summary property.

Returns:

  • a void



179
180
181
# File 'lib/models/security_vulnerability.rb', line 179

def cvss3_summary=(value)
    @cvss3_summary = value
end

#descriptionObject

Gets the description property value. The description property

Returns:

  • a security_formatted_content



186
187
188
# File 'lib/models/security_vulnerability.rb', line 186

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. The description property

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



194
195
196
# File 'lib/models/security_vulnerability.rb', line 194

def description=(value)
    @description = value
end

#exploitsObject

Gets the exploits property value. Known exploits for this vulnerability.

Returns:

  • a security_hyperlink



201
202
203
# File 'lib/models/security_vulnerability.rb', line 201

def exploits
    return @exploits
end

#exploits=(value) ⇒ Object

Sets the exploits property value. Known exploits for this vulnerability.

Parameters:

  • value

    Value to set for the exploits property.

Returns:

  • a void



209
210
211
# File 'lib/models/security_vulnerability.rb', line 209

def exploits=(value)
    @exploits = value
end

#exploits_availableObject

Gets the exploitsAvailable property value. Indicates whether this vulnerability has exploits in public sources (such as Packetstorm or Exploit-DB) online.

Returns:

  • a boolean



216
217
218
# File 'lib/models/security_vulnerability.rb', line 216

def exploits_available
    return @exploits_available
end

#exploits_available=(value) ⇒ Object

Sets the exploitsAvailable property value. Indicates whether this vulnerability has exploits in public sources (such as Packetstorm or Exploit-DB) online.

Parameters:

  • value

    Value to set for the exploitsAvailable property.

Returns:

  • a void



224
225
226
# File 'lib/models/security_vulnerability.rb', line 224

def exploits_available=(value)
    @exploits_available = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

def get_field_deserializers()
    return super.merge({
        "activeExploitsObserved" => lambda {|n| @active_exploits_observed = n.get_boolean_value() },
        "articles" => lambda {|n| @articles = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SecurityArticle.create_from_discriminator_value(pn) }) },
        "commonWeaknessEnumerationIds" => lambda {|n| @common_weakness_enumeration_ids = n.get_collection_of_primitive_values(String) },
        "components" => lambda {|n| @components = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SecurityVulnerabilityComponent.create_from_discriminator_value(pn) }) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "cvss2Summary" => lambda {|n| @cvss2_summary = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityCvssSummary.create_from_discriminator_value(pn) }) },
        "cvss3Summary" => lambda {|n| @cvss3_summary = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityCvssSummary.create_from_discriminator_value(pn) }) },
        "description" => lambda {|n| @description = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityFormattedContent.create_from_discriminator_value(pn) }) },
        "exploits" => lambda {|n| @exploits = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SecurityHyperlink.create_from_discriminator_value(pn) }) },
        "exploitsAvailable" => lambda {|n| @exploits_available = n.get_boolean_value() },
        "hasChatter" => lambda {|n| @has_chatter = n.get_boolean_value() },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "priorityScore" => lambda {|n| @priority_score = n.get_number_value() },
        "publishedDateTime" => lambda {|n| @published_date_time = n.get_date_time_value() },
        "references" => lambda {|n| @references = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SecurityHyperlink.create_from_discriminator_value(pn) }) },
        "remediation" => lambda {|n| @remediation = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityFormattedContent.create_from_discriminator_value(pn) }) },
        "severity" => lambda {|n| @severity = n.get_enum_value(MicrosoftGraph::Models::SecurityVulnerabilitySeverity) },
    })
end

#has_chatterObject

Gets the hasChatter property value. Indicates whether chatter about this vulnerability has been discovered online.

Returns:

  • a boolean



256
257
258
# File 'lib/models/security_vulnerability.rb', line 256

def has_chatter
    return @has_chatter
end

#has_chatter=(value) ⇒ Object

Sets the hasChatter property value. Indicates whether chatter about this vulnerability has been discovered online.

Parameters:

  • value

    Value to set for the hasChatter property.

Returns:

  • a void



264
265
266
# File 'lib/models/security_vulnerability.rb', line 264

def has_chatter=(value)
    @has_chatter = value
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. The date and time when this vulnerability article was most recently updated.

Returns:

  • a date_time



271
272
273
# File 'lib/models/security_vulnerability.rb', line 271

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. The date and time when this vulnerability article was most recently updated.

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



279
280
281
# File 'lib/models/security_vulnerability.rb', line 279

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#priority_scoreObject

Gets the priorityScore property value. A unique algorithm that reflects the priority of a vulnerability based on the CVSS score, exploits, chatter, and linkage to malware. This property also evaluates the recency of these components so users can understand which vulnerability should be remediated first.

Returns:

  • a integer



286
287
288
# File 'lib/models/security_vulnerability.rb', line 286

def priority_score
    return @priority_score
end

#priority_score=(value) ⇒ Object

Sets the priorityScore property value. A unique algorithm that reflects the priority of a vulnerability based on the CVSS score, exploits, chatter, and linkage to malware. This property also evaluates the recency of these components so users can understand which vulnerability should be remediated first.

Parameters:

  • value

    Value to set for the priorityScore property.

Returns:

  • a void



294
295
296
# File 'lib/models/security_vulnerability.rb', line 294

def priority_score=(value)
    @priority_score = value
end

#published_date_timeObject

Gets the publishedDateTime property value. The date and time when this vulnerability article was published.

Returns:

  • a date_time



301
302
303
# File 'lib/models/security_vulnerability.rb', line 301

def published_date_time
    return @published_date_time
end

#published_date_time=(value) ⇒ Object

Sets the publishedDateTime property value. The date and time when this vulnerability article was published.

Parameters:

  • value

    Value to set for the publishedDateTime property.

Returns:

  • a void



309
310
311
# File 'lib/models/security_vulnerability.rb', line 309

def published_date_time=(value)
    @published_date_time = value
end

#referencesObject

Gets the references property value. Reference links where further information can be learned about this vulnerability.

Returns:

  • a security_hyperlink



316
317
318
# File 'lib/models/security_vulnerability.rb', line 316

def references
    return @references
end

#references=(value) ⇒ Object

Sets the references property value. Reference links where further information can be learned about this vulnerability.

Parameters:

  • value

    Value to set for the references property.

Returns:

  • a void



324
325
326
# File 'lib/models/security_vulnerability.rb', line 324

def references=(value)
    @references = value
end

#remediationObject

Gets the remediation property value. Any known remediation steps.

Returns:

  • a security_formatted_content



331
332
333
# File 'lib/models/security_vulnerability.rb', line 331

def remediation
    return @remediation
end

#remediation=(value) ⇒ Object

Sets the remediation property value. Any known remediation steps.

Parameters:

  • value

    Value to set for the remediation property.

Returns:

  • a void



339
340
341
# File 'lib/models/security_vulnerability.rb', line 339

def remediation=(value)
    @remediation = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# File 'lib/models/security_vulnerability.rb', line 347

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_boolean_value("activeExploitsObserved", @active_exploits_observed)
    writer.write_collection_of_object_values("articles", @articles)
    writer.write_collection_of_primitive_values("commonWeaknessEnumerationIds", @common_weakness_enumeration_ids)
    writer.write_collection_of_object_values("components", @components)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_object_value("cvss2Summary", @cvss2_summary)
    writer.write_object_value("cvss3Summary", @cvss3_summary)
    writer.write_object_value("description", @description)
    writer.write_collection_of_object_values("exploits", @exploits)
    writer.write_boolean_value("exploitsAvailable", @exploits_available)
    writer.write_boolean_value("hasChatter", @has_chatter)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_number_value("priorityScore", @priority_score)
    writer.write_date_time_value("publishedDateTime", @published_date_time)
    writer.write_collection_of_object_values("references", @references)
    writer.write_object_value("remediation", @remediation)
    writer.write_enum_value("severity", @severity)
end

#severityObject

Gets the severity property value. The severity property

Returns:

  • a security_vulnerability_severity



372
373
374
# File 'lib/models/security_vulnerability.rb', line 372

def severity
    return @severity
end

#severity=(value) ⇒ Object

Sets the severity property value. The severity property

Parameters:

  • value

    Value to set for the severity property.

Returns:

  • a void



380
381
382
# File 'lib/models/security_vulnerability.rb', line 380

def severity=(value)
    @severity = value
end