Class: MicrosoftGraph::Models::MalwareStateForWindowsDevice

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

Overview

Malware state for a windows device

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 malwareStateForWindowsDevice and sets the default values.



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

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 malware_state_for_windows_device

Raises:

  • (StandardError)


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

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

Instance Method Details

#detection_countObject

Gets the detectionCount property value. Indicates the number of times the malware is detected

Returns:

  • a integer



50
51
52
# File 'lib/models/malware_state_for_windows_device.rb', line 50

def detection_count
    return @detection_count
end

#detection_count=(value) ⇒ Object

Sets the detectionCount property value. Indicates the number of times the malware is detected

Parameters:

  • value

    Value to set for the detectionCount property.

Returns:

  • a void



58
59
60
# File 'lib/models/malware_state_for_windows_device.rb', line 58

def detection_count=(value)
    @detection_count = value
end

#device_nameObject

Gets the deviceName property value. Indicates the name of the device being evaluated for malware state

Returns:

  • a string



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

def device_name
    return @device_name
end

#device_name=(value) ⇒ Object

Sets the deviceName property value. Indicates the name of the device being evaluated for malware state

Parameters:

  • value

    Value to set for the deviceName property.

Returns:

  • a void



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

def device_name=(value)
    @device_name = value
end

#execution_stateObject

Gets the executionState property value. Indicates execution status of the malware. Possible values are: unknown, blocked, allowed, running, notRunning. Defaults to unknown. Possible values are: unknown, blocked, allowed, running, notRunning.

Returns:

  • a windows_malware_execution_state



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

def execution_state
    return @execution_state
end

#execution_state=(value) ⇒ Object

Sets the executionState property value. Indicates execution status of the malware. Possible values are: unknown, blocked, allowed, running, notRunning. Defaults to unknown. Possible values are: unknown, blocked, allowed, running, notRunning.

Parameters:

  • value

    Value to set for the executionState property.

Returns:

  • a void



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

def execution_state=(value)
    @execution_state = 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_for_windows_device.rb', line 95

def get_field_deserializers()
    return super.merge({
        "detectionCount" => lambda {|n| @detection_count = n.get_number_value() },
        "deviceName" => lambda {|n| @device_name = n.get_string_value() },
        "executionState" => lambda {|n| @execution_state = n.get_enum_value(MicrosoftGraph::Models::WindowsMalwareExecutionState) },
        "initialDetectionDateTime" => lambda {|n| @initial_detection_date_time = n.get_date_time_value() },
        "lastStateChangeDateTime" => lambda {|n| @last_state_change_date_time = n.get_date_time_value() },
        "threatState" => lambda {|n| @threat_state = n.get_enum_value(MicrosoftGraph::Models::WindowsMalwareThreatState) },
    })
end

#initial_detection_date_timeObject

Gets the initialDetectionDateTime property value. Initial detection datetime of the malware

Returns:

  • a date_time



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

def initial_detection_date_time
    return @initial_detection_date_time
end

#initial_detection_date_time=(value) ⇒ Object

Sets the initialDetectionDateTime property value. Initial detection datetime of the malware

Parameters:

  • value

    Value to set for the initialDetectionDateTime property.

Returns:

  • a void



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

def initial_detection_date_time=(value)
    @initial_detection_date_time = value
end

#last_state_change_date_timeObject

Gets the lastStateChangeDateTime property value. The last time this particular threat was changed

Returns:

  • a date_time



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

def last_state_change_date_time
    return @last_state_change_date_time
end

#last_state_change_date_time=(value) ⇒ Object

Sets the lastStateChangeDateTime property value. The last time this particular threat was changed

Parameters:

  • value

    Value to set for the lastStateChangeDateTime property.

Returns:

  • a void



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

def last_state_change_date_time=(value)
    @last_state_change_date_time = 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_for_windows_device.rb', line 140

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_number_value("detectionCount", @detection_count)
    writer.write_string_value("deviceName", @device_name)
    writer.write_enum_value("executionState", @execution_state)
    writer.write_date_time_value("initialDetectionDateTime", @initial_detection_date_time)
    writer.write_date_time_value("lastStateChangeDateTime", @last_state_change_date_time)
    writer.write_enum_value("threatState", @threat_state)
end

#threat_stateObject

Gets the threatState property value. Indicates threat status of the malware. Possible values are: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared. defaults to noStatusCleared. Possible values are: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared.

Returns:

  • a windows_malware_threat_state



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

def threat_state
    return @threat_state
end

#threat_state=(value) ⇒ Object

Sets the threatState property value. Indicates threat status of the malware. Possible values are: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared. defaults to noStatusCleared. Possible values are: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared.

Parameters:

  • value

    Value to set for the threatState property.

Returns:

  • a void



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

def threat_state=(value)
    @threat_state = value
end