Class: Google::Apis::SheetsV4::Request

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/sheets_v4/classes.rb,
generated/google/apis/sheets_v4/representations.rb,
generated/google/apis/sheets_v4/representations.rb

Overview

A single kind of update to apply to a spreadsheet.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Request

Returns a new instance of Request



3454
3455
3456
# File 'generated/google/apis/sheets_v4/classes.rb', line 3454

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#add_bandingGoogle::Apis::SheetsV4::AddBandingRequest

Adds a new banded range to the spreadsheet. Corresponds to the JSON property addBanding



3408
3409
3410
# File 'generated/google/apis/sheets_v4/classes.rb', line 3408

def add_banding
  @add_banding
end

#add_chartGoogle::Apis::SheetsV4::AddChartRequest

Adds a chart to a sheet in the spreadsheet. Corresponds to the JSON property addChart



3186
3187
3188
# File 'generated/google/apis/sheets_v4/classes.rb', line 3186

def add_chart
  @add_chart
end

#add_conditional_format_ruleGoogle::Apis::SheetsV4::AddConditionalFormatRuleRequest

Adds a new conditional format rule at the given index. All subsequent rules' indexes are incremented. Corresponds to the JSON property addConditionalFormatRule



3378
3379
3380
# File 'generated/google/apis/sheets_v4/classes.rb', line 3378

def add_conditional_format_rule
  @add_conditional_format_rule
end

#add_filter_viewGoogle::Apis::SheetsV4::AddFilterViewRequest

Adds a filter view. Corresponds to the JSON property addFilterView



3250
3251
3252
# File 'generated/google/apis/sheets_v4/classes.rb', line 3250

def add_filter_view
  @add_filter_view
end

#add_named_rangeGoogle::Apis::SheetsV4::AddNamedRangeRequest

Adds a named range to the spreadsheet. Corresponds to the JSON property addNamedRange



3388
3389
3390
# File 'generated/google/apis/sheets_v4/classes.rb', line 3388

def add_named_range
  @add_named_range
end

#add_protected_rangeGoogle::Apis::SheetsV4::AddProtectedRangeRequest

Adds a new protected range. Corresponds to the JSON property addProtectedRange



3336
3337
3338
# File 'generated/google/apis/sheets_v4/classes.rb', line 3336

def add_protected_range
  @add_protected_range
end

#add_sheetGoogle::Apis::SheetsV4::AddSheetRequest

Adds a new sheet. When a sheet is added at a given index, all subsequent sheets' indexes are incremented. To add an object sheet, use AddChartRequest instead and specify EmbeddedObjectPosition.sheetId or EmbeddedObjectPosition.newSheet. Corresponds to the JSON property addSheet



3214
3215
3216
# File 'generated/google/apis/sheets_v4/classes.rb', line 3214

def add_sheet
  @add_sheet
end

#append_cellsGoogle::Apis::SheetsV4::AppendCellsRequest

Adds new cells after the last row with data in a sheet, inserting new rows into the sheet if necessary. Corresponds to the JSON property appendCells



3420
3421
3422
# File 'generated/google/apis/sheets_v4/classes.rb', line 3420

def append_cells
  @append_cells
end

#append_dimensionGoogle::Apis::SheetsV4::AppendDimensionRequest

Appends rows or columns to the end of a sheet. Corresponds to the JSON property appendDimension



3300
3301
3302
# File 'generated/google/apis/sheets_v4/classes.rb', line 3300

def append_dimension
  @append_dimension
end

#auto_fillGoogle::Apis::SheetsV4::AutoFillRequest

Fills in more data based on existing data. Corresponds to the JSON property autoFill



3452
3453
3454
# File 'generated/google/apis/sheets_v4/classes.rb', line 3452

def auto_fill
  @auto_fill
end

#auto_resize_dimensionsGoogle::Apis::SheetsV4::AutoResizeDimensionsRequest

Automatically resizes one or more dimensions based on the contents of the cells in that dimension. Corresponds to the JSON property autoResizeDimensions



3414
3415
3416
# File 'generated/google/apis/sheets_v4/classes.rb', line 3414

def auto_resize_dimensions
  @auto_resize_dimensions
end

