Class: MicrosoftGraph::Models::WorkbookRangeFormat

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



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

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_format

Raises:

  • (StandardError)


78
79
80
81
# File 'lib/models/workbook_range_format.rb', line 78

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

Instance Method Details

#bordersObject

Gets the borders property value. Collection of border objects that apply to the overall range selected Read-only.

Returns:

  • a workbook_range_border



40
41
42
# File 'lib/models/workbook_range_format.rb', line 40

def borders
    return @borders
end

#borders=(value) ⇒ Object

Sets the borders property value. Collection of border objects that apply to the overall range selected Read-only.

Parameters:

  • value

    Value to set for the borders property.

Returns:

  • a void



48
49
50
# File 'lib/models/workbook_range_format.rb', line 48

def borders=(value)
    @borders = value
end

#column_widthObject

Gets the columnWidth property value. Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned.

Returns:

  • a double



55
56
57
# File 'lib/models/workbook_range_format.rb', line 55

def column_width
    return @column_width
end

#column_width=(value) ⇒ Object

Sets the columnWidth property value. Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned.

Parameters:

  • value

    Value to set for the columnWidth property.

Returns:

  • a void



63
64
65
# File 'lib/models/workbook_range_format.rb', line 63

def column_width=(value)
    @column_width = value
end

#fillObject

Gets the fill property value. Returns the fill object defined on the overall range. Read-only.

Returns:

  • a workbook_range_fill



86
87
88
# File 'lib/models/workbook_range_format.rb', line 86

def fill
    return @fill
end

#fill=(value) ⇒ Object

Sets the fill property value. Returns the fill object defined on the overall range. Read-only.

Parameters:

  • value

    Value to set for the fill property.

Returns:

  • a void



94
95
96
# File 'lib/models/workbook_range_format.rb', line 94

def fill=(value)
    @fill = value
end

#fontObject

Gets the font property value. Returns the font object defined on the overall range selected Read-only.

Returns:

  • a workbook_range_font



101
102
103
# File 'lib/models/workbook_range_format.rb', line 101

def font
    return @font
end

#font=(value) ⇒ Object

Sets the font property value. Returns the font object defined on the overall range selected Read-only.

Parameters:

  • value

    Value to set for the font property.

Returns:

  • a void



109
110
111
# File 'lib/models/workbook_range_format.rb', line 109

def font=(value)
    @font = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/models/workbook_range_format.rb', line 116

def get_field_deserializers()
    return super.merge({
        "borders" => lambda {|n| @borders = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::WorkbookRangeBorder.create_from_discriminator_value(pn) }) },
        "columnWidth" => lambda {|n| @column_width = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "fill" => lambda {|n| @fill = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookRangeFill.create_from_discriminator_value(pn) }) },
        "font" => lambda {|n| @font = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookRangeFont.create_from_discriminator_value(pn) }) },
        "horizontalAlignment" => lambda {|n| @horizontal_alignment = n.get_string_value() },
        "protection" => lambda {|n| @protection = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookFormatProtection.create_from_discriminator_value(pn) }) },
        "rowHeight" => lambda {|n| @row_height = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "verticalAlignment" => lambda {|n| @vertical_alignment = n.get_string_value() },
        "wrapText" => lambda {|n| @wrap_text = n.get_boolean_value() },
    })
end

#horizontal_alignmentObject

Gets the horizontalAlignment property value. Represents the horizontal alignment for the specified object. The possible values are: General, Left, Center, Right, Fill, Justify, CenterAcrossSelection, Distributed.

Returns:

  • a string



133
134
135
# File 'lib/models/workbook_range_format.rb', line 133

def horizontal_alignment
    return @horizontal_alignment
end

#horizontal_alignment=(value) ⇒ Object

Sets the horizontalAlignment property value. Represents the horizontal alignment for the specified object. The possible values are: General, Left, Center, Right, Fill, Justify, CenterAcrossSelection, Distributed.

Parameters:

  • value

    Value to set for the horizontalAlignment property.

Returns:

  • a void



141
142
143
# File 'lib/models/workbook_range_format.rb', line 141

def horizontal_alignment=(value)
    @horizontal_alignment = value
end

#protectionObject

Gets the protection property value. Returns the format protection object for a range. Read-only.

Returns:

  • a workbook_format_protection



148
149
150
# File 'lib/models/workbook_range_format.rb', line 148

def protection
    return @protection
end

#protection=(value) ⇒ Object

Sets the protection property value. Returns the format protection object for a range. Read-only.

Parameters:

  • value

    Value to set for the protection property.

Returns:

  • a void



156
157
158
# File 'lib/models/workbook_range_format.rb', line 156

def protection=(value)
    @protection = value
end

#row_heightObject

Gets the rowHeight property value. Gets or sets the height of all rows in the range. If the row heights are not uniform null will be returned.

Returns:

  • a double



163
164
165
# File 'lib/models/workbook_range_format.rb', line 163

def row_height
    return @row_height
end

#row_height=(value) ⇒ Object

Sets the rowHeight property value. Gets or sets the height of all rows in the range. If the row heights are not uniform null will be returned.

Parameters:

  • value

    Value to set for the rowHeight property.

Returns:

  • a void



171
172
173
# File 'lib/models/workbook_range_format.rb', line 171

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


179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/models/workbook_range_format.rb', line 179

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("borders", @borders)
    writer.write_object_value("columnWidth", @column_width)
    writer.write_object_value("fill", @fill)
    writer.write_object_value("font", @font)
    writer.write_string_value("horizontalAlignment", @horizontal_alignment)
    writer.write_object_value("protection", @protection)
    writer.write_object_value("rowHeight", @row_height)
    writer.write_string_value("verticalAlignment", @vertical_alignment)
    writer.write_boolean_value("wrapText", @wrap_text)
end

#vertical_alignmentObject

Gets the verticalAlignment property value. Represents the vertical alignment for the specified object. The possible values are: Top, Center, Bottom, Justify, Distributed.

Returns:

  • a string



196
197
198
# File 'lib/models/workbook_range_format.rb', line 196

def vertical_alignment
    return @vertical_alignment
end

#vertical_alignment=(value) ⇒ Object

Sets the verticalAlignment property value. Represents the vertical alignment for the specified object. The possible values are: Top, Center, Bottom, Justify, Distributed.

Parameters:

  • value

    Value to set for the verticalAlignment property.

Returns:

  • a void



204
205
206
# File 'lib/models/workbook_range_format.rb', line 204

def vertical_alignment=(value)
    @vertical_alignment = value
end

#wrap_textObject

Gets the wrapText property value. Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn’t have uniform wrap setting

Returns:

  • a boolean



211
212
213
# File 'lib/models/workbook_range_format.rb', line 211

def wrap_text
    return @wrap_text
end

#wrap_text=(value) ⇒ Object

Sets the wrapText property value. Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn’t have uniform wrap setting

Parameters:

  • value

    Value to set for the wrapText property.

Returns:

  • a void



219
220
221
# File 'lib/models/workbook_range_format.rb', line 219

def wrap_text=(value)
    @wrap_text = value
end