Class: MicrosoftGraph::Models::WorkbookWorksheetProtectionOptions

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new workbookWorksheetProtectionOptions and sets the default values.



232
233
234
# File 'lib/models/workbook_worksheet_protection_options.rb', line 232

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_worksheet_protection_options

Raises:

  • (StandardError)


240
241
242
243
# File 'lib/models/workbook_worksheet_protection_options.rb', line 240

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return WorkbookWorksheetProtectionOptions.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



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

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



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

def additional_data=(value)
    @additional_data = value
end

#allow_auto_filterObject

Gets the allowAutoFilter property value. Represents the worksheet protection option of allowing using auto filter feature.

Returns:

  • a boolean



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

def allow_auto_filter
    return @allow_auto_filter
end

#allow_auto_filter=(value) ⇒ Object

Sets the allowAutoFilter property value. Represents the worksheet protection option of allowing using auto filter feature.

Parameters:

  • value

    Value to set for the allowAutoFilter property.

Returns:

  • a void



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

def allow_auto_filter=(value)
    @allow_auto_filter = value
end

#allow_delete_columnsObject

Gets the allowDeleteColumns property value. Represents the worksheet protection option of allowing deleting columns.

Returns:

  • a boolean



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

def allow_delete_columns
    return @allow_delete_columns
end

#allow_delete_columns=(value) ⇒ Object

Sets the allowDeleteColumns property value. Represents the worksheet protection option of allowing deleting columns.

Parameters:

  • value

    Value to set for the allowDeleteColumns property.

Returns:

  • a void



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

def allow_delete_columns=(value)
    @allow_delete_columns = value
end

#allow_delete_rowsObject

Gets the allowDeleteRows property value. Represents the worksheet protection option of allowing deleting rows.

Returns:

  • a boolean



97
98
99
# File 'lib/models/workbook_worksheet_protection_options.rb', line 97

def allow_delete_rows
    return @allow_delete_rows
end

#allow_delete_rows=(value) ⇒ Object

Sets the allowDeleteRows property value. Represents the worksheet protection option of allowing deleting rows.

Parameters:

  • value

    Value to set for the allowDeleteRows property.

Returns:

  • a void



105
106
107
# File 'lib/models/workbook_worksheet_protection_options.rb', line 105

def allow_delete_rows=(value)
    @allow_delete_rows = value
end

#allow_format_cellsObject

Gets the allowFormatCells property value. Represents the worksheet protection option of allowing formatting cells.

Returns:

  • a boolean



112
113
114
# File 'lib/models/workbook_worksheet_protection_options.rb', line 112

def allow_format_cells
    return @allow_format_cells
end

#allow_format_cells=(value) ⇒ Object

Sets the allowFormatCells property value. Represents the worksheet protection option of allowing formatting cells.

Parameters:

  • value

    Value to set for the allowFormatCells property.

Returns:

  • a void



120
121
122
# File 'lib/models/workbook_worksheet_protection_options.rb', line 120

def allow_format_cells=(value)
    @allow_format_cells = value
end

#allow_format_columnsObject

Gets the allowFormatColumns property value. Represents the worksheet protection option of allowing formatting columns.

Returns:

  • a boolean



127
128
129
# File 'lib/models/workbook_worksheet_protection_options.rb', line 127

def allow_format_columns
    return @allow_format_columns
end

#allow_format_columns=(value) ⇒ Object

Sets the allowFormatColumns property value. Represents the worksheet protection option of allowing formatting columns.

Parameters:

  • value

    Value to set for the allowFormatColumns property.

Returns:

  • a void



135
136
137
# File 'lib/models/workbook_worksheet_protection_options.rb', line 135

def allow_format_columns=(value)
    @allow_format_columns = value
end

#allow_format_rowsObject

Gets the allowFormatRows property value. Represents the worksheet protection option of allowing formatting rows.

Returns:

  • a boolean



142
143
144
# File 'lib/models/workbook_worksheet_protection_options.rb', line 142

def allow_format_rows
    return @allow_format_rows
end

#allow_format_rows=(value) ⇒ Object

Sets the allowFormatRows property value. Represents the worksheet protection option of allowing formatting rows.

Parameters:

  • value

    Value to set for the allowFormatRows property.

Returns:

  • a void



150
151
152
# File 'lib/models/workbook_worksheet_protection_options.rb', line 150

def allow_format_rows=(value)
    @allow_format_rows = value
end

#allow_insert_columnsObject

Gets the allowInsertColumns property value. Represents the worksheet protection option of allowing inserting columns.

Returns:

  • a boolean



157
158
159
# File 'lib/models/workbook_worksheet_protection_options.rb', line 157

def allow_insert_columns
    return @allow_insert_columns
end

#allow_insert_columns=(value) ⇒ Object

Sets the allowInsertColumns property value. Represents the worksheet protection option of allowing inserting columns.

Parameters:

  • value

    Value to set for the allowInsertColumns property.

Returns:

  • a void



165
166
167
# File 'lib/models/workbook_worksheet_protection_options.rb', line 165

def allow_insert_columns=(value)
    @allow_insert_columns = value
end

Gets the allowInsertHyperlinks property value. Represents the worksheet protection option of allowing inserting hyperlinks.

