Class: MicrosoftGraph::Models::WindowsMalwareCategoryCount

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

Overview

Malware category device count

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new windowsMalwareCategoryCount and sets the default values.



82
83
84
# File 'lib/models/windows_malware_category_count.rb', line 82

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_category_count

Raises:

  • (StandardError)


90
91
92
93
# File 'lib/models/windows_malware_category_count.rb', line 90

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

Instance Method Details

#active_malware_detection_countObject

Gets the activeMalwareDetectionCount property value. Count of active malware detections for this malware category. Valid values -2147483648 to 2147483647

Returns:

  • a integer



37
38
39
# File 'lib/models/windows_malware_category_count.rb', line 37

def active_malware_detection_count
    return @active_malware_detection_count
end

#active_malware_detection_count=(value) ⇒ Object

Sets the activeMalwareDetectionCount property value. Count of active malware detections for this malware category. Valid values -2147483648 to 2147483647

Parameters:

  • value

    Value to set for the activeMalwareDetectionCount property.

Returns:

  • a void



45
46
47
# File 'lib/models/windows_malware_category_count.rb', line 45

def active_malware_detection_count=(value)
    @active_malware_detection_count = value
end

#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



52
53
54
# File 'lib/models/windows_malware_category_count.rb', line 52

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



60
61
62
# File 'lib/models/windows_malware_category_count.rb', line 60

def additional_data=(value)
    @additional_data = value
end

#categoryObject

Gets the category property value. Malware category id

Returns:

  • a windows_malware_category



67
68
69
# File 'lib/models/windows_malware_category_count.rb', line 67

def category
    return @category
end

#category=(value) ⇒ Object

Sets the category property value. Malware category id

Parameters:

  • value

    Value to set for the category property.

Returns:

  • a void



75
76
77
# File 'lib/models/windows_malware_category_count.rb', line 75

def category=(value)
    @category = value
end

#device_countObject

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

Returns:

  • a integer



98
99
100
# File 'lib/models/windows_malware_category_count.rb', line 98

def device_count
    return @device_count
end

#device_count=(value) ⇒ Object

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

Parameters:

  • value

    Value to set for the deviceCount property.

Returns:

  • a void



106
107
108
# File 'lib/models/windows_malware_category_count.rb', line 106

def device_count=(value)
    @device_count = value
end

#distinct_active_malware_countObject

Gets the distinctActiveMalwareCount property value. Count of distinct active malwares for this malware category. Valid values -2147483648 to 2147483647

Returns:

  • a integer



113
114
115
# File 'lib/models/windows_malware_category_count.rb', line 113

def distinct_active_malware_count
    return @distinct_active_malware_count
end

#distinct_active_malware_count=(value) ⇒ Object

Sets the distinctActiveMalwareCount property value. Count of distinct active malwares for this malware category. Valid values -2147483648 to 2147483647

Parameters:

  • value

    Value to set for the distinctActiveMalwareCount property.

Returns:

  • a void



121
122
123
# File 'lib/models/windows_malware_category_count.rb', line 121

def distinct_active_malware_count=(value)
    @distinct_active_malware_count = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



128
129
130
131
132
133
134
135
136
137
# File 'lib/models/windows_malware_category_count.rb', line 128

def get_field_deserializers()
    return {
        "activeMalwareDetectionCount" => lambda {|n| @active_malware_detection_count = n.get_number_value() },
        "category" => lambda {|n| @category = n.get_enum_value(MicrosoftGraph::Models::WindowsMalwareCategory) },
        "deviceCount" => lambda {|n| @device_count = n.get_number_value() },
        "distinctActiveMalwareCount" => lambda {|n| @distinct_active_malware_count = n.get_number_value() },
        "lastUpdateDateTime" => lambda {|n| @last_update_date_time = n.get_date_time_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



142
143
144
# File 'lib/models/windows_malware_category_count.rb', line 142

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



150
151
152
# File 'lib/models/windows_malware_category_count.rb', line 150

def last_update_date_time=(value)
    @last_update_date_time = value
end

#odata_typeObject

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

Returns:

  • a string



157
158
159
# File 'lib/models/windows_malware_category_count.rb', line 157

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



165
166
167
# File 'lib/models/windows_malware_category_count.rb', line 165

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)


173
174
175
176
177
178
179
180
181
182
# File 'lib/models/windows_malware_category_count.rb', line 173

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_number_value("activeMalwareDetectionCount", @active_malware_detection_count)
    writer.write_enum_value("category", @category)
    writer.write_number_value("deviceCount", @device_count)
    writer.write_number_value("distinctActiveMalwareCount", @distinct_active_malware_count)
    writer.write_date_time_value("lastUpdateDateTime", @last_update_date_time)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_additional_data(@additional_data)
end