Skip to main content

BatchUpdateRequestItem

Enum BatchUpdateRequestItem 

Source
pub enum BatchUpdateRequestItem {
Show 58 variants FindReplace(FindReplaceRequest), AddSheet(AddSheetRequest), UpdateSheetProperties(UpdateSheetPropertiesRequest), UpdateSpreadsheetProperties(UpdateSpreadsheetPropertiesRequest), InsertDimension(InsertDimensionRequest), InsertRange(InsertRangeRequest), DeleteSheet(DeleteSheetRequest), DeleteDimension(DeleteDimensionRequest), MoveDimension(MoveDimensionRequest), DeleteRange(DeleteRangeRequest), DuplicateSheet(DuplicateSheetRequest), RepeatCell(RepeatCellRequest), UpdateBorders(UpdateBordersRequest), MergeCells(MergeCellsRequest), UnmergeCells(UnmergeCellsRequest), AutoResizeDimensions(AutoResizeDimensionsRequest), UpdateDimensionProperties(UpdateDimensionPropertiesRequest), SetDataValidation(SetDataValidationRequest), AddProtectedRange(AddProtectedRangeRequest), UpdateProtectedRange(UpdateProtectedRangeRequest), DeleteProtectedRange(DeleteProtectedRangeRequest), CreateDeveloperMetadata(CreateDeveloperMetadataRequest), UpdateDeveloperMetadata(UpdateDeveloperMetadataRequest), DeleteDeveloperMetadata(DeleteDeveloperMetadataRequest), SetBasicFilter(SetBasicFilterRequest), ClearBasicFilter(ClearBasicFilterRequest), AddFilterView(AddFilterViewRequest), UpdateFilterView(UpdateFilterViewRequest), DeleteFilterView(DeleteFilterViewRequest), AddConditionalFormatRule(AddConditionalFormatRuleRequest), UpdateConditionalFormatRule(UpdateConditionalFormatRuleRequest), DeleteConditionalFormatRule(DeleteConditionalFormatRuleRequest), AddNamedRange(AddNamedRangeRequest), UpdateNamedRange(UpdateNamedRangeRequest), DeleteNamedRange(DeleteNamedRangeRequest), AddChart(AddChartRequest), UpdateChartSpec(UpdateChartSpecRequest), AddSlicer(AddSlicerRequest), UpdateSlicerSpec(UpdateSlicerSpecRequest), DeleteEmbeddedObject(DeleteEmbeddedObjectRequest), UpdateEmbeddedObjectPosition(UpdateEmbeddedObjectPositionRequest), UpdateEmbeddedObjectBorder(UpdateEmbeddedObjectBorderRequest), UpdateCells(UpdateCellsRequest), AddBanding(AddBandingRequest), UpdateBanding(UpdateBandingRequest), DeleteBanding(DeleteBandingRequest), AddDimensionGroup(AddDimensionGroupRequest), UpdateDimensionGroup(UpdateDimensionGroupRequest), DeleteDimensionGroup(DeleteDimensionGroupRequest), CutPaste(CutPasteRequest), CopyPaste(CopyPasteRequest), PasteData(PasteDataRequest), AutoFill(AutoFillRequest), SortRange(SortRangeRequest), RandomizeRange(RandomizeRangeRequest), TextToColumns(TextToColumnsRequest), TrimWhitespace(TrimWhitespaceRequest), DeleteDuplicates(DeleteDuplicatesRequest),
}
Expand description

One spreadsheets.batchUpdate request.

