Class: MicrosoftGraph::Models::WorkbookRangeFont

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/workbook_range_font.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 workbookRangeFont and sets the default values.



61
62
63
# File 'lib/models/workbook_range_font.rb', line 61

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 workbook_range_font

Raises:

  • (StandardError)


69
70
71
72
# File 'lib/models/workbook_range_font.rb', line 69

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

Instance Method Details

#boldObject

Gets the bold property value. Represents the bold status of font.

Returns:

  • a boolean



31
32
33
# File 'lib/models/workbook_range_font.rb', line 31

def bold
    return @bold
end

#bold=(value) ⇒ Object

Sets the bold property value. Represents the bold status of font.

Parameters:

  • value

    Value to set for the bold property.

Returns:

  • a void



39
40
41
# File 'lib/models/workbook_range_font.rb', line 39

def bold=(value)
    @bold = value
end

#colorObject

Gets the color property value. HTML color code representation of the text color. E.g. #FF0000 represents Red.

Returns:

  • a string



46
47
48
# File 'lib/models/workbook_range_font.rb', line 46

def color
    return @color
end

#color=(value) ⇒ Object

Sets the color property value. HTML color code representation of the text color. E.g. #FF0000 represents Red.

Parameters:

  • value

    Value to set for the color property.

Returns:

  • a void



54
55
56
# File 'lib/models/workbook_range_font.rb', line 54

def color=(value)
    @color = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



77
78
79
80
81
82
83
84
85
86
# File 'lib/models/workbook_range_font.rb', line 77

def get_field_deserializers()
    return super.merge({
        "bold" => lambda {|n| @bold = n.get_boolean_value() },
        "color" => lambda {|n| @color = n.get_string_value() },
        "italic" => lambda {|n| @italic = n.get_boolean_value() },
        "name" => lambda {|n| @name = n.get_string_value() },
        "size" => lambda {|n| @size = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "underline" => lambda {|n| @underline = n.get_string_value() },
    })
end

#italicObject

Gets the italic property value. Represents the italic status of the font.

Returns:

  • a boolean



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

def italic
    return @italic
end

#italic=(value) ⇒ Object

Sets the italic property value. Represents the italic status of the font.

Parameters:

  • value

    Value to set for the italic property.

Returns:

  • a void



99
100
101
# File 'lib/models/workbook_range_font.rb', line 99

def italic=(value)
    @italic = value
end

#nameObject

Gets the name property value. Font name (e.g. ‘Calibri’)

Returns:

  • a string



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

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. Font name (e.g. ‘Calibri’)

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



114
115
116
# File 'lib/models/workbook_range_font.rb', line 114

def name=(value)
    @name = 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)


122
123
124
125
126
127
128
129
130
131
# File 'lib/models/workbook_range_font.rb', line 122

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_boolean_value("bold", @bold)
    writer.write_string_value("color", @color)
    writer.write_boolean_value("italic", @italic)
    writer.write_string_value("name", @name)
    writer.write_object_value("size", @size)
    writer.write_string_value("underline", @underline)
end

#sizeObject

Gets the size property value. Font size.

Returns:

  • a double



136
137
138
# File 'lib/models/workbook_range_font.rb', line 136

def size
    return @size
end

#size=(value) ⇒ Object

Sets the size property value. Font size.

Parameters:

  • value

    Value to set for the size property.

Returns:

  • a void



144
145
146
# File 'lib/models/workbook_range_font.rb', line 144

def size=(value)
    @size = value
end

#underlineObject

Gets the underline property value. Type of underline applied to the font. The possible values are: None, Single, Double, SingleAccountant, DoubleAccountant.

Returns:

  • a string



151
152
153
# File 'lib/models/workbook_range_font.rb', line 151

def underline
    return @underline
end

#underline=(value) ⇒ Object

Sets the underline property value. Type of underline applied to the font. The possible values are: None, Single, Double, SingleAccountant, DoubleAccountant.

Parameters:

  • value

    Value to set for the underline property.

Returns:

  • a void



159
160
161
# File 'lib/models/workbook_range_font.rb', line 159

def underline=(value)
    @underline = value
end