#clear_basic_filterGoogle::Apis::SheetsV4::ClearBasicFilterRequest

Clears the basic filter, if any exists on the sheet. Corresponds to the JSON property clearBasicFilter



3295
3296
3297
# File 'generated/google/apis/sheets_v4/classes.rb', line 3295

def clear_basic_filter
  @clear_basic_filter
end

#copy_pasteGoogle::Apis::SheetsV4::CopyPasteRequest

Copies data from the source to the destination. Corresponds to the JSON property copyPaste



3230
3231
3232
# File 'generated/google/apis/sheets_v4/classes.rb', line 3230

def copy_paste
  @copy_paste
end

#cut_pasteGoogle::Apis::SheetsV4::CutPasteRequest

Moves data from the source to the destination. Corresponds to the JSON property cutPaste



3425
3426
3427
# File 'generated/google/apis/sheets_v4/classes.rb', line 3425

def cut_paste
  @cut_paste
end

#delete_bandingGoogle::Apis::SheetsV4::DeleteBandingRequest

Removes the banded range with the given ID from the spreadsheet. Corresponds to the JSON property deleteBanding



3245
3246
3247
# File 'generated/google/apis/sheets_v4/classes.rb', line 3245

def delete_banding
  @delete_banding
end

#delete_conditional_format_ruleGoogle::Apis::SheetsV4::DeleteConditionalFormatRuleRequest

Deletes a conditional format rule at the given index. All subsequent rules' indexes are decremented. Corresponds to the JSON property deleteConditionalFormatRule



3275
3276
3277
# File 'generated/google/apis/sheets_v4/classes.rb', line 3275

def delete_conditional_format_rule
  @delete_conditional_format_rule
end

#delete_dimensionGoogle::Apis::SheetsV4::DeleteDimensionRequest

Deletes the dimensions from the sheet. Corresponds to the JSON property deleteDimension



3447
3448
3449
# File 'generated/google/apis/sheets_v4/classes.rb', line 3447

def delete_dimension
  @delete_dimension
end

#delete_embedded_objectGoogle::Apis::SheetsV4::DeleteEmbeddedObjectRequest

Deletes the embedded object with the given ID. Corresponds to the JSON property deleteEmbeddedObject



3398
3399
3400
# File 'generated/google/apis/sheets_v4/classes.rb', line 3398

def delete_embedded_object
  @delete_embedded_object
end

#delete_filter_viewGoogle::Apis::SheetsV4::DeleteFilterViewRequest

Deletes a particular filter view. Corresponds to the JSON property deleteFilterView



3225
3226
3227
# File 'generated/google/apis/sheets_v4/classes.rb', line 3225

def delete_filter_view
  @delete_filter_view
end

#delete_named_rangeGoogle::Apis::SheetsV4::DeleteNamedRangeRequest

Removes the named range with the given ID from the spreadsheet. Corresponds to the JSON property deleteNamedRange



3331
3332
3333
# File 'generated/google/apis/sheets_v4/classes.rb', line 3331

def delete_named_range
  @delete_named_range
end

#delete_protected_rangeGoogle::Apis::SheetsV4::DeleteProtectedRangeRequest

Deletes the protected range with the given ID. Corresponds to the JSON property deleteProtectedRange



3176
3177
3178
# File 'generated/google/apis/sheets_v4/classes.rb', line 3176

def delete_protected_range
  @delete_protected_range
end

#delete_rangeGoogle::Apis::SheetsV4::DeleteRangeRequest

Deletes a range of cells, shifting other cells into the deleted area. Corresponds to the JSON property deleteRange



3240
3241
3242
# File 'generated/google/apis/sheets_v4/classes.rb', line 3240

def delete_range
  @delete_range
end

#delete_sheetGoogle::Apis::SheetsV4::DeleteSheetRequest

Deletes the requested sheet. Corresponds to the JSON property deleteSheet



3346
3347
3348
# File 'generated/google/apis/sheets_v4/classes.rb', line 3346

def delete_sheet
  @delete_sheet
end

#duplicate_filter_viewGoogle::Apis::SheetsV4::DuplicateFilterViewRequest

Duplicates a particular filter view. Corresponds to the JSON property duplicateFilterView



