require 'date'
require 'microsoft_kiota_abstractions'
require_relative '../microsoft_graph'
require_relative './models'

module MicrosoftGraph
    module Models
        ## 
        # Malware category device count
        class WindowsMalwareCategoryCount
            include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
            ## 
            # Count of active malware detections for this malware category. Valid values -2147483648 to 2147483647
            @active_malware_detection_count
            ## 
            # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
            @additional_data
            ## 
            # Malware category id
            @category
            ## 
            # Count of devices with malware detections for this malware category
            @device_count
            ## 
            # Count of distinct active malwares for this malware category. Valid values -2147483648 to 2147483647
            @distinct_active_malware_count
            ## 
            # The Timestamp of the last update for the device count in UTC
            @last_update_date_time
            ## 
            # The OdataType property
            @odata_type
            ## 
            ## Gets the activeMalwareDetectionCount property value. Count of active malware detections for this malware category. Valid values -2147483648 to 2147483647
            ## @return a integer
            ## 
            def active_malware_detection_count
                return @active_malware_detection_count
            end
            ## 
            ## Sets the activeMalwareDetectionCount property value. Count of active malware detections for this malware category. Valid values -2147483648 to 2147483647
            ## @param value Value to set for the activeMalwareDetectionCount property.
            ## @return a void
            ## 
            def active_malware_detection_count=(value)
                @active_malware_detection_count = value
            end
            ## 
            ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
            ## @return a i_dictionary
            ## 
            def additional_data
                return @additional_data
            end
            ## 
            ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
            ## @param value Value to set for the additionalData property.
            ## @return a void
            ## 
            def additional_data=(value)
                @additional_data = value
            end
            ## 
            ## Gets the category property value. Malware category id
            ## @return a windows_malware_category
            ## 
            def category
                return @category
            end
            ## 
            ## Sets the category property value. Malware category id
            ## @param value Value to set for the category property.
            ## @return a void
            ## 
            def category=(value)
                @category = value
            end
            ## 
            ## Instantiates a new windowsMalwareCategoryCount and sets the default values.
            ## @return a void
            ## 
            def initialize()
                @additional_data = Hash.new
            end
            ## 
            ## Creates a new instance of the appropriate class based on discriminator value
            ## @param parse_node The parse node to use to read the discriminator value and create the object
            ## @return a windows_malware_category_count
            ## 
            def self.create_from_discriminator_value(parse_node)
                raise StandardError, 'parse_node cannot be null' if parse_node.nil?
                return WindowsMalwareCategoryCount.new
            end
            ## 
            ## Gets the deviceCount property value. Count of devices with malware detections for this malware category
            ## @return a integer
            ## 
            def device_count
                return @device_count
            end
            ## 
            ## Sets the deviceCount property value. Count of devices with malware detections for this malware category
            ## @param value Value to set for the deviceCount property.
            ## @return a void
            ## 
            def device_count=(value)
                @device_count = value
            end
            ## 
            ## Gets the distinctActiveMalwareCount property value. Count of distinct active malwares for this malware category. Valid values -2147483648 to 2147483647
            ## @return a integer
            ## 
            def distinct_active_malware_count
                return @distinct_active_malware_count
            end
            ## 
            ## Sets the distinctActiveMalwareCount property value. Count of distinct active malwares for this malware category. Valid values -2147483648 to 2147483647
            ## @param value Value to set for the distinctActiveMalwareCount property.
            ## @return a void
            ## 
            def distinct_active_malware_count=(value)
                @distinct_active_malware_count = value
            end
            ## 
            ## The deserialization information for the current model
            ## @return a i_dictionary
            ## 
            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
            ## 
            ## Gets the lastUpdateDateTime property value. The Timestamp of the last update for the device count in UTC
            ## @return a date_time
            ## 
            def last_update_date_time
                return @last_update_date_time
            end
            ## 
            ## Sets the lastUpdateDateTime property value. The Timestamp of the last update for the device count in UTC
            ## @param value Value to set for the lastUpdateDateTime property.
            ## @return a void
            ## 
            def last_update_date_time=(value)
                @last_update_date_time = value
            end
            ## 
            ## Gets the @odata.type property value. The OdataType property
            ## @return a string
            ## 
            def odata_type
                return @odata_type
            end
            ## 
            ## Sets the @odata.type property value. The OdataType property
            ## @param value Value to set for the @odata.type property.
            ## @return a void
            ## 
            def odata_type=(value)
                @odata_type = value
            end
            ## 
            ## Serializes information the current object
            ## @param writer Serialization writer to use to serialize this model
            ## @return a void
            ## 
            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
        end
    end
end
