Class: MicrosoftGraph::Models::MalwareState

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/malware_state.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new malwareState and sets the default values.



64
65
66
# File 'lib/models/malware_state.rb', line 64

def initialize()
    @additional_data = Hash.new
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 malware_state

Raises:

  • (StandardError)


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

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

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



34
35
36
# File 'lib/models/malware_state.rb', line 34

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



42
43
44
# File 'lib/models/malware_state.rb', line 42

def additional_data=(value)
    @additional_data = value
end

#categoryObject

Gets the category property value. Provider-generated malware category (for example, trojan, ransomware, etc.).

Returns:

  • a string



49
50
51
# File 'lib/models/malware_state.rb', line 49

def category
    return @category
end

#category=(value) ⇒ Object

Sets the category property value. Provider-generated malware category (for example, trojan, ransomware, etc.).

Parameters:

  • value

    Value to set for the category property.

Returns:

  • a void



57
58
59
# File 'lib/models/malware_state.rb', line 57

def category=(value)
    @category = value
end

#familyObject

Gets the family property value. Provider-generated malware family (for example, ‘wannacry’, ‘notpetya’, etc.).

Returns:

  • a string



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

def family
    return @family
end

#family=(value) ⇒ Object

Sets the family property value. Provider-generated malware family (for example, ‘wannacry’, ‘notpetya’, etc.).

Parameters:

  • value

    Value to set for the family property.

Returns:

  • a void



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

def family=(value)
    @family = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



95
96
97
98
99
100
101
102
103
104
# File 'lib/models/malware_state.rb', line 95

def get_field_deserializers()
    return {
        "category" => lambda {|n| @category = n.get_string_value() },
        "family" => lambda {|n| @family = n.get_string_value() },
        "name" => lambda {|n| @name = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "severity" => lambda {|n| @severity = n.get_string_value() },
        "wasRunning" => lambda {|n| @was_running = n.get_boolean_value() },
    }
end

#nameObject

Gets the name property value. Provider-generated malware variant name (for example, Trojan:Win32/Powessere.H).

Returns:

  • a string



109
110
111
# File 'lib/models/malware_state.rb', line 109

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. Provider-generated malware variant name (for example, Trojan:Win32/Powessere.H).

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



117
118
119
# File 'lib/models/malware_state.rb', line 117

def name=(value)
    @name = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



124
125
126
# File 'lib/models/malware_state.rb', line 124

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



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

def odata_type=(value)
    @odata_type = 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)


140
141
142
143
144
145
146
147
148
149
# File 'lib/models/malware_state.rb', line 140

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("category", @category)
    writer.write_string_value("family", @family)
    writer.write_string_value("name", @name)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("severity", @severity)
    writer.write_boolean_value("wasRunning", @was_running)
    writer.write_additional_data(@additional_data)
end

#severityObject

Gets the severity property value. Provider-determined severity of this malware.

Returns:

  • a string



154
155
156
# File 'lib/models/malware_state.rb', line 154

def severity
    return @severity
end

#severity=(value) ⇒ Object

Sets the severity property value. Provider-determined severity of this malware.

Parameters:

  • value

    Value to set for the severity property.

Returns:

  • a void



162
163
164
# File 'lib/models/malware_state.rb', line 162

def severity=(value)
    @severity = value
end

#was_runningObject

Gets the wasRunning property value. Indicates whether the detected file (malware/vulnerability) was running at the time of detection or was detected at rest on the disk.

Returns:

  • a boolean



169
170
171
# File 'lib/models/malware_state.rb', line 169

def was_running
    return @was_running
end

#was_running=(value) ⇒ Object

Sets the wasRunning property value. Indicates whether the detected file (malware/vulnerability) was running at the time of detection or was detected at rest on the disk.

Parameters:

  • value

    Value to set for the wasRunning property.

Returns:

  • a void



177
178
179
# File 'lib/models/malware_state.rb', line 177

def was_running=(value)
    @was_running = value
end