3181
3182
3183
# File 'generated/google/apis/sheets_v4/classes.rb', line 3181

def duplicate_filter_view
  @duplicate_filter_view
end

#duplicate_sheetGoogle::Apis::SheetsV4::DuplicateSheetRequest

Duplicates the contents of a sheet. Corresponds to the JSON property duplicateSheet



3341
3342
3343
# File 'generated/google/apis/sheets_v4/classes.rb', line 3341

def duplicate_sheet
  @duplicate_sheet
end

#find_replaceGoogle::Apis::SheetsV4::FindReplaceRequest

Finds and replaces data in cells over a range, sheet, or all sheets. Corresponds to the JSON property findReplace



3191
3192
3193
# File 'generated/google/apis/sheets_v4/classes.rb', line 3191

def find_replace
  @find_replace
end

#insert_dimensionGoogle::Apis::SheetsV4::InsertDimensionRequest

Inserts rows or columns in a sheet at a particular index. Corresponds to the JSON property insertDimension



3235
3236
3237
# File 'generated/google/apis/sheets_v4/classes.rb', line 3235

def insert_dimension
  @insert_dimension
end

#insert_rangeGoogle::Apis::SheetsV4::InsertRangeRequest

Inserts cells into a range, shifting the existing cells over or down. Corresponds to the JSON property insertRange



3311
3312
3313
# File 'generated/google/apis/sheets_v4/classes.rb', line 3311

def insert_range
  @insert_range
end

#merge_cellsGoogle::Apis::SheetsV4::MergeCellsRequest

Merges all cells in the range. Corresponds to the JSON property mergeCells



3430
3431
3432
# File 'generated/google/apis/sheets_v4/classes.rb', line 3430

def merge_cells
  @merge_cells
end

#move_dimensionGoogle::Apis::SheetsV4::MoveDimensionRequest

Moves one or more rows or columns. Corresponds to the JSON property moveDimension



3316
3317
3318
# File 'generated/google/apis/sheets_v4/classes.rb', line 3316

def move_dimension
  @move_dimension
end

#paste_dataGoogle::Apis::SheetsV4::PasteDataRequest

Inserts data into the spreadsheet starting at the specified coordinate. Corresponds to the JSON property pasteData



3367
3368
3369
# File 'generated/google/apis/sheets_v4/classes.rb', line 3367

def paste_data
  @paste_data
end

#randomize_rangeGoogle::Apis::SheetsV4::RandomizeRangeRequest

Randomizes the order of the rows in a range. Corresponds to the JSON property randomizeRange



3321
3322
3323
# File 'generated/google/apis/sheets_v4/classes.rb', line 3321

def randomize_range
  @randomize_range
end

#repeat_cellGoogle::Apis::SheetsV4::RepeatCellRequest

Updates all cells in the range to the values in the given Cell object. Only the fields listed in the fields field are updated; others are unchanged. If writing a cell with a formula, the formula's ranges will automatically increment for each field in the range. For example, if writing a cell with formula =A1 into range B2:C4, B2 would be =A1, B3 would be =A2, B4 would be =A3, C2 would be =B1, C3 would be =B2, C4 would be =B3. To keep the formula's ranges static, use the $ indicator. For example, use the formula =$A$1 to prevent both the row and the column from incrementing. Corresponds to the JSON property repeatCell



3290
3291
3292
# File 'generated/google/apis/sheets_v4/classes.rb', line 3290

def repeat_cell
  @repeat_cell
end

#set_basic_filterGoogle::Apis::SheetsV4::SetBasicFilterRequest

Sets the basic filter associated with a sheet. Corresponds to the JSON property setBasicFilter



3372
3373
3374
# File 'generated/google/apis/sheets_v4/classes.rb', line 3372

def set_basic_filter
  @set_basic_filter
end

#set_data_validationGoogle::Apis::SheetsV4::SetDataValidationRequest

Sets a data validation rule to every cell in the range. To clear validation in a range, call this with no rule specified. Corresponds to the JSON property setDataValidation



3256
3257
3258
# File 'generated/google/apis/sheets_v4/classes.rb', line 3256

def set_data_validation
  @set_data_validation
