Class: MicrosoftGraph::Models::OutlookCategory

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

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



34
35
36
# File 'lib/models/outlook_category.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 outlook_category

Raises:

  • (StandardError)


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

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

Instance Method Details

#colorObject

Gets the color property value. A pre-set color constant that characterizes a category, and that is mapped to one of 25 predefined colors. For more details, see the following note.

Returns:

  • a category_color



19
20
21
# File 'lib/models/outlook_category.rb', line 19

def color
    return @color
end

#color=(value) ⇒ Object

Sets the color property value. A pre-set color constant that characterizes a category, and that is mapped to one of 25 predefined colors. For more details, see the following note.

Parameters:

  • value

    Value to set for the color property.

Returns:

  • a void



27
28
29
# File 'lib/models/outlook_category.rb', line 27

def color=(value)
    @color = value
end

#display_nameObject

Gets the displayName property value. A unique name that identifies a category in the user’s mailbox. After a category is created, the name cannot be changed. Read-only.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. A unique name that identifies a category in the user’s mailbox. After a category is created, the name cannot be changed. Read-only.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



65
66
67
68
69
70
# File 'lib/models/outlook_category.rb', line 65

def get_field_deserializers()
    return super.merge({
        "color" => lambda {|n| @color = n.get_enum_value(MicrosoftGraph::Models::CategoryColor) },
        "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)


76
77
78
79
80
81
# File 'lib/models/outlook_category.rb', line 76

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