Class: MicrosoftGraph::Models::WindowsMalwareNameCount

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

Overview

Malware name device count

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new windowsMalwareNameCount and sets the default values.



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

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 windows_malware_name_count

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return WindowsMalwareNameCount.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/windows_malware_name_count.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/windows_malware_name_count.rb', line 42

def additional_data=(value)
    @additional_data = value
end

#device_countObject

Gets the deviceCount property value. Count of devices with malware dectected for this malware

Returns:

  • a integer



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

def device_count
    return @device_count
end

#device_count=(value) ⇒ Object

Sets the deviceCount property value. Count of devices with malware dectected for this malware

Parameters:

  • value

    Value to set for the deviceCount property.

Returns:

  • a void



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

def device_count=(value)
    @device_count = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



80
81
82
83
84
85
86
87
88
# File 'lib/models/windows_malware_name_count.rb', line 80

def get_field_deserializers()
    return {
        "deviceCount" => lambda {|n| @device_count = n.get_number_value() },
        "lastUpdateDateTime" => lambda {|n| @last_update_date_time = n.get_date_time_value() },
        "malwareIdentifier" => lambda {|n| @malware_identifier = n.get_string_value() },
        "name" => lambda {|n| @name = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
    }
end

#last_update_date_timeObject

Gets the lastUpdateDateTime property value. The Timestamp of the last update for the device count in UTC

Returns:

  • a date_time



93
94
95
# File 'lib/models/windows_malware_name_count.rb', line 93

def last_update_date_time
    return @last_update_date_time
end

#last_update_date_time=(value) ⇒ Object

Sets the lastUpdateDateTime property value. The Timestamp of the last update for the device count in UTC

Parameters:

  • value

    Value to set for the lastUpdateDateTime property.

Returns:

  • a void



101
102
103
# File 'lib/models/windows_malware_name_count.rb', line 101

def last_update_date_time=(value)
    @last_update_date_time = value
end

#malware_identifierObject

Gets the malwareIdentifier property value. The unique identifier. This is malware identifier

Returns:

  • a string



108
109
110
# File 'lib/models/windows_malware_name_count.rb', line 108

def malware_identifier
    return @malware_identifier
end

#malware_identifier=(value) ⇒ Object

Sets the malwareIdentifier property value. The unique identifier. This is malware identifier

Parameters:

  • value

    Value to set for the malwareIdentifier property.

Returns:

  • a void



116
117
118
# File 'lib/models/windows_malware_name_count.rb', line 116

def malware_identifier=(value)
    @malware_identifier = value
end

#nameObject

Gets the name property value. Malware name

Returns:

  • a string



123
124
125
# File 'lib/models/windows_malware_name_count.rb', line 123

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. Malware name

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



131
132
133
# File 'lib/models/windows_malware_name_count.rb', line 131

def name=(value)
    @name = value
end

#odata_typeObject

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

Returns:

  • a string



138
139
140
# File 'lib/models/windows_malware_name_count.rb', line 138

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



146
147
148
# File 'lib/models/windows_malware_name_count.rb', line 146

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)


154
155
156
157
158
159
160
161
162
# File 'lib/models/windows_malware_name_count.rb', line 154

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_number_value("deviceCount", @device_count)
    writer.write_date_time_value("lastUpdateDateTime", @last_update_date_time)
    writer.write_string_value("malwareIdentifier", @malware_identifier)
    writer.write_string_value("name", @name)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_additional_data(@additional_data)
end