end

#sort_rangeGoogle::Apis::SheetsV4::SortRangeRequest

Sorts data in rows based on a sort order per column. Corresponds to the JSON property sortRange



3171
3172
3173
# File 'generated/google/apis/sheets_v4/classes.rb', line 3171

def sort_range
  @sort_range
end

#text_to_columnsGoogle::Apis::SheetsV4::TextToColumnsRequest

Splits a column of text into multiple columns, based on a delimiter in each cell. Corresponds to the JSON property textToColumns



3197
3198
3199
# File 'generated/google/apis/sheets_v4/classes.rb', line 3197

def text_to_columns
  @text_to_columns
end

#unmerge_cellsGoogle::Apis::SheetsV4::UnmergeCellsRequest

Unmerges cells in the given range. Corresponds to the JSON property unmergeCells



3351
3352
3353
# File 'generated/google/apis/sheets_v4/classes.rb', line 3351

def unmerge_cells
  @unmerge_cells
end

#update_bandingGoogle::Apis::SheetsV4::UpdateBandingRequest

Updates properties of the supplied banded range. Corresponds to the JSON property updateBanding



3326
3327
3328
# File 'generated/google/apis/sheets_v4/classes.rb', line 3326

def update_banding
  @update_banding
end

#update_bordersGoogle::Apis::SheetsV4::UpdateBordersRequest

Updates the borders of a range. If a field is not set in the request, that means the border remains as-is. For example, with two subsequent UpdateBordersRequest:

  1. range: A1:A5 top: RED, bottom: WHITE
  2. range: A1:A5 left: BLUE That would result in A1:A5 having a borders of top: RED, bottom: WHITE, left: BLUE. If you want to clear a border, explicitly set the style to NONE. Corresponds to the JSON property updateBorders


3269
3270
3271
# File 'generated/google/apis/sheets_v4/classes.rb', line 3269

def update_borders
  @update_borders
end

#update_cellsGoogle::Apis::SheetsV4::UpdateCellsRequest

Updates all cells in a range with new data. Corresponds to the JSON property updateCells



3383
3384
3385
# File 'generated/google/apis/sheets_v4/classes.rb', line 3383

def update_cells
  @update_cells
end

#update_chart_specGoogle::Apis::SheetsV4::UpdateChartSpecRequest

Updates a chart's specifications. (This does not move or resize a chart. To move or resize a chart, use UpdateEmbeddedObjectPositionRequest.) Corresponds to the JSON property updateChartSpec



3204
3205
3206
# File 'generated/google/apis/sheets_v4/classes.rb', line 3204

def update_chart_spec
  @update_chart_spec
end

#update_conditional_format_ruleGoogle::Apis::SheetsV4::UpdateConditionalFormatRuleRequest

Updates a conditional format rule at the given index, or moves a conditional format rule to another index. Corresponds to the JSON property updateConditionalFormatRule



3306
3307
3308
# File 'generated/google/apis/sheets_v4/classes.rb', line 3306

def update_conditional_format_rule
  @update_conditional_format_rule
end

#update_dimension_propertiesGoogle::Apis::SheetsV4::UpdateDimensionPropertiesRequest

Updates properties of dimensions within the specified range. Corresponds to the JSON property updateDimensionProperties



3362
3363
3364
# File 'generated/google/apis/sheets_v4/classes.rb', line 3362

def update_dimension_properties
  @update_dimension_properties
end

#update_embedded_object_positionGoogle::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest

Update an embedded object's position (such as a moving or resizing a chart or image). Corresponds to the JSON property updateEmbeddedObjectPosition



3357
3358
3359
# File 'generated/google/apis/sheets_v4/classes.rb', line 3357

def update_embedded_object_position
  @update_embedded_object_position
end

#update_filter_viewGoogle::Apis::SheetsV4::UpdateFilterViewRequest

Updates properties of the filter view. Corresponds to the JSON property updateFilterView



3403
3404
3405
# File 'generated/google/apis/sheets_v4/classes.rb', line 3403

def update_filter_view
  @update_filter_view
end

#update_named_rangeGoogle::Apis::SheetsV4::UpdateNamedRangeRequest

