Class: MicrosoftGraph::Models::DeviceCategory

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

Overview

Device categories provides a way to organize your devices. Using device categories, company administrators can define their own categories that make sense to their company. These categories can then be applied to a device in the Intune Azure console or selected by a user during device enrollment. You can filter reports and create dynamic Azure Active Directory device groups based on device categories.

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



21
22
23
# File 'lib/models/device_category.rb', line 21

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 device_category

Raises:

  • (StandardError)


29
30
31
32
# File 'lib/models/device_category.rb', line 29

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

Instance Method Details

#descriptionObject

Gets the description property value. Optional description for the device category.

Returns:

  • a string



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

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. Optional description for the device category.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



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

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. Display name for the device category.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Display name for the device category.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



67
68
69
70
71
72
# File 'lib/models/device_category.rb', line 67

def get_field_deserializers()
    return super.merge({
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_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)


78
79
80
81
82
83
# File 'lib/models/device_category.rb', line 78

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
end