Class: MicrosoftGraph::Models::WorkbookWorksheet

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



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

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_worksheet

Raises:

  • (StandardError)


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

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

Instance Method Details

#chartsObject

Gets the charts property value. Returns collection of charts that are part of the worksheet. Read-only.

Returns:

  • a workbook_chart



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

def charts
    return @charts
end

#charts=(value) ⇒ Object

Sets the charts property value. Returns collection of charts that are part of the worksheet. Read-only.

Parameters:

  • value

    Value to set for the charts property.

Returns:

  • a void



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

def charts=(value)
    @charts = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/models/workbook_worksheet.rb', line 68

def get_field_deserializers()
    return super.merge({
        "charts" => lambda {|n| @charts = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::WorkbookChart.create_from_discriminator_value(pn) }) },
        "name" => lambda {|n| @name = n.get_string_value() },
        "names" => lambda {|n| @names = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::WorkbookNamedItem.create_from_discriminator_value(pn) }) },
        "pivotTables" => lambda {|n| @pivot_tables = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::WorkbookPivotTable.create_from_discriminator_value(pn) }) },
        "position" => lambda {|n| @position = n.get_number_value() },
        "protection" => lambda {|n| @protection = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookWorksheetProtection.create_from_discriminator_value(pn) }) },
        "tables" => lambda {|n| @tables = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::WorkbookTable.create_from_discriminator_value(pn) }) },
        "visibility" => lambda {|n| @visibility = n.get_string_value() },
    })
end

#nameObject

Gets the name property value. The display name of the worksheet.

Returns:

  • a string



84
85
86
# File 'lib/models/workbook_worksheet.rb', line 84

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. The display name of the worksheet.

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



92
93
94
# File 'lib/models/workbook_worksheet.rb', line 92

def name=(value)
    @name = value
end

#namesObject

Gets the names property value. Returns collection of names that are associated with the worksheet. Read-only.

Returns:

  • a workbook_named_item



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

def names
    return @names
end

#names=(value) ⇒ Object

Sets the names property value. Returns collection of names that are associated with the worksheet. Read-only.

Parameters:

  • value

    Value to set for the names property.

Returns:

  • a void



107
108
109
# File 'lib/models/workbook_worksheet.rb', line 107

def names=(value)
    @names = value
end

#pivot_tablesObject

Gets the pivotTables property value. Collection of PivotTables that are part of the worksheet.

Returns:

  • a workbook_pivot_table



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

def pivot_tables
    return @pivot_tables
end

#pivot_tables=(value) ⇒ Object

Sets the pivotTables property value. Collection of PivotTables that are part of the worksheet.

Parameters:

  • value

    Value to set for the pivotTables property.

Returns:

  • a void



122
123
124
# File 'lib/models/workbook_worksheet.rb', line 122

def pivot_tables=(value)
    @pivot_tables = value
end

#positionObject

Gets the position property value. The zero-based position of the worksheet within the workbook.

Returns:

  • a integer



129
130
131
# File 'lib/models/workbook_worksheet.rb', line 129

def position
    return @position
end

#position=(value) ⇒ Object

Sets the position property value. The zero-based position of the worksheet within the workbook.

Parameters:

  • value

    Value to set for the position property.

Returns:

  • a void



137
138
139
# File 'lib/models/workbook_worksheet.rb', line 137

def position=(value)
    @position = value
end

#protectionObject

Gets the protection property value. Returns sheet protection object for a worksheet. Read-only.

Returns:

  • a workbook_worksheet_protection



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

def protection
    return @protection
end

#protection=(value) ⇒ Object

Sets the protection property value. Returns sheet protection object for a worksheet. Read-only.

Parameters:

  • value

    Value to set for the protection property.

Returns:

  • a void



152
153
154
# File 'lib/models/workbook_worksheet.rb', line 152

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


160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/models/workbook_worksheet.rb', line 160

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("charts", @charts)
    writer.write_string_value("name", @name)
    writer.write_collection_of_object_values("names", @names)
    writer.write_collection_of_object_values("pivotTables", @pivot_tables)
    writer.write_number_value("position", @position)
    writer.write_object_value("protection", @protection)
    writer.write_collection_of_object_values("tables", @tables)
    writer.write_string_value("visibility", @visibility)
end

#tablesObject

Gets the tables property value. Collection of tables that are part of the worksheet. Read-only.

Returns:

  • a workbook_table



176
177
178
# File 'lib/models/workbook_worksheet.rb', line 176

def tables
    return @tables
end

#tables=(value) ⇒ Object

Sets the tables property value. Collection of tables that are part of the worksheet. Read-only.

Parameters:

  • value

    Value to set for the tables property.

Returns:

  • a void



184
185
186
# File 'lib/models/workbook_worksheet.rb', line 184

def tables=(value)
    @tables = value
end

#visibilityObject

Gets the visibility property value. The Visibility of the worksheet. The possible values are: Visible, Hidden, VeryHidden.

Returns:

  • a string



191
192
193
# File 'lib/models/workbook_worksheet.rb', line 191

def visibility
    return @visibility
end

#visibility=(value) ⇒ Object

Sets the visibility property value. The Visibility of the worksheet. The possible values are: Visible, Hidden, VeryHidden.

Parameters:

  • value

    Value to set for the visibility property.

Returns:

  • a void



199
200
201
# File 'lib/models/workbook_worksheet.rb', line 199

def visibility=(value)
    @visibility = value
end