Updates properties of the named range with the specified namedRangeId. Corresponds to the JSON property updateNamedRange



3436
3437
3438
# File 'generated/google/apis/sheets_v4/classes.rb', line 3436

def update_named_range
  @update_named_range
end

#update_protected_rangeGoogle::Apis::SheetsV4::UpdateProtectedRangeRequest

Updates an existing protected range with the specified protectedRangeId. Corresponds to the JSON property updateProtectedRange



3220
3221
3222
# File 'generated/google/apis/sheets_v4/classes.rb', line 3220

def update_protected_range
  @update_protected_range
end

#update_sheet_propertiesGoogle::Apis::SheetsV4::UpdateSheetPropertiesRequest

Updates properties of the sheet with the specified sheetId. Corresponds to the JSON property updateSheetProperties



3442
3443
3444
# File 'generated/google/apis/sheets_v4/classes.rb', line 3442

def update_sheet_properties
  @update_sheet_properties
end

#update_spreadsheet_propertiesGoogle::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest

Updates properties of a spreadsheet. Corresponds to the JSON property updateSpreadsheetProperties



3393
3394
3395
# File 'generated/google/apis/sheets_v4/classes.rb', line 3393

def update_spreadsheet_properties
  @update_spreadsheet_properties
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
# File 'generated/google/apis/sheets_v4/classes.rb', line 3459

def update!(**args)
  @sort_range = args[:sort_range] if args.key?(:sort_range)
  @delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range)
  @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view)
  @add_chart = args[:add_chart] if args.key?(:add_chart)
  @find_replace = args[:find_replace] if args.key?(:find_replace)
  @text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns)
  @update_chart_spec = args[:update_chart_spec] if args.key?(:update_chart_spec)
  @add_sheet = args[:add_sheet] if args.key?(:add_sheet)
  @update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range)
  @delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view)
  @copy_paste = args[:copy_paste] if args.key?(:copy_paste)
  @insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension)
  @delete_range = args[:delete_range] if args.key?(:delete_range)
  @delete_banding = args[:delete_banding] if args.key?(:delete_banding)
  @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view)
  @set_data_validation = args[:set_data_validation] if args.key?(:set_data_validation)
  @update_borders = args[:update_borders] if args.key?(:update_borders)
  @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule)
  @repeat_cell = args[:repeat_cell] if args.key?(:repeat_cell)
  @clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter)
  @append_dimension = args[:append_dimension] if args.key?(:append_dimension)
  @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule)
  @insert_range = args[:insert_range] if args.key?(:insert_range)
  @move_dimension = args[:move_dimension] if args.key?(:move_dimension)
  @randomize_range = args[:randomize_range] if args.key?(:randomize_range)
  @update_banding = args[:update_banding] if args.key?(:update_banding)
  @delete_named_range = args[:delete_named_range] if args.key?(:delete_named_range)
  @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range)
  @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet)
  @delete_sheet = args[:delete_sheet] if args.key?(:delete_sheet)
  @unmerge_cells = args[:unmerge_cells] if args.key?(:unmerge_cells)
  @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position)
  @update_dimension_properties = args[:update_dimension_properties] if args.key?(:update_dimension_properties)
  @paste_data = args[:paste_data] if args.key?(:paste_data)
  @set_basic_filter = args[:set_basic_filter] if args.key?(:set_basic_filter)
  @add_conditional_format_rule = args[:add_conditional_format_rule] if args.key?(:add_conditional_format_rule)
  @update_cells = args[:update_cells] if args.key?(:update_cells)
  @add_named_range = args[:add_named_range] if args.key?(:add_named_range)
  @update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties)
  @delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object)
  @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view)
  @add_banding = args[:add_banding] if args.key?(:add_banding)
  @auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions)
  @append_cells = args[:append_cells] if args.key?(:append_cells)
  @cut_paste = args[:cut_paste] if args.key?(:cut_paste)
  @merge_cells = args[:merge_cells] if args.key?(:merge_cells)
  @update_named_range = args[:update_named_range] if args.key?(:update_named_range)
  @update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties)
  @delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension)
  @auto_fill = args[:auto_fill] if args.key?(:auto_fill)
end