Externally tagged, which is exactly Sheets’ own wire shape: {"addSheet": {...}}. Every variant here is reachable only through its owning module’s gated engine: the additive verbs behind DriveOperation::SheetsStructure (issue #1613, ADR-0075, extended by issue #1643, ADR-0078, with formatting, data validation, duplicateSheet, reorder/hide and, since issue #1795 (ADR-0081 §4), developer-metadata management, and extended again by issue #1796, ADR-0081 §2, with named-range add/update/delete), the destructive ones behind DriveOperation::SheetsDelete (issue #1623, ADR-0077), and the protected-range ones behind DriveOperation::SheetsProtection (issue #1643, ADR-0078 §2) — there is still no raw --requests passthrough that could construct one of these outside its gate. structure.rs’s every_delete_verb_gates_on_sheets_delete_not_sheets_structure/ every_additive_verb_still_gates_on_sheets_structure tests pin that every verb reaches exactly one gate, never the other; developer_metadata.rs has no dispatch table to get wrong in the first place — its Set/Delete verbs share the single hardcoded DriveOperation::SheetsStructure call site in developer_metadata_inner.

Variants§

§

FindReplace(FindReplaceRequest)

Find and replace cell text (find-replace, issue #1841). Gated by DriveOperation::SheetsWrite; FindReplaceRequest::scope makes an unscoped request unrepresentable.

§

AddSheet(AddSheetRequest)

Add a new sheet to the workbook.

§

UpdateSheetProperties(UpdateSheetPropertiesRequest)

Change an existing sheet’s properties — title (rename), index (reorder), hidden (hide/show), or, since issue #1835’s update-sheet-properties, any of frozen rows/columns, hidden gridlines, tab color, or right-to-left layout. rename-sheet/ reorder-sheet/hide-sheet/show-sheet each set exactly one field per request; update-sheet-properties may set several at once, but the request’s fields mask always names exactly what was populated, one entry per field, so it can never blank a property it didn’t mean to touch.

§

UpdateSpreadsheetProperties(UpdateSpreadsheetPropertiesRequest)

Change workbook-level properties — locale, time zone, auto-recalc and/or iterative calculation (update-workbook-properties, issue #1836). Gated by crate::drive::write_gate::DriveOperation::SheetsStructure, like Self::UpdateSheetProperties: no cell’s formula changes, only (for iterative calculation) what some formulas compute — see IterativeCalculationSettings’s doc comment.

§

InsertDimension(InsertDimensionRequest)

Insert empty rows or columns, shifting existing ones.

§

InsertRange(InsertRangeRequest)

Insert empty cells into a rectangular range, shifting existing cells down or right within the grid.

§

DeleteSheet(DeleteSheetRequest)

Delete an entire sheet from the workbook.

§

DeleteDimension(DeleteDimensionRequest)

Delete whole rows or columns, shifting the remainder to close the gap.

§

MoveDimension(MoveDimensionRequest)

Move whole rows or columns to a new position within their sheet (move-rows/move-columns, issue #1834). Gated by crate::drive::write_gate::DriveOperation::SheetsStructure like the inserts, not SheetsDelete: a reordering discards nothing (ADR-0083’s “additive/structural” group).

§

DeleteRange(DeleteRangeRequest)

Delete a rectangular cell range, shifting the remainder to close the gap along one axis.

§

DuplicateSheet(DuplicateSheetRequest)

Copy an existing sheet within the same workbook.

§

RepeatCell(RepeatCellRequest)

Apply a cell format across a range (format-cells). Never carries a value — see RepeatCellData.

§

UpdateBorders(UpdateBordersRequest)

Set border lines on a range’s edges (update-borders).

§

MergeCells(MergeCellsRequest)

Merge a range into one cell (merge-cells) — the one request this enum models that discards data; see format.rs module docs.

§

UnmergeCells(UnmergeCellsRequest)

Split a previously merged range back apart (unmerge-cells).

§

AutoResizeDimensions(AutoResizeDimensionsRequest)

Resize rows/columns to fit their content (auto-resize-dimension).

§

UpdateDimensionProperties(UpdateDimensionPropertiesRequest)

Set explicit row height / column width (update-dimension-properties).

§

SetDataValidation(SetDataValidationRequest)

Set (or, with an absent rule, clear) a data validation rule on a range (set-data-validation / clear-data-validation).

§

AddProtectedRange(AddProtectedRangeRequest)

Add a protected range (protect-range). Gated by crate::drive::write_gate::DriveOperation::SheetsProtection, not SheetsStructure — see that variant’s doc comment.

§

UpdateProtectedRange(UpdateProtectedRangeRequest)

Change an existing protected range’s description, warning-only flag, or editor list (update-protection). Same gate as Self::AddProtectedRange.

§

DeleteProtectedRange(DeleteProtectedRangeRequest)

Remove a protected range (unprotect-range). Same gate as Self::AddProtectedRange — a permission removal, not a data deletion, which is why it needs no SheetsDelete grant.

§

CreateDeveloperMetadata(CreateDeveloperMetadataRequest)

Attach a new developer-metadata entry (set-developer-metadata, when no existing entry matched). Gated by crate::drive::write_gate::DriveOperation::SheetsStructure, like every other additive verb — see DeveloperMetadata’s doc comment for the DOCUMENT-only guarantee (issue #1795, ADR-0081 §4).

§

UpdateDeveloperMetadata(UpdateDeveloperMetadataRequest)

Change an existing developer-metadata entry’s value (set-developer-metadata, when an existing entry matched). Same gate as Self::CreateDeveloperMetadata.

§

DeleteDeveloperMetadata(DeleteDeveloperMetadataRequest)

Remove developer metadata (delete-developer-metadata) — a third-party add-on’s own state, not this spreadsheet’s grid data, so it stays under SheetsStructure rather than SheetsDelete (ADR-0081 §4). developer_metadata.rs reads back and reports every entry a request like this would remove before ever sending it.

§

SetBasicFilter(SetBasicFilterRequest)

Upsert a sheet’s basic filter (set-basic-filter). Gated by SheetsStructure (issue #1794, ADR-0081): a filter hides rows, which is view state, not data.

§

ClearBasicFilter(ClearBasicFilterRequest)

Remove a sheet’s basic filter (clear-basic-filter). Same gate as Self::SetBasicFilter.

§

AddFilterView(AddFilterViewRequest)

Add a named filter view (add-filter-view). Same gate as Self::SetBasicFilter.

§

UpdateFilterView(UpdateFilterViewRequest)

Change an existing filter view’s title, range, sort order, or hidden values (update-filter-view). Same gate as Self::SetBasicFilter.

§

DeleteFilterView(DeleteFilterViewRequest)

Remove a filter view (delete-filter-view). Same gate as Self::SetBasicFilter.

§

AddConditionalFormatRule(AddConditionalFormatRuleRequest)

Add a conditional format rule (add-conditional-format). Gated by DriveOperation::SheetsStructure — presentational, destroys no data (ADR-0081 §1, issue #1793).

§

UpdateConditionalFormatRule(UpdateConditionalFormatRuleRequest)

Replace an existing conditional format rule at an index (update-conditional-format). Same gate as Self::AddConditionalFormatRule.

§

DeleteConditionalFormatRule(DeleteConditionalFormatRuleRequest)

Remove a conditional format rule at an index (delete-conditional-format). Same gate as Self::AddConditionalFormatRule — a presentational removal, not a data deletion.

§

AddNamedRange(AddNamedRangeRequest)

Add a named range (add-named-range). Gated DriveOperation::SheetsStructure — a label over a region, created without touching any cell’s value.

§

UpdateNamedRange(UpdateNamedRangeRequest)

Change an existing named range’s name and/or range (update-named-range). Same gate as Self::AddNamedRange.

§

DeleteNamedRange(DeleteNamedRangeRequest)

Remove a named range (delete-named-range). Same gate as Self::AddNamedRange — it removes a label, not grid data; see ADR-0081 §2 for why this stays SheetsStructure rather than SheetsDelete, and for the mandatory referencing-formula preview that mitigates the resulting #REF! errors.

§

AddChart(AddChartRequest)

Add a chart (add-chart). Gated by DriveOperation::SheetsStructure — additive, destroys no data (ADR-0081 §3, issue #1797).

§

UpdateChartSpec(UpdateChartSpecRequest)

Replace an existing chart’s spec wholesale (update-chart). Same gate as Self::AddChart. Unlike updateFilterView, this request carries no field mask — see UpdateChartSpecRequest’s doc comment.

§

AddSlicer(AddSlicerRequest)

Add a slicer (add-slicer). Same gate as Self::AddChart.

§

UpdateSlicerSpec(UpdateSlicerSpecRequest)

Change an existing slicer’s spec (update-slicer). Same gate as Self::AddChart. Unlike Self::UpdateChartSpec, this request does carry a field mask — see UpdateSlicerSpecRequest.

§

DeleteEmbeddedObject(DeleteEmbeddedObjectRequest)

Remove a chart or slicer (delete-chart/delete-slicer) — the one request shared by both, addressed by objectId alone with no discriminator naming which kind it is. Gated by DriveOperation::SheetsStructure, not SheetsDelete: ADR-0081 §3 judges a chart/slicer the same kind of removal as unmerge-cells/clear-data-validation — a property of the sheet, not the sheet’s data — despite being genuinely unrecoverable, which is why embedded_object.rs reads back and reports the object’s spec before ever sending this.

§

UpdateEmbeddedObjectPosition(UpdateEmbeddedObjectPositionRequest)

Move and/or resize an existing chart or slicer (move-chart/ move-slicer). Gated by DriveOperation::SheetsStructure (issue #1837, ADR-0081 §3) — the same operation as add-chart/add-slicer’s own placement, since a move discards no data.

§

UpdateEmbeddedObjectBorder(UpdateEmbeddedObjectBorderRequest)

Set or clear an existing chart’s border colour (update-chart-border). Same gate as Self::UpdateEmbeddedObjectPosition (issue #1837).

§

UpdateCells(UpdateCellsRequest)

Write a pivot table into (add-pivot-table) or clear one from (delete-pivot-table) a single anchor cell. The crate’s only updateCells request — issue #1643’s “updateCells stays unused” decision (RepeatCellData’s doc comment) was specifically about writing a value, which PivotCellData still cannot do (it has no userEnteredValue field, same guarantee as RepeatCellData). Gated by both DriveOperation::SheetsWrite and DriveOperation::SheetsStructure for add-pivot-table (a grid write with a server-computed extent, but also a named structural feature — ADR-0081 §5’s union composition), and by SheetsWrite alone for delete-pivot-table (it only ever clears the one anchor cell’s value, no structural effect).

§

AddBanding(AddBandingRequest)

Add a new banded range (add-banding) — alternating row/column colors, presentation applied to a range. Gated by DriveOperation::SheetsStructure (issue #1832, ADR-0082): the same “property of the sheet, not the sheet’s data” reasoning as unmerge-cells/clear-data-validation.

§

UpdateBanding(UpdateBandingRequest)

Change an existing banded range’s colors and/or range (update-banding). Same gate as Self::AddBanding.

§

DeleteBanding(DeleteBandingRequest)

Remove a banded range (delete-banding). Same gate as Self::AddBanding — it removes presentation, not grid data.

§

AddDimensionGroup(AddDimensionGroupRequest)

Add a new outline group over a row or column span (add-dimension-group) — the collapsible +/- grouping bar. Gated by DriveOperation::SheetsStructure (issue #1833, ADR-0084): the same “property of the sheet, not the sheet’s data” reasoning as Self::AddBanding.

§

UpdateDimensionGroup(UpdateDimensionGroupRequest)

Change an existing outline group’s collapsed state (update-dimension-group). Same gate as Self::AddDimensionGroup.

§

DeleteDimensionGroup(DeleteDimensionGroupRequest)

Remove an outline group (delete-dimension-group). Same gate as Self::AddDimensionGroup — it removes presentation, not grid data.

§

CutPaste(CutPasteRequest)

Move a source range to a destination, clearing the source (cut-paste, issue #1839, ADR-0083 §4). Gated by both SheetsWrite and SheetsStructure regardless of pasteType: the source is always cleared in full — values, formats and merges — which is SheetsStructure’s territory on the formats/merges half exactly as clearing values is SheetsWrite’s.

§

CopyPaste(CopyPasteRequest)

Copy a source range to a destination, optionally repeated (copy-paste, issue #1839, ADR-0083 §4). Gated by pasteType: value-only types resolve SheetsWrite alone, presentation-only types SheetsStructure alone, and PASTE_NORMAL both.

§

PasteData(PasteDataRequest)

Paste delimited text into a range as if pasted from the clipboard (paste-data, issue #1839, ADR-0083 §4). delimiter-form only — the API’s html alternative is a documented cut (ADR-0083 §4). Same pasteType gate mapping as Self::CopyPaste.

§

AutoFill(AutoFillRequest)

Extend a series from source cells into an adjacent destination, using Sheets’ own pattern-detection heuristics (auto-fill, issue #1840, ADR-0083 §1). Gated by DriveOperation::SheetsWrite alone: it writes ordinary cell content into a range, doing nothing a sheets clear followed by a sheets write of the same range could not already do under the same grant.

§

SortRange(SortRangeRequest)

Reorders the rows of a range using one or more column sort keys (sort-range, issue #1842). Gated by SheetsWrite alone: it is a permutation of the named cells’ values, never a structural edit.

§

RandomizeRange(RandomizeRangeRequest)

Shuffles the row order within a bounded range into a server-chosen, unpredictable order (randomize-range, issue #1845, ADR-0083 §§3, 5, 6). Gated by both SheetsWrite and SheetsStructure: live verification found a reordered row carries its formatting, notes and data-validation rules with it — SheetsStructure’s own subject matter, exactly as text-to-columns was measured doing — and its in-range formulas move with their row with their relative references rewritten to match.

§

TextToColumns(TextToColumnsRequest)

Splits a single column’s delimited text across the adjacent columns to its right (text-to-columns, issue #1843, ADR-0083 §§1, 5). Gated by DriveOperation::SheetsWrite and SheetsStructure: it writes ordinary cell content into columns the request derives from source, which the first covers, and was measured carrying the source cell’s formatting into those columns, which only the second does (§5’s live-verification consequence).

§

TrimWhitespace(TrimWhitespaceRequest)

Trims whitespace in every cell of a range (trim-whitespace, issue #1844, ADR-0083 §1). Gated by DriveOperation::SheetsWrite alone: it rewrites ordinary cell content in place, doing nothing a sheets clear followed by a sheets write of the same range could not already do under the same grant.

§

DeleteDuplicates(DeleteDuplicatesRequest)

Removes rows within a range that duplicate an earlier row (delete-duplicates, issue #1844, ADR-0083 §2). The one verb in this tranche gated by crate::drive::write_gate::DriveOperation::SheetsDelete rather than SheetsWrite: rows cease to exist and the survivors close over the gap, which is delete-range’s shape, not clear’s.

Trait Implementations§

Source§

impl Clone for BatchUpdateRequestItem

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BatchUpdateRequestItem

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for BatchUpdateRequestItem

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for BatchUpdateRequestItem

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for BatchUpdateRequestItem

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more