Returns:

  • a boolean



172
173
174
# File 'lib/models/workbook_worksheet_protection_options.rb', line 172

def allow_insert_hyperlinks
    return @allow_insert_hyperlinks
end

#allow_insert_hyperlinks=(value) ⇒ Object

Sets the allowInsertHyperlinks property value. Represents the worksheet protection option of allowing inserting hyperlinks.

Parameters:

  • value

    Value to set for the allowInsertHyperlinks property.

Returns:

  • a void



180
181
182
# File 'lib/models/workbook_worksheet_protection_options.rb', line 180

def allow_insert_hyperlinks=(value)
    @allow_insert_hyperlinks = value
end

#allow_insert_rowsObject

Gets the allowInsertRows property value. Represents the worksheet protection option of allowing inserting rows.

Returns:

  • a boolean



187
188
189
# File 'lib/models/workbook_worksheet_protection_options.rb', line 187

def allow_insert_rows
    return @allow_insert_rows
end

#allow_insert_rows=(value) ⇒ Object

Sets the allowInsertRows property value. Represents the worksheet protection option of allowing inserting rows.

Parameters:

  • value

    Value to set for the allowInsertRows property.

Returns:

  • a void



195
196
197
# File 'lib/models/workbook_worksheet_protection_options.rb', line 195

def allow_insert_rows=(value)
    @allow_insert_rows = value
end

#allow_pivot_tablesObject

Gets the allowPivotTables property value. Represents the worksheet protection option of allowing using pivot table feature.

Returns:

  • a boolean



202
203
204
# File 'lib/models/workbook_worksheet_protection_options.rb', line 202

def allow_pivot_tables
    return @allow_pivot_tables
end

#allow_pivot_tables=(value) ⇒ Object

Sets the allowPivotTables property value. Represents the worksheet protection option of allowing using pivot table feature.

Parameters:

  • value

    Value to set for the allowPivotTables property.

Returns:

  • a void



210
211
212
# File 'lib/models/workbook_worksheet_protection_options.rb', line 210

def allow_pivot_tables=(value)
    @allow_pivot_tables = value
end

#allow_sortObject

Gets the allowSort property value. Represents the worksheet protection option of allowing using sort feature.

Returns:

  • a boolean



217
218
219
# File 'lib/models/workbook_worksheet_protection_options.rb', line 217

def allow_sort
    return @allow_sort
end

#allow_sort=(value) ⇒ Object

Sets the allowSort property value. Represents the worksheet protection option of allowing using sort feature.

Parameters:

  • value

    Value to set for the allowSort property.

Returns:

  • a void



225
226
227
# File 'lib/models/workbook_worksheet_protection_options.rb', line 225

def allow_sort=(value)
    @allow_sort = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/models/workbook_worksheet_protection_options.rb', line 248

def get_field_deserializers()
    return {
        "allowAutoFilter" => lambda {|n| @allow_auto_filter = n.get_boolean_value() },
        "allowDeleteColumns" => lambda {|n| @allow_delete_columns = n.get_boolean_value() },
        "allowDeleteRows" => lambda {|n| @allow_delete_rows = n.get_boolean_value() },
        "allowFormatCells" => lambda {|n| @allow_format_cells = n.get_boolean_value() },
        "allowFormatColumns" => lambda {|n| @allow_format_columns = n.get_boolean_value() },
        "allowFormatRows" => lambda {|n| @allow_format_rows = n.get_boolean_value() },
        "allowInsertColumns" => lambda {|n| @allow_insert_columns = n.get_boolean_value() },
        "allowInsertHyperlinks" => lambda {|n| @allow_insert_hyperlinks = n.get_boolean_value() },
        "allowInsertRows" => lambda {|n| @allow_insert_rows = n.get_boolean_value() },
        "allowPivotTables" => lambda {|n| @allow_pivot_tables = n.get_boolean_value() },
        "allowSort" => lambda {|n| @allow_sort = n.get_boolean_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
    }
end

#odata_typeObject

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

Returns:

  • a string



268
269
270
# File 'lib/models/workbook_worksheet_protection_options.rb', line 268

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



276
277
278
# File 'lib/models/workbook_worksheet_protection_options.rb', line 276

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)


284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/models/workbook_worksheet_protection_options.rb', line 284

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_boolean_value("allowAutoFilter", @allow_auto_filter)
    writer.write_boolean_value("allowDeleteColumns", @allow_delete_columns)
    writer.write_boolean_value("allowDeleteRows", @allow_delete_rows)
    writer.write_boolean_value("allowFormatCells", @allow_format_cells)
    writer.write_boolean_value("allowFormatColumns", @allow_format_columns)
    writer.write_boolean_value("allowFormatRows", @allow_format_rows)
    writer.write_boolean_value("allowInsertColumns", @allow_insert_columns)
    writer.write_boolean_value("allowInsertHyperlinks", @allow_insert_hyperlinks)
    writer.write_boolean_value("allowInsertRows", @allow_insert_rows)
    writer.write_boolean_value("allowPivotTables", @allow_pivot_tables)
    writer.write_boolean_value("allowSort", @allow_sort)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_additional_data(@additional_data)
end