Class: MicrosoftGraph::Models::WorkbookSortField

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/workbook_sort_field.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new workbookSortField and sets the default values.



82
83
84
# File 'lib/models/workbook_sort_field.rb', line 82

def initialize()
    @additional_data = Hash.new
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_sort_field

Raises:

  • (StandardError)


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

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

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



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

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



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

def additional_data=(value)
    @additional_data = value
end

#ascendingObject

Gets the ascending property value. Represents whether the sorting is done in an ascending fashion.

Returns:

  • a boolean



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

def ascending
    return @ascending
end

#ascending=(value) ⇒ Object

Sets the ascending property value. Represents whether the sorting is done in an ascending fashion.

Parameters:

  • value

    Value to set for the ascending property.

Returns:

  • a void



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

def ascending=(value)
    @ascending = value
end

#colorObject

Gets the color property value. Represents the color that is the target of the condition if the sorting is on font or cell color.

Returns:

  • a string



67
68
69
# File 'lib/models/workbook_sort_field.rb', line 67

def color
    return @color
end

#color=(value) ⇒ Object

Sets the color property value. Represents the color that is the target of the condition if the sorting is on font or cell color.

Parameters:

  • value

    Value to set for the color property.

Returns:

  • a void



75
76
77
# File 'lib/models/workbook_sort_field.rb', line 75

def color=(value)
    @color = value
end

#data_optionObject

Gets the dataOption property value. Represents additional sorting options for this field. The possible values are: Normal, TextAsNumber.

Returns:

  • a string



98
99
100
# File 'lib/models/workbook_sort_field.rb', line 98

def data_option
    return @data_option
end

#data_option=(value) ⇒ Object

Sets the dataOption property value. Represents additional sorting options for this field. The possible values are: Normal, TextAsNumber.

Parameters:

  • value

    Value to set for the dataOption property.

Returns:

  • a void



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

def data_option=(value)
    @data_option = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



113
114
115
116
117
118
119
120
121
122
123
# File 'lib/models/workbook_sort_field.rb', line 113

def get_field_deserializers()
    return {
        "ascending" => lambda {|n| @ascending = n.get_boolean_value() },
        "color" => lambda {|n| @color = n.get_string_value() },
        "dataOption" => lambda {|n| @data_option = n.get_string_value() },
        "icon" => lambda {|n| @icon = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookIcon.create_from_discriminator_value(pn) }) },
        "key" => lambda {|n| @key = n.get_number_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "sortOn" => lambda {|n| @sort_on = n.get_string_value() },
    }
end

#iconObject

Gets the icon property value. Represents the icon that is the target of the condition if the sorting is on the cell’s icon.

Returns:

  • a workbook_icon



128
129
130
# File 'lib/models/workbook_sort_field.rb', line 128

def icon
    return @icon
end

#icon=(value) ⇒ Object

Sets the icon property value. Represents the icon that is the target of the condition if the sorting is on the cell’s icon.

Parameters:

  • value

    Value to set for the icon property.

Returns:

  • a void



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

def icon=(value)
    @icon = value
end

#keyObject

Gets the key property value. Represents the column (or row, depending on the sort orientation) that the condition is on. Represented as an offset from the first column (or row).

Returns:

  • a integer



143
144
145
# File 'lib/models/workbook_sort_field.rb', line 143

def key
    return @key
end

#key=(value) ⇒ Object

Sets the key property value. Represents the column (or row, depending on the sort orientation) that the condition is on. Represented as an offset from the first column (or row).

Parameters:

  • value

    Value to set for the key property.

Returns:

  • a void



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

def key=(value)
    @key = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



158
159
160
# File 'lib/models/workbook_sort_field.rb', line 158

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



166
167
168
# File 'lib/models/workbook_sort_field.rb', line 166

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


174
175
176
177
178
179
180
181
182
183
184
# File 'lib/models/workbook_sort_field.rb', line 174

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_boolean_value("ascending", @ascending)
    writer.write_string_value("color", @color)
    writer.write_string_value("dataOption", @data_option)
    writer.write_object_value("icon", @icon)
    writer.write_number_value("key", @key)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("sortOn", @sort_on)
    writer.write_additional_data(@additional_data)
end

#sort_onObject

Gets the sortOn property value. Represents the type of sorting of this condition. The possible values are: Value, CellColor, FontColor, Icon.

Returns:

  • a string



189
190
191
# File 'lib/models/workbook_sort_field.rb', line 189

def sort_on
    return @sort_on
end

#sort_on=(value) ⇒ Object

Sets the sortOn property value. Represents the type of sorting of this condition. The possible values are: Value, CellColor, FontColor, Icon.

Parameters:

  • value

    Value to set for the sortOn property.

Returns:

  • a void



197
198
199
# File 'lib/models/workbook_sort_field.rb', line 197

def sort_on=(value)
    @sort_on = value
end