Skip to main content
Glama
ag2-mcp-servers

Google Sheets API MCP Server

models.py191 kB
# generated by fastapi-codegen: # filename: openapi.yaml # timestamp: 2025-06-29T02:51:44+00:00 from __future__ import annotations from enum import Enum from typing import Dict, List, Optional from pydantic import BaseModel, Field, RootModel class Dimension(Enum): DIMENSION_UNSPECIFIED = 'DIMENSION_UNSPECIFIED' ROWS = 'ROWS' COLUMNS = 'COLUMNS' class AppendDimensionRequest(BaseModel): dimension: Optional[Dimension] = Field( None, description='Whether rows or columns should be appended.' ) length: Optional[int] = Field( None, description='The number of rows or columns to append.' ) sheetId: Optional[int] = Field( None, description='The sheet to append rows or columns to.' ) class ComparisonType(Enum): COMPARISON_TYPE_UNDEFINED = 'COMPARISON_TYPE_UNDEFINED' ABSOLUTE_DIFFERENCE = 'ABSOLUTE_DIFFERENCE' PERCENTAGE_DIFFERENCE = 'PERCENTAGE_DIFFERENCE' class Position(Enum): BASIC_CHART_AXIS_POSITION_UNSPECIFIED = 'BASIC_CHART_AXIS_POSITION_UNSPECIFIED' BOTTOM_AXIS = 'BOTTOM_AXIS' LEFT_AXIS = 'LEFT_AXIS' RIGHT_AXIS = 'RIGHT_AXIS' class TargetAxis(Enum): BASIC_CHART_AXIS_POSITION_UNSPECIFIED = 'BASIC_CHART_AXIS_POSITION_UNSPECIFIED' BOTTOM_AXIS = 'BOTTOM_AXIS' LEFT_AXIS = 'LEFT_AXIS' RIGHT_AXIS = 'RIGHT_AXIS' class Type(Enum): BASIC_CHART_TYPE_UNSPECIFIED = 'BASIC_CHART_TYPE_UNSPECIFIED' BAR = 'BAR' LINE = 'LINE' AREA = 'AREA' COLUMN = 'COLUMN' SCATTER = 'SCATTER' COMBO = 'COMBO' STEPPED_AREA = 'STEPPED_AREA' class ChartType(Enum): BASIC_CHART_TYPE_UNSPECIFIED = 'BASIC_CHART_TYPE_UNSPECIFIED' BAR = 'BAR' LINE = 'LINE' AREA = 'AREA' COLUMN = 'COLUMN' SCATTER = 'SCATTER' COMBO = 'COMBO' STEPPED_AREA = 'STEPPED_AREA' class CompareMode(Enum): BASIC_CHART_COMPARE_MODE_UNSPECIFIED = 'BASIC_CHART_COMPARE_MODE_UNSPECIFIED' DATUM = 'DATUM' CATEGORY = 'CATEGORY' class LegendPosition(Enum): BASIC_CHART_LEGEND_POSITION_UNSPECIFIED = 'BASIC_CHART_LEGEND_POSITION_UNSPECIFIED' BOTTOM_LEGEND = 'BOTTOM_LEGEND' LEFT_LEGEND = 'LEFT_LEGEND' RIGHT_LEGEND = 'RIGHT_LEGEND' TOP_LEGEND = 'TOP_LEGEND' NO_LEGEND = 'NO_LEGEND' class StackedType(Enum): BASIC_CHART_STACKED_TYPE_UNSPECIFIED = 'BASIC_CHART_STACKED_TYPE_UNSPECIFIED' NOT_STACKED = 'NOT_STACKED' STACKED = 'STACKED' PERCENT_STACKED = 'PERCENT_STACKED' class BatchClearValuesByDataFilterResponse(BaseModel): clearedRanges: Optional[List[str]] = Field( None, description="The ranges that were cleared, in [A1 notation](/sheets/api/guides/concepts#cell). If the requests are for an unbounded range or a ranger larger than the bounds of the sheet, this is the actual ranges that were cleared, bounded to the sheet's limits.", ) spreadsheetId: Optional[str] = Field( None, description='The spreadsheet the updates were applied to.' ) class BatchClearValuesRequest(BaseModel): ranges: Optional[List[str]] = Field( None, description='The ranges to clear, in [A1 notation or R1C1 notation](/sheets/api/guides/concepts#cell).', ) class BatchClearValuesResponse(BaseModel): clearedRanges: Optional[List[str]] = Field( None, description="The ranges that were cleared, in A1 notation. If the requests are for an unbounded range or a ranger larger than the bounds of the sheet, this is the actual ranges that were cleared, bounded to the sheet's limits.", ) spreadsheetId: Optional[str] = Field( None, description='The spreadsheet the updates were applied to.' ) class DateTimeRenderOption(Enum): SERIAL_NUMBER = 'SERIAL_NUMBER' FORMATTED_STRING = 'FORMATTED_STRING' class MajorDimension(Enum): DIMENSION_UNSPECIFIED = 'DIMENSION_UNSPECIFIED' ROWS = 'ROWS' COLUMNS = 'COLUMNS' class ValueRenderOption(Enum): FORMATTED_VALUE = 'FORMATTED_VALUE' UNFORMATTED_VALUE = 'UNFORMATTED_VALUE' FORMULA = 'FORMULA' class ResponseDateTimeRenderOption(Enum): SERIAL_NUMBER = 'SERIAL_NUMBER' FORMATTED_STRING = 'FORMATTED_STRING' class ResponseValueRenderOption(Enum): FORMATTED_VALUE = 'FORMATTED_VALUE' UNFORMATTED_VALUE = 'UNFORMATTED_VALUE' FORMULA = 'FORMULA' class ValueInputOption(Enum): INPUT_VALUE_OPTION_UNSPECIFIED = 'INPUT_VALUE_OPTION_UNSPECIFIED' RAW = 'RAW' USER_ENTERED = 'USER_ENTERED' class BigQueryQuerySpec(BaseModel): rawQuery: Optional[str] = Field(None, description='The raw query string.') class BigQueryTableSpec(BaseModel): datasetId: Optional[str] = Field(None, description='The BigQuery dataset id.') tableId: Optional[str] = Field(None, description='The BigQuery table id.') tableProjectId: Optional[str] = Field( None, description='The ID of a BigQuery project the table belongs to. If not specified, the project_id is assumed.', ) class Type1(Enum): CONDITION_TYPE_UNSPECIFIED = 'CONDITION_TYPE_UNSPECIFIED' NUMBER_GREATER = 'NUMBER_GREATER' NUMBER_GREATER_THAN_EQ = 'NUMBER_GREATER_THAN_EQ' NUMBER_LESS = 'NUMBER_LESS' NUMBER_LESS_THAN_EQ = 'NUMBER_LESS_THAN_EQ' NUMBER_EQ = 'NUMBER_EQ' NUMBER_NOT_EQ = 'NUMBER_NOT_EQ' NUMBER_BETWEEN = 'NUMBER_BETWEEN' NUMBER_NOT_BETWEEN = 'NUMBER_NOT_BETWEEN' TEXT_CONTAINS = 'TEXT_CONTAINS' TEXT_NOT_CONTAINS = 'TEXT_NOT_CONTAINS' TEXT_STARTS_WITH = 'TEXT_STARTS_WITH' TEXT_ENDS_WITH = 'TEXT_ENDS_WITH' TEXT_EQ = 'TEXT_EQ' TEXT_IS_EMAIL = 'TEXT_IS_EMAIL' TEXT_IS_URL = 'TEXT_IS_URL' DATE_EQ = 'DATE_EQ' DATE_BEFORE = 'DATE_BEFORE' DATE_AFTER = 'DATE_AFTER' DATE_ON_OR_BEFORE = 'DATE_ON_OR_BEFORE' DATE_ON_OR_AFTER = 'DATE_ON_OR_AFTER' DATE_BETWEEN = 'DATE_BETWEEN' DATE_NOT_BETWEEN = 'DATE_NOT_BETWEEN' DATE_IS_VALID = 'DATE_IS_VALID' ONE_OF_RANGE = 'ONE_OF_RANGE' ONE_OF_LIST = 'ONE_OF_LIST' BLANK = 'BLANK' NOT_BLANK = 'NOT_BLANK' CUSTOM_FORMULA = 'CUSTOM_FORMULA' BOOLEAN = 'BOOLEAN' TEXT_NOT_EQ = 'TEXT_NOT_EQ' DATE_NOT_EQ = 'DATE_NOT_EQ' class Style(Enum): STYLE_UNSPECIFIED = 'STYLE_UNSPECIFIED' DOTTED = 'DOTTED' DASHED = 'DASHED' SOLID = 'SOLID' SOLID_MEDIUM = 'SOLID_MEDIUM' SOLID_THICK = 'SOLID_THICK' NONE = 'NONE' DOUBLE = 'DOUBLE' class LegendPosition1(Enum): BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED = ( 'BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED' ) BOTTOM_LEGEND = 'BOTTOM_LEGEND' LEFT_LEGEND = 'LEFT_LEGEND' RIGHT_LEGEND = 'RIGHT_LEGEND' TOP_LEGEND = 'TOP_LEGEND' NO_LEGEND = 'NO_LEGEND' INSIDE_LEGEND = 'INSIDE_LEGEND' class HorizontalAlignment(Enum): HORIZONTAL_ALIGN_UNSPECIFIED = 'HORIZONTAL_ALIGN_UNSPECIFIED' LEFT = 'LEFT' CENTER = 'CENTER' RIGHT = 'RIGHT' class HyperlinkDisplayType(Enum): HYPERLINK_DISPLAY_TYPE_UNSPECIFIED = 'HYPERLINK_DISPLAY_TYPE_UNSPECIFIED' LINKED = 'LINKED' PLAIN_TEXT = 'PLAIN_TEXT' class TextDirection(Enum): TEXT_DIRECTION_UNSPECIFIED = 'TEXT_DIRECTION_UNSPECIFIED' LEFT_TO_RIGHT = 'LEFT_TO_RIGHT' RIGHT_TO_LEFT = 'RIGHT_TO_LEFT' class VerticalAlignment(Enum): VERTICAL_ALIGN_UNSPECIFIED = 'VERTICAL_ALIGN_UNSPECIFIED' TOP = 'TOP' MIDDLE = 'MIDDLE' BOTTOM = 'BOTTOM' class WrapStrategy(Enum): WRAP_STRATEGY_UNSPECIFIED = 'WRAP_STRATEGY_UNSPECIFIED' OVERFLOW_CELL = 'OVERFLOW_CELL' LEGACY_WRAP = 'LEGACY_WRAP' CLIP = 'CLIP' WRAP = 'WRAP' class ViewWindowMode(Enum): DEFAULT_VIEW_WINDOW_MODE = 'DEFAULT_VIEW_WINDOW_MODE' VIEW_WINDOW_MODE_UNSUPPORTED = 'VIEW_WINDOW_MODE_UNSUPPORTED' EXPLICIT = 'EXPLICIT' PRETTY = 'PRETTY' class ChartAxisViewWindowOptions(BaseModel): viewWindowMax: Optional[float] = Field( None, description='The maximum numeric value to be shown in this view window. If unset, will automatically determine a maximum value that looks good for the data.', ) viewWindowMin: Optional[float] = Field( None, description='The minimum numeric value to be shown in this view window. If unset, will automatically determine a minimum value that looks good for the data.', ) viewWindowMode: Optional[ViewWindowMode] = Field( None, description="The view window's mode." ) class ChartCustomNumberFormatOptions(BaseModel): prefix: Optional[str] = Field( None, description='Custom prefix to be prepended to the chart attribute. This field is optional.', ) suffix: Optional[str] = Field( None, description='Custom suffix to be appended to the chart attribute. This field is optional.', ) class AggregateType(Enum): CHART_AGGREGATE_TYPE_UNSPECIFIED = 'CHART_AGGREGATE_TYPE_UNSPECIFIED' AVERAGE = 'AVERAGE' COUNT = 'COUNT' MAX = 'MAX' MEDIAN = 'MEDIAN' MIN = 'MIN' SUM = 'SUM' class Type2(Enum): CHART_DATE_TIME_RULE_TYPE_UNSPECIFIED = 'CHART_DATE_TIME_RULE_TYPE_UNSPECIFIED' SECOND = 'SECOND' MINUTE = 'MINUTE' HOUR = 'HOUR' HOUR_MINUTE = 'HOUR_MINUTE' HOUR_MINUTE_AMPM = 'HOUR_MINUTE_AMPM' DAY_OF_WEEK = 'DAY_OF_WEEK' DAY_OF_YEAR = 'DAY_OF_YEAR' DAY_OF_MONTH = 'DAY_OF_MONTH' DAY_MONTH = 'DAY_MONTH' MONTH = 'MONTH' QUARTER = 'QUARTER' YEAR = 'YEAR' YEAR_MONTH = 'YEAR_MONTH' YEAR_QUARTER = 'YEAR_QUARTER' YEAR_MONTH_DAY = 'YEAR_MONTH_DAY' class ChartDateTimeRule(BaseModel): type: Optional[Type2] = Field( None, description='The type of date-time grouping to apply.' ) class ChartHistogramRule(BaseModel): intervalSize: Optional[float] = Field( None, description='The size of the buckets that are created. Must be positive.' ) maxValue: Optional[float] = Field( None, description='The maximum value at which items are placed into buckets. Values greater than the maximum are grouped into a single bucket. If omitted, it is determined by the maximum item value.', ) minValue: Optional[float] = Field( None, description='The minimum value at which items are placed into buckets. Values that are less than the minimum are grouped into a single bucket. If omitted, it is determined by the minimum item value.', ) class HiddenDimensionStrategy(Enum): CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED = ( 'CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED' ) SKIP_HIDDEN_ROWS_AND_COLUMNS = 'SKIP_HIDDEN_ROWS_AND_COLUMNS' SKIP_HIDDEN_ROWS = 'SKIP_HIDDEN_ROWS' SKIP_HIDDEN_COLUMNS = 'SKIP_HIDDEN_COLUMNS' SHOW_ALL = 'SHOW_ALL' class ClearBasicFilterRequest(BaseModel): sheetId: Optional[int] = Field( None, description='The sheet ID on which the basic filter should be cleared.' ) class ClearValuesRequest(BaseModel): pass class ClearValuesResponse(BaseModel): clearedRange: Optional[str] = Field( None, description="The range (in A1 notation) that was cleared. (If the request was for an unbounded range or a ranger larger than the bounds of the sheet, this will be the actual range that was cleared, bounded to the sheet's limits.)", ) spreadsheetId: Optional[str] = Field( None, description='The spreadsheet the updates were applied to.' ) class Color(BaseModel): alpha: Optional[float] = Field( None, description='The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).', ) blue: Optional[float] = Field( None, description='The amount of blue in the color as a value in the interval [0, 1].', ) green: Optional[float] = Field( None, description='The amount of green in the color as a value in the interval [0, 1].', ) red: Optional[float] = Field( None, description='The amount of red in the color as a value in the interval [0, 1].', ) class ThemeColor(Enum): THEME_COLOR_TYPE_UNSPECIFIED = 'THEME_COLOR_TYPE_UNSPECIFIED' TEXT = 'TEXT' BACKGROUND = 'BACKGROUND' ACCENT1 = 'ACCENT1' ACCENT2 = 'ACCENT2' ACCENT3 = 'ACCENT3' ACCENT4 = 'ACCENT4' ACCENT5 = 'ACCENT5' ACCENT6 = 'ACCENT6' LINK = 'LINK' class ColorStyle(BaseModel): rgbColor: Optional[Color] = Field( None, description="RGB color. The [`alpha`](/sheets/api/reference/rest/v4/spreadsheets/other#Color.FIELDS.alpha) value in the [`Color`](/sheets/api/reference/rest/v4/spreadsheets/other#color) object isn't generally supported.", ) themeColor: Optional[ThemeColor] = Field(None, description='Theme color.') class RelativeDate(Enum): RELATIVE_DATE_UNSPECIFIED = 'RELATIVE_DATE_UNSPECIFIED' PAST_YEAR = 'PAST_YEAR' PAST_MONTH = 'PAST_MONTH' PAST_WEEK = 'PAST_WEEK' YESTERDAY = 'YESTERDAY' TODAY = 'TODAY' TOMORROW = 'TOMORROW' class ConditionValue(BaseModel): relativeDate: Optional[RelativeDate] = Field( None, description='A relative date (based on the current date). Valid only if the type is DATE_BEFORE, DATE_AFTER, DATE_ON_OR_BEFORE or DATE_ON_OR_AFTER. Relative dates are not supported in data validation. They are supported only in conditional formatting and conditional filters.', ) userEnteredValue: Optional[str] = Field( None, description="A value the condition is based on. The value is parsed as if the user typed into a cell. Formulas are supported (and must begin with an `=` or a '+').", ) class PasteOrientation(Enum): NORMAL = 'NORMAL' TRANSPOSE = 'TRANSPOSE' class PasteType(Enum): PASTE_NORMAL = 'PASTE_NORMAL' PASTE_VALUES = 'PASTE_VALUES' PASTE_FORMAT = 'PASTE_FORMAT' PASTE_NO_BORDERS = 'PASTE_NO_BORDERS' PASTE_FORMULA = 'PASTE_FORMULA' PASTE_DATA_VALIDATION = 'PASTE_DATA_VALIDATION' PASTE_CONDITIONAL_FORMATTING = 'PASTE_CONDITIONAL_FORMATTING' class CopySheetToAnotherSpreadsheetRequest(BaseModel): destinationSpreadsheetId: Optional[str] = Field( None, description='The ID of the spreadsheet to copy the sheet to.' ) class ErrorCode(Enum): DATA_EXECUTION_ERROR_CODE_UNSPECIFIED = 'DATA_EXECUTION_ERROR_CODE_UNSPECIFIED' TIMED_OUT = 'TIMED_OUT' TOO_MANY_ROWS = 'TOO_MANY_ROWS' TOO_MANY_COLUMNS = 'TOO_MANY_COLUMNS' TOO_MANY_CELLS = 'TOO_MANY_CELLS' ENGINE = 'ENGINE' PARAMETER_INVALID = 'PARAMETER_INVALID' UNSUPPORTED_DATA_TYPE = 'UNSUPPORTED_DATA_TYPE' DUPLICATE_COLUMN_NAMES = 'DUPLICATE_COLUMN_NAMES' INTERRUPTED = 'INTERRUPTED' CONCURRENT_QUERY = 'CONCURRENT_QUERY' OTHER = 'OTHER' TOO_MANY_CHARS_PER_CELL = 'TOO_MANY_CHARS_PER_CELL' DATA_NOT_FOUND = 'DATA_NOT_FOUND' PERMISSION_DENIED = 'PERMISSION_DENIED' MISSING_COLUMN_ALIAS = 'MISSING_COLUMN_ALIAS' OBJECT_NOT_FOUND = 'OBJECT_NOT_FOUND' OBJECT_IN_ERROR_STATE = 'OBJECT_IN_ERROR_STATE' OBJECT_SPEC_INVALID = 'OBJECT_SPEC_INVALID' class State(Enum): DATA_EXECUTION_STATE_UNSPECIFIED = 'DATA_EXECUTION_STATE_UNSPECIFIED' NOT_STARTED = 'NOT_STARTED' RUNNING = 'RUNNING' SUCCEEDED = 'SUCCEEDED' FAILED = 'FAILED' class DataExecutionStatus(BaseModel): errorCode: Optional[ErrorCode] = Field(None, description='The error code.') errorMessage: Optional[str] = Field( None, description='The error message, which may be empty.' ) lastRefreshTime: Optional[str] = Field( None, description='Gets the time the data last successfully refreshed.' ) state: Optional[State] = Field(None, description='The state of the data execution.') class Placement(Enum): DATA_LABEL_PLACEMENT_UNSPECIFIED = 'DATA_LABEL_PLACEMENT_UNSPECIFIED' CENTER = 'CENTER' LEFT = 'LEFT' RIGHT = 'RIGHT' ABOVE = 'ABOVE' BELOW = 'BELOW' INSIDE_END = 'INSIDE_END' INSIDE_BASE = 'INSIDE_BASE' OUTSIDE_END = 'OUTSIDE_END' class Type3(Enum): DATA_LABEL_TYPE_UNSPECIFIED = 'DATA_LABEL_TYPE_UNSPECIFIED' NONE = 'NONE' DATA = 'DATA' CUSTOM = 'CUSTOM' class DataSourceChartProperties(BaseModel): dataExecutionStatus: Optional[DataExecutionStatus] = Field( None, description='Output only. The data execution status.' ) dataSourceId: Optional[str] = Field( None, description='ID of the data source that the chart is associated with.' ) class DataSourceColumnReference(BaseModel): name: Optional[str] = Field( None, description='The display name of the column. It should be unique within a data source.', ) class DataSourceFormula(BaseModel): dataExecutionStatus: Optional[DataExecutionStatus] = Field( None, description='Output only. The data execution status.' ) dataSourceId: Optional[str] = Field( None, description='The ID of the data source the formula is associated with.' ) class RefreshScope(Enum): DATA_SOURCE_REFRESH_SCOPE_UNSPECIFIED = 'DATA_SOURCE_REFRESH_SCOPE_UNSPECIFIED' ALL_DATA_SOURCES = 'ALL_DATA_SOURCES' class DaysOfWeekEnum(Enum): DAY_OF_WEEK_UNSPECIFIED = 'DAY_OF_WEEK_UNSPECIFIED' MONDAY = 'MONDAY' TUESDAY = 'TUESDAY' WEDNESDAY = 'WEDNESDAY' THURSDAY = 'THURSDAY' FRIDAY = 'FRIDAY' SATURDAY = 'SATURDAY' SUNDAY = 'SUNDAY' class DataSourceSheetDimensionRange(BaseModel): columnReferences: Optional[List[DataSourceColumnReference]] = Field( None, description='The columns on the data source sheet.' ) sheetId: Optional[int] = Field( None, description='The ID of the data source sheet the range is on.' ) class ColumnSelectionType(Enum): DATA_SOURCE_TABLE_COLUMN_SELECTION_TYPE_UNSPECIFIED = ( 'DATA_SOURCE_TABLE_COLUMN_SELECTION_TYPE_UNSPECIFIED' ) SELECTED = 'SELECTED' SYNC_ALL = 'SYNC_ALL' class Type4(Enum): DATE_TIME_RULE_TYPE_UNSPECIFIED = 'DATE_TIME_RULE_TYPE_UNSPECIFIED' SECOND = 'SECOND' MINUTE = 'MINUTE' HOUR = 'HOUR' HOUR_MINUTE = 'HOUR_MINUTE' HOUR_MINUTE_AMPM = 'HOUR_MINUTE_AMPM' DAY_OF_WEEK = 'DAY_OF_WEEK' DAY_OF_YEAR = 'DAY_OF_YEAR' DAY_OF_MONTH = 'DAY_OF_MONTH' DAY_MONTH = 'DAY_MONTH' MONTH = 'MONTH' QUARTER = 'QUARTER' YEAR = 'YEAR' YEAR_MONTH = 'YEAR_MONTH' YEAR_QUARTER = 'YEAR_QUARTER' YEAR_MONTH_DAY = 'YEAR_MONTH_DAY' class DateTimeRule(BaseModel): type: Optional[Type4] = Field( None, description='The type of date-time grouping to apply.' ) class DeleteBandingRequest(BaseModel): bandedRangeId: Optional[int] = Field( None, description='The ID of the banded range to delete.' ) class DeleteConditionalFormatRuleRequest(BaseModel): index: Optional[int] = Field( None, description='The zero-based index of the rule to be deleted.' ) sheetId: Optional[int] = Field( None, description='The sheet the rule is being deleted from.' ) class DeleteDataSourceRequest(BaseModel): dataSourceId: Optional[str] = Field( None, description='The ID of the data source to delete.' ) class DeleteDuplicatesResponse(BaseModel): duplicatesRemovedCount: Optional[int] = Field( None, description='The number of duplicate rows removed.' ) class DeleteEmbeddedObjectRequest(BaseModel): objectId: Optional[int] = Field( None, description='The ID of the embedded object to delete.' ) class DeleteFilterViewRequest(BaseModel): filterId: Optional[int] = Field(None, description='The ID of the filter to delete.') class DeleteNamedRangeRequest(BaseModel): namedRangeId: Optional[str] = Field( None, description='The ID of the named range to delete.' ) class DeleteProtectedRangeRequest(BaseModel): protectedRangeId: Optional[int] = Field( None, description='The ID of the protected range to delete.' ) class ShiftDimension(Enum): DIMENSION_UNSPECIFIED = 'DIMENSION_UNSPECIFIED' ROWS = 'ROWS' COLUMNS = 'COLUMNS' class DeleteSheetRequest(BaseModel): sheetId: Optional[int] = Field( None, description='The ID of the sheet to delete. If the sheet is of DATA_SOURCE type, the associated DataSource is also deleted.', ) class Visibility(Enum): DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED = ( 'DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED' ) DOCUMENT = 'DOCUMENT' PROJECT = 'PROJECT' class LocationType(Enum): DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED = ( 'DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED' ) ROW = 'ROW' COLUMN = 'COLUMN' SHEET = 'SHEET' SPREADSHEET = 'SPREADSHEET' class LocationMatchingStrategy(Enum): DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED = ( 'DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED' ) EXACT_LOCATION = 'EXACT_LOCATION' INTERSECTING_LOCATION = 'INTERSECTING_LOCATION' class DimensionRange(BaseModel): dimension: Optional[Dimension] = Field( None, description='The dimension of the span.' ) endIndex: Optional[int] = Field( None, description='The end (exclusive) of the span, or not set if unbounded.' ) sheetId: Optional[int] = Field(None, description='The sheet this span is on.') startIndex: Optional[int] = Field( None, description='The start (inclusive) of the span, or not set if unbounded.' ) class DuplicateFilterViewRequest(BaseModel): filterId: Optional[int] = Field( None, description='The ID of the filter being duplicated.' ) class DuplicateSheetRequest(BaseModel): insertSheetIndex: Optional[int] = Field( None, description='The zero-based index where the new sheet should be inserted. The index of all sheets after this are incremented.', ) newSheetId: Optional[int] = Field( None, description='If set, the ID of the new sheet. If not set, an ID is chosen. If set, the ID must not conflict with any existing sheet ID. If set, it must be non-negative.', ) newSheetName: Optional[str] = Field( None, description='The name of the new sheet. If empty, a new name is chosen for you.', ) sourceSheetId: Optional[int] = Field( None, description='The sheet to duplicate. If the source sheet is of DATA_SOURCE type, its backing DataSource is also duplicated and associated with the new copy of the sheet. No data execution is triggered, the grid data of this sheet is also copied over but only available after the batch request completes.', ) class Editors(BaseModel): domainUsersCanEdit: Optional[bool] = Field( None, description="True if anyone in the document's domain has edit access to the protected range. Domain protection is only supported on documents within a domain.", ) groups: Optional[List[str]] = Field( None, description='The email addresses of groups with edit access to the protected range.', ) users: Optional[List[str]] = Field( None, description='The email addresses of users with edit access to the protected range.', ) class EmbeddedObjectBorder(BaseModel): color: Optional[Color] = Field( None, description='The color of the border. Deprecated: Use color_style.' ) colorStyle: Optional[ColorStyle] = Field( None, description='The color of the border. If color is also set, this field takes precedence.', ) class Type5(Enum): ERROR_TYPE_UNSPECIFIED = 'ERROR_TYPE_UNSPECIFIED' ERROR = 'ERROR' NULL_VALUE = 'NULL_VALUE' DIVIDE_BY_ZERO = 'DIVIDE_BY_ZERO' VALUE = 'VALUE' REF = 'REF' NAME = 'NAME' NUM = 'NUM' N_A = 'N_A' LOADING = 'LOADING' class ErrorValue(BaseModel): message: Optional[str] = Field( None, description="A message with more information about the error (in the spreadsheet's locale).", ) type: Optional[Type5] = Field(None, description='The type of error.') class ExtendedValue(BaseModel): boolValue: Optional[bool] = Field(None, description='Represents a boolean value.') errorValue: Optional[ErrorValue] = Field( None, description='Represents an error. This field is read-only.' ) formulaValue: Optional[str] = Field(None, description='Represents a formula.') numberValue: Optional[float] = Field( None, description='Represents a double value. Note: Dates, Times and DateTimes are represented as doubles in SERIAL_NUMBER format.', ) stringValue: Optional[str] = Field( None, description='Represents a string value. Leading single quotes are not included. For example, if the user typed `\'123` into the UI, this would be represented as a `stringValue` of `"123"`.', ) class FindReplaceResponse(BaseModel): formulasChanged: Optional[int] = Field( None, description='The number of formula cells changed.' ) occurrencesChanged: Optional[int] = Field( None, description='The number of occurrences (possibly multiple within a cell) changed. For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`.', ) rowsChanged: Optional[int] = Field(None, description='The number of rows changed.') sheetsChanged: Optional[int] = Field( None, description='The number of sheets changed.' ) valuesChanged: Optional[int] = Field( None, description='The number of non-formula cells changed.' ) class GridCoordinate(BaseModel): columnIndex: Optional[int] = Field( None, description='The column index of the coordinate.' ) rowIndex: Optional[int] = Field( None, description='The row index of the coordinate.' ) sheetId: Optional[int] = Field(None, description='The sheet this coordinate is on.') class GridProperties(BaseModel): columnCount: Optional[int] = Field( None, description='The number of columns in the grid.' ) columnGroupControlAfter: Optional[bool] = Field( None, description='True if the column grouping control toggle is shown after the group.', ) frozenColumnCount: Optional[int] = Field( None, description='The number of columns that are frozen in the grid.' ) frozenRowCount: Optional[int] = Field( None, description='The number of rows that are frozen in the grid.' ) hideGridlines: Optional[bool] = Field( None, description="True if the grid isn't showing gridlines in the UI." ) rowCount: Optional[int] = Field(None, description='The number of rows in the grid.') rowGroupControlAfter: Optional[bool] = Field( None, description='True if the row grouping control toggle is shown after the group.', ) class GridRange(BaseModel): endColumnIndex: Optional[int] = Field( None, description='The end column (exclusive) of the range, or not set if unbounded.', ) endRowIndex: Optional[int] = Field( None, description='The end row (exclusive) of the range, or not set if unbounded.', ) sheetId: Optional[int] = Field(None, description='The sheet this range is on.') startColumnIndex: Optional[int] = Field( None, description='The start column (inclusive) of the range, or not set if unbounded.', ) startRowIndex: Optional[int] = Field( None, description='The start row (inclusive) of the range, or not set if unbounded.', ) class LegendPosition2(Enum): HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED = ( 'HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED' ) BOTTOM_LEGEND = 'BOTTOM_LEGEND' LEFT_LEGEND = 'LEFT_LEGEND' RIGHT_LEGEND = 'RIGHT_LEGEND' TOP_LEGEND = 'TOP_LEGEND' NO_LEGEND = 'NO_LEGEND' INSIDE_LEGEND = 'INSIDE_LEGEND' class HistogramRule(BaseModel): end: Optional[float] = Field( None, description='The maximum value at which items are placed into buckets of constant size. Values above end are lumped into a single bucket. This field is optional.', ) interval: Optional[float] = Field( None, description='The size of the buckets that are created. Must be positive.' ) start: Optional[float] = Field( None, description='The minimum value at which items are placed into buckets of constant size. Values below start are lumped into a single bucket. This field is optional.', ) class InsertDimensionRequest(BaseModel): inheritFromBefore: Optional[bool] = Field( None, description='Whether dimension properties should be extended from the dimensions before or after the newly inserted dimensions. True to inherit from the dimensions before (in which case the start index must be greater than 0), and false to inherit from the dimensions after. For example, if row index 0 has red background and row index 1 has a green background, then inserting 2 rows at index 1 can inherit either the green or red background. If `inheritFromBefore` is true, the two new rows will be red (because the row before the insertion point was red), whereas if `inheritFromBefore` is false, the two new rows will be green (because the row after the insertion point was green).', ) range: Optional[DimensionRange] = Field( None, description='The dimensions to insert. Both the start and end indexes must be bounded.', ) class InsertRangeRequest(BaseModel): range: Optional[GridRange] = Field( None, description='The range to insert new cells into.' ) shiftDimension: Optional[ShiftDimension] = Field( None, description='The dimension which will be shifted when inserting cells. If ROWS, existing cells will be shifted down. If COLUMNS, existing cells will be shifted right.', ) class Type6(Enum): INTERPOLATION_POINT_TYPE_UNSPECIFIED = 'INTERPOLATION_POINT_TYPE_UNSPECIFIED' MIN = 'MIN' MAX = 'MAX' NUMBER = 'NUMBER' PERCENT = 'PERCENT' PERCENTILE = 'PERCENTILE' class InterpolationPoint(BaseModel): color: Optional[Color] = Field( None, description='The color this interpolation point should use. Deprecated: Use color_style.', ) colorStyle: Optional[ColorStyle] = Field( None, description='The color this interpolation point should use. If color is also set, this field takes precedence.', ) type: Optional[Type6] = Field( None, description='How the value should be interpreted.' ) value: Optional[str] = Field( None, description='The value this interpolation point uses. May be a formula. Unused if type is MIN or MAX.', ) class Interval(BaseModel): endTime: Optional[str] = Field( None, description='Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.', ) startTime: Optional[str] = Field( None, description='Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.', ) class IterativeCalculationSettings(BaseModel): convergenceThreshold: Optional[float] = Field( None, description='When iterative calculation is enabled and successive results differ by less than this threshold value, the calculation rounds stop.', ) maxIterations: Optional[int] = Field( None, description='When iterative calculation is enabled, the maximum number of calculation rounds to perform.', ) class Type7(Enum): LINE_DASH_TYPE_UNSPECIFIED = 'LINE_DASH_TYPE_UNSPECIFIED' INVISIBLE = 'INVISIBLE' CUSTOM = 'CUSTOM' SOLID = 'SOLID' DOTTED = 'DOTTED' MEDIUM_DASHED = 'MEDIUM_DASHED' MEDIUM_DASHED_DOTTED = 'MEDIUM_DASHED_DOTTED' LONG_DASHED = 'LONG_DASHED' LONG_DASHED_DOTTED = 'LONG_DASHED_DOTTED' class LineStyle(BaseModel): type: Optional[Type7] = Field(None, description='The dash type of the line.') width: Optional[int] = Field(None, description='The thickness of the line, in px.') class Link(BaseModel): uri: Optional[str] = Field(None, description='The link identifier.') class ManualRuleGroup(BaseModel): groupName: Optional[ExtendedValue] = Field( None, description='The group name, which must be a string. Each group in a given ManualRule must have a unique group name.', ) items: Optional[List[ExtendedValue]] = Field( None, description='The items in the source data that should be placed into this group. Each item may be a string, number, or boolean. Items may appear in at most one group within a given ManualRule. Items that do not appear in any group will appear on their own.', ) class MergeType(Enum): MERGE_ALL = 'MERGE_ALL' MERGE_COLUMNS = 'MERGE_COLUMNS' MERGE_ROWS = 'MERGE_ROWS' class MergeCellsRequest(BaseModel): mergeType: Optional[MergeType] = Field( None, description='How the cells should be merged.' ) range: Optional[GridRange] = Field(None, description='The range of cells to merge.') class MoveDimensionRequest(BaseModel): destinationIndex: Optional[int] = Field( None, description='The zero-based start index of where to move the source data to, based on the coordinates *before* the source data is removed from the grid. Existing data will be shifted down or right (depending on the dimension) to make room for the moved dimensions. The source dimensions are removed from the grid, so the the data may end up in a different index than specified. For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move `"1"` and `"2"` to between `"3"` and `"4"`, the source would be `ROWS [1..3)`,and the destination index would be `"4"` (the zero-based index of row 5). The end result would be `A1..A5` of `0, 3, 1, 2, 4`.', ) source: Optional[DimensionRange] = Field( None, description='The source dimensions to move.' ) class NamedRange(BaseModel): name: Optional[str] = Field(None, description='The name of the named range.') namedRangeId: Optional[str] = Field(None, description='The ID of the named range.') range: Optional[GridRange] = Field(None, description='The range this represents.') class Type8(Enum): NUMBER_FORMAT_TYPE_UNSPECIFIED = 'NUMBER_FORMAT_TYPE_UNSPECIFIED' TEXT = 'TEXT' NUMBER = 'NUMBER' PERCENT = 'PERCENT' CURRENCY = 'CURRENCY' DATE = 'DATE' TIME = 'TIME' DATE_TIME = 'DATE_TIME' SCIENTIFIC = 'SCIENTIFIC' class NumberFormat(BaseModel): pattern: Optional[str] = Field( None, description="Pattern string used for formatting. If not set, a default pattern based on the user's locale will be used if necessary for the given type. See the [Date and Number Formats guide](/sheets/api/guides/formats) for more information about the supported patterns.", ) type: Optional[Type8] = Field( None, description='The type of the number format. When writing, this field must be set.', ) class NodeSize(Enum): ORG_CHART_LABEL_SIZE_UNSPECIFIED = 'ORG_CHART_LABEL_SIZE_UNSPECIFIED' SMALL = 'SMALL' MEDIUM = 'MEDIUM' LARGE = 'LARGE' class OverlayPosition(BaseModel): anchorCell: Optional[GridCoordinate] = Field( None, description='The cell the object is anchored to.' ) heightPixels: Optional[int] = Field( None, description='The height of the object, in pixels. Defaults to 371.' ) offsetXPixels: Optional[int] = Field( None, description='The horizontal offset, in pixels, that the object is offset from the anchor cell.', ) offsetYPixels: Optional[int] = Field( None, description='The vertical offset, in pixels, that the object is offset from the anchor cell.', ) widthPixels: Optional[int] = Field( None, description='The width of the object, in pixels. Defaults to 600.' ) class Padding(BaseModel): bottom: Optional[int] = Field(None, description='The bottom padding of the cell.') left: Optional[int] = Field(None, description='The left padding of the cell.') right: Optional[int] = Field(None, description='The right padding of the cell.') top: Optional[int] = Field(None, description='The top padding of the cell.') class Type9(Enum): PASTE_NORMAL = 'PASTE_NORMAL' PASTE_VALUES = 'PASTE_VALUES' PASTE_FORMAT = 'PASTE_FORMAT' PASTE_NO_BORDERS = 'PASTE_NO_BORDERS' PASTE_FORMULA = 'PASTE_FORMULA' PASTE_DATA_VALIDATION = 'PASTE_DATA_VALIDATION' PASTE_CONDITIONAL_FORMATTING = 'PASTE_CONDITIONAL_FORMATTING' class PasteDataRequest(BaseModel): coordinate: Optional[GridCoordinate] = Field( None, description='The coordinate at which the data should start being inserted.', ) data: Optional[str] = Field(None, description='The data to insert.') delimiter: Optional[str] = Field(None, description='The delimiter in the data.') html: Optional[bool] = Field(None, description='True if the data is HTML.') type: Optional[Type9] = Field(None, description='How the data should be pasted.') class LegendPosition3(Enum): PIE_CHART_LEGEND_POSITION_UNSPECIFIED = 'PIE_CHART_LEGEND_POSITION_UNSPECIFIED' BOTTOM_LEGEND = 'BOTTOM_LEGEND' LEFT_LEGEND = 'LEFT_LEGEND' RIGHT_LEGEND = 'RIGHT_LEGEND' TOP_LEGEND = 'TOP_LEGEND' NO_LEGEND = 'NO_LEGEND' LABELED_LEGEND = 'LABELED_LEGEND' class SortOrder(Enum): SORT_ORDER_UNSPECIFIED = 'SORT_ORDER_UNSPECIFIED' ASCENDING = 'ASCENDING' DESCENDING = 'DESCENDING' class PivotGroupLimit(BaseModel): applyOrder: Optional[int] = Field( None, description='The order in which the group limit is applied to the pivot table. Pivot group limits are applied from lower to higher order number. Order numbers are normalized to consecutive integers from 0. For write request, to fully customize the applying orders, all pivot group limits should have this field set with an unique number. Otherwise, the order is determined by the index in the PivotTable.rows list and then the PivotTable.columns list.', ) countLimit: Optional[int] = Field(None, description='The count limit.') class PivotGroupSortValueBucket(BaseModel): buckets: Optional[List[ExtendedValue]] = Field( None, description='Determines the bucket from which values are chosen to sort. For example, in a pivot table with one row group & two column groups, the row group can list up to two values. The first value corresponds to a value within the first column group, and the second value corresponds to a value in the second column group. If no values are listed, this would indicate that the row should be sorted according to the "Grand Total" over the column groups. If a single value is listed, this would correspond to using the "Total" of that bucket.', ) valuesIndex: Optional[int] = Field( None, description='The offset in the PivotTable.values list which the values in this grouping should be sorted by.', ) class PivotGroupValueMetadata(BaseModel): collapsed: Optional[bool] = Field( None, description='True if the data corresponding to the value is collapsed.' ) value: Optional[ExtendedValue] = Field( None, description='The calculated value the metadata corresponds to. (Note that formulaValue is not valid, because the values will be calculated.)', ) class ValueLayout(Enum): HORIZONTAL = 'HORIZONTAL' VERTICAL = 'VERTICAL' class CalculatedDisplayType(Enum): PIVOT_VALUE_CALCULATED_DISPLAY_TYPE_UNSPECIFIED = ( 'PIVOT_VALUE_CALCULATED_DISPLAY_TYPE_UNSPECIFIED' ) PERCENT_OF_ROW_TOTAL = 'PERCENT_OF_ROW_TOTAL' PERCENT_OF_COLUMN_TOTAL = 'PERCENT_OF_COLUMN_TOTAL' PERCENT_OF_GRAND_TOTAL = 'PERCENT_OF_GRAND_TOTAL' class SummarizeFunction(Enum): PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED = ( 'PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED' ) SUM = 'SUM' COUNTA = 'COUNTA' COUNT = 'COUNT' COUNTUNIQUE = 'COUNTUNIQUE' AVERAGE = 'AVERAGE' MAX = 'MAX' MIN = 'MIN' MEDIAN = 'MEDIAN' PRODUCT = 'PRODUCT' STDEV = 'STDEV' STDEVP = 'STDEVP' VAR = 'VAR' VARP = 'VARP' CUSTOM = 'CUSTOM' class PivotValue(BaseModel): calculatedDisplayType: Optional[CalculatedDisplayType] = Field( None, description='If specified, indicates that pivot values should be displayed as the result of a calculation with another pivot value. For example, if calculated_display_type is specified as PERCENT_OF_GRAND_TOTAL, all the pivot values are displayed as the percentage of the grand total. In the Sheets editor, this is referred to as "Show As" in the value section of a pivot table.', ) dataSourceColumnReference: Optional[DataSourceColumnReference] = Field( None, description='The reference to the data source column that this value reads from.', ) formula: Optional[str] = Field( None, description='A custom formula to calculate the value. The formula must start with an `=` character.', ) name: Optional[str] = Field(None, description='A name to use for the value.') sourceColumnOffset: Optional[int] = Field( None, description='The column offset of the source range that this value reads from. For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` means this value refers to column `C`, whereas the offset `1` would refer to column `D`.', ) summarizeFunction: Optional[SummarizeFunction] = Field( None, description='A function to summarize the value. If formula is set, the only supported values are SUM and CUSTOM. If sourceColumnOffset is set, then `CUSTOM` is not supported.', ) class Shape(Enum): POINT_SHAPE_UNSPECIFIED = 'POINT_SHAPE_UNSPECIFIED' CIRCLE = 'CIRCLE' DIAMOND = 'DIAMOND' HEXAGON = 'HEXAGON' PENTAGON = 'PENTAGON' SQUARE = 'SQUARE' STAR = 'STAR' TRIANGLE = 'TRIANGLE' X_MARK = 'X_MARK' class PointStyle(BaseModel): shape: Optional[Shape] = Field( None, description='The point shape. If empty or unspecified, a default shape is used.', ) size: Optional[float] = Field( None, description='The point size. If empty, a default size is used.' ) class ProtectedRange(BaseModel): description: Optional[str] = Field( None, description='The description of this protected range.' ) editors: Optional[Editors] = Field( None, description='The users and groups with edit access to the protected range. This field is only visible to users with edit access to the protected range and the document. Editors are not supported with warning_only protection.', ) namedRangeId: Optional[str] = Field( None, description='The named range this protected range is backed by, if any. When writing, only one of range or named_range_id may be set.', ) protectedRangeId: Optional[int] = Field( None, description='The ID of the protected range. This field is read-only.' ) range: Optional[GridRange] = Field( None, description='The range that is being protected. The range may be fully unbounded, in which case this is considered a protected sheet. When writing, only one of range or named_range_id may be set.', ) requestingUserCanEdit: Optional[bool] = Field( None, description='True if the user who requested this protected range can edit the protected area. This field is read-only.', ) unprotectedRanges: Optional[List[GridRange]] = Field( None, description='The list of unprotected ranges within a protected sheet. Unprotected ranges are only supported on protected sheets.', ) warningOnly: Optional[bool] = Field( None, description='True if this protected range will show a warning when editing. Warning-based protection means that every user can edit data in the protected range, except editing will prompt a warning asking the user to confirm the edit. When writing: if this field is true, then editors is ignored. Additionally, if this field is changed from true to false and the `editors` field is not set (nor included in the field mask), then the editors will be set to all the editors in the document.', ) class RandomizeRangeRequest(BaseModel): range: Optional[GridRange] = Field(None, description='The range to randomize.') class NumberFormatSource(Enum): CHART_NUMBER_FORMAT_SOURCE_UNDEFINED = 'CHART_NUMBER_FORMAT_SOURCE_UNDEFINED' FROM_DATA = 'FROM_DATA' CUSTOM = 'CUSTOM' class SheetType(Enum): SHEET_TYPE_UNSPECIFIED = 'SHEET_TYPE_UNSPECIFIED' GRID = 'GRID' OBJECT = 'OBJECT' DATA_SOURCE = 'DATA_SOURCE' class SortSpec(BaseModel): backgroundColor: Optional[Color] = Field( None, description='The background fill color to sort by; cells with this fill color are sorted to the top. Mutually exclusive with foreground_color. Deprecated: Use background_color_style.', ) backgroundColorStyle: Optional[ColorStyle] = Field( None, description='The background fill color to sort by; cells with this fill color are sorted to the top. Mutually exclusive with foreground_color, and must be an RGB-type color. If background_color is also set, this field takes precedence.', ) dataSourceColumnReference: Optional[DataSourceColumnReference] = Field( None, description='Reference to a data source column.' ) dimensionIndex: Optional[int] = Field( None, description='The dimension the sort should be applied to.' ) foregroundColor: Optional[Color] = Field( None, description='The foreground color to sort by; cells with this foreground color are sorted to the top. Mutually exclusive with background_color. Deprecated: Use foreground_color_style.', ) foregroundColorStyle: Optional[ColorStyle] = Field( None, description='The foreground color to sort by; cells with this foreground color are sorted to the top. Mutually exclusive with background_color, and must be an RGB-type color. If foreground_color is also set, this field takes precedence.', ) sortOrder: Optional[SortOrder] = Field( None, description='The order data should be sorted.' ) class SourceAndDestination(BaseModel): dimension: Optional[Dimension] = Field( None, description='The dimension that data should be filled into.' ) fillLength: Optional[int] = Field( None, description='The number of rows or columns that data should be filled into. Positive numbers expand beyond the last row or last column of the source. Negative numbers expand before the first row or first column of the source.', ) source: Optional[GridRange] = Field( None, description='The location of the data to use as the source of the autofill.', ) class AutoRecalc(Enum): RECALCULATION_INTERVAL_UNSPECIFIED = 'RECALCULATION_INTERVAL_UNSPECIFIED' ON_CHANGE = 'ON_CHANGE' MINUTE = 'MINUTE' HOUR = 'HOUR' class TextFormat(BaseModel): bold: Optional[bool] = Field(None, description='True if the text is bold.') fontFamily: Optional[str] = Field(None, description='The font family.') fontSize: Optional[int] = Field(None, description='The size of the font.') foregroundColor: Optional[Color] = Field( None, description='The foreground color of the text. Deprecated: Use foreground_color_style.', ) foregroundColorStyle: Optional[ColorStyle] = Field( None, description='The foreground color of the text. If foreground_color is also set, this field takes precedence.', ) italic: Optional[bool] = Field(None, description='True if the text is italicized.') link: Optional[Link] = Field( None, description="The link destination of the text, if any. Setting the link field in a TextFormatRun will clear the cell's existing links or a cell-level link set in the same request. When a link is set, the text foreground color will be set to the default link color and the text will be underlined. If these fields are modified in the same request, those values will be used instead of the link defaults.", ) strikethrough: Optional[bool] = Field( None, description='True if the text has a strikethrough.' ) underline: Optional[bool] = Field( None, description='True if the text is underlined.' ) class TextFormatRun(BaseModel): format: Optional[TextFormat] = Field( None, description="The format of this run. Absent values inherit the cell's format.", ) startIndex: Optional[int] = Field( None, description='The character index where this run starts.' ) class TextPosition(BaseModel): horizontalAlignment: Optional[HorizontalAlignment] = Field( None, description='Horizontal alignment setting for the piece of text.' ) class TextRotation(BaseModel): angle: Optional[int] = Field( None, description='The angle between the standard orientation and the desired orientation. Measured in degrees. Valid values are between -90 and 90. Positive angles are angled upwards, negative are angled downwards. Note: For LTR text direction positive angles are in the counterclockwise direction, whereas for RTL they are in the clockwise direction', ) vertical: Optional[bool] = Field( None, description='If true, text reads top to bottom, but the orientation of individual characters is unchanged. For example: | V | | e | | r | | t | | i | | c | | a | | l |', ) class DelimiterType(Enum): DELIMITER_TYPE_UNSPECIFIED = 'DELIMITER_TYPE_UNSPECIFIED' COMMA = 'COMMA' SEMICOLON = 'SEMICOLON' PERIOD = 'PERIOD' SPACE = 'SPACE' CUSTOM = 'CUSTOM' AUTODETECT = 'AUTODETECT' class TextToColumnsRequest(BaseModel): delimiter: Optional[str] = Field( None, description='The delimiter to use. Used only if delimiterType is CUSTOM.' ) delimiterType: Optional[DelimiterType] = Field( None, description='The delimiter type to use.' ) source: Optional[GridRange] = Field( None, description='The source data range. This must span exactly one column.' ) class ColorType(Enum): THEME_COLOR_TYPE_UNSPECIFIED = 'THEME_COLOR_TYPE_UNSPECIFIED' TEXT = 'TEXT' BACKGROUND = 'BACKGROUND' ACCENT1 = 'ACCENT1' ACCENT2 = 'ACCENT2' ACCENT3 = 'ACCENT3' ACCENT4 = 'ACCENT4' ACCENT5 = 'ACCENT5' ACCENT6 = 'ACCENT6' LINK = 'LINK' class ThemeColorPair(BaseModel): color: Optional[ColorStyle] = Field( None, description='The concrete color corresponding to the theme color type.' ) colorType: Optional[ColorType] = Field( None, description='The type of the spreadsheet theme color.' ) class TimeOfDay(BaseModel): hours: Optional[int] = Field( None, description='Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.', ) minutes: Optional[int] = Field( None, description='Minutes of hour of day. Must be from 0 to 59.' ) nanos: Optional[int] = Field( None, description='Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.', ) seconds: Optional[int] = Field( None, description='Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.', ) class TreemapChartColorScale(BaseModel): maxValueColor: Optional[Color] = Field( None, description='The background color for cells with a color value greater than or equal to maxValue. Defaults to #109618 if not specified. Deprecated: Use max_value_color_style.', ) maxValueColorStyle: Optional[ColorStyle] = Field( None, description='The background color for cells with a color value greater than or equal to maxValue. Defaults to #109618 if not specified. If max_value_color is also set, this field takes precedence.', ) midValueColor: Optional[Color] = Field( None, description='The background color for cells with a color value at the midpoint between minValue and maxValue. Defaults to #efe6dc if not specified. Deprecated: Use mid_value_color_style.', ) midValueColorStyle: Optional[ColorStyle] = Field( None, description='The background color for cells with a color value at the midpoint between minValue and maxValue. Defaults to #efe6dc if not specified. If mid_value_color is also set, this field takes precedence.', ) minValueColor: Optional[Color] = Field( None, description='The background color for cells with a color value less than or equal to minValue. Defaults to #dc3912 if not specified. Deprecated: Use min_value_color_style.', ) minValueColorStyle: Optional[ColorStyle] = Field( None, description='The background color for cells with a color value less than or equal to minValue. Defaults to #dc3912 if not specified. If min_value_color is also set, this field takes precedence.', ) noDataColor: Optional[Color] = Field( None, description='The background color for cells that have no color data associated with them. Defaults to #000000 if not specified. Deprecated: Use no_data_color_style.', ) noDataColorStyle: Optional[ColorStyle] = Field( None, description='The background color for cells that have no color data associated with them. Defaults to #000000 if not specified. If no_data_color is also set, this field takes precedence.', ) class TrimWhitespaceRequest(BaseModel): range: Optional[GridRange] = Field( None, description='The range whose cells to trim.' ) class TrimWhitespaceResponse(BaseModel): cellsChangedCount: Optional[int] = Field( None, description='The number of cells that were trimmed of whitespace.' ) class UnmergeCellsRequest(BaseModel): range: Optional[GridRange] = Field( None, description='The range within which all cells should be unmerged. If the range spans multiple merges, all will be unmerged. The range must not partially span any merge.', ) class UpdateEmbeddedObjectBorderRequest(BaseModel): border: Optional[EmbeddedObjectBorder] = Field( None, description='The border that applies to the embedded object.' ) fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `border` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) objectId: Optional[int] = Field( None, description='The ID of the embedded object to update.' ) class UpdateNamedRangeRequest(BaseModel): fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `namedRange` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) namedRange: Optional[NamedRange] = Field( None, description='The named range to update with the new properties.' ) class UpdateProtectedRangeRequest(BaseModel): fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `protectedRange` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) protectedRange: Optional[ProtectedRange] = Field( None, description='The protected range to update with the new properties.' ) class ValueRange(BaseModel): majorDimension: Optional[MajorDimension] = Field( None, description='The major dimension of the values. For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=A1:B2,majorDimension=ROWS` will return `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return `[[1,3],[2,4]]`. For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]` will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS` then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. When writing, if this field is not set, it defaults to ROWS.', ) range: Optional[str] = Field( None, description='The range the values cover, in [A1 notation](/sheets/api/guides/concepts#cell). For output, this range indicates the entire requested range, even though the values will exclude trailing rows and columns. When appending values, this field represents the range to search for a table, after which values will be appended.', ) values: Optional[List[List]] = Field( None, description='The data that was read or to be written. This is an array of arrays, the outer array representing all the data and each inner array representing a major dimension. Each item in the inner array corresponds with one cell. For output, empty trailing rows and columns will not be included. For input, supported value types are: bool, string, and double. Null values will be skipped. To set a cell to an empty value, set the string value to an empty string.', ) class WaterfallChartColumnStyle(BaseModel): color: Optional[Color] = Field( None, description='The color of the column. Deprecated: Use color_style.' ) colorStyle: Optional[ColorStyle] = Field( None, description='The color of the column. If color is also set, this field takes precedence.', ) label: Optional[str] = Field(None, description="The label of the column's legend.") class WaterfallChartCustomSubtotal(BaseModel): dataIsSubtotal: Optional[bool] = Field( None, description='True if the data point at subtotal_index is the subtotal. If false, the subtotal will be computed and appear after the data point.', ) label: Optional[str] = Field(None, description='A label for the subtotal column.') subtotalIndex: Optional[int] = Field( None, description='The 0-based index of a data point within the series. If data_is_subtotal is true, the data point at this index is the subtotal. Otherwise, the subtotal appears after the data point with this index. A series can have multiple subtotals at arbitrary indices, but subtotals do not affect the indices of the data points. For example, if a series has three data points, their indices will always be 0, 1, and 2, regardless of how many subtotals exist on the series or what data points they are associated with.', ) class StackedType1(Enum): WATERFALL_STACKED_TYPE_UNSPECIFIED = 'WATERFALL_STACKED_TYPE_UNSPECIFIED' STACKED = 'STACKED' SEQUENTIAL = 'SEQUENTIAL' class FieldXgafv(Enum): field_1 = '1' field_2 = '2' class Alt(Enum): json = 'json' media = 'media' proto = 'proto' class Ranges(RootModel[List[str]]): root: List[str] class InsertDataOption(Enum): OVERWRITE = 'OVERWRITE' INSERT_ROWS = 'INSERT_ROWS' class AddDimensionGroupRequest(BaseModel): range: Optional[DimensionRange] = Field( None, description='The range over which to create a group.' ) class AddNamedRangeRequest(BaseModel): namedRange: Optional[NamedRange] = Field( None, description='The named range to add. The namedRangeId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.)', ) class AddNamedRangeResponse(BaseModel): namedRange: Optional[NamedRange] = Field( None, description='The named range to add.' ) class AddProtectedRangeRequest(BaseModel): protectedRange: Optional[ProtectedRange] = Field( None, description='The protected range to be added. The protectedRangeId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.)', ) class AddProtectedRangeResponse(BaseModel): protectedRange: Optional[ProtectedRange] = Field( None, description='The newly added protected range.' ) class AutoFillRequest(BaseModel): range: Optional[GridRange] = Field( None, description='The range to autofill. This will examine the range and detect the location that has data and automatically fill that data in to the rest of the range.', ) sourceAndDestination: Optional[SourceAndDestination] = Field( None, description='The source and destination areas to autofill. This explicitly lists the source of the autofill and where to extend that data.', ) useAlternateSeries: Optional[bool] = Field( None, description='True if we should generate data with the "alternate" series. This differs based on the type and amount of source data.', ) class AutoResizeDimensionsRequest(BaseModel): dataSourceSheetDimensions: Optional[DataSourceSheetDimensionRange] = Field( None, description='The dimensions on a data source sheet to automatically resize.', ) dimensions: Optional[DimensionRange] = Field( None, description='The dimensions to automatically resize.' ) class BandingProperties(BaseModel): firstBandColor: Optional[Color] = Field( None, description='The first color that is alternating. (Required) Deprecated: Use first_band_color_style.', ) firstBandColorStyle: Optional[ColorStyle] = Field( None, description='The first color that is alternating. (Required) If first_band_color is also set, this field takes precedence.', ) footerColor: Optional[Color] = Field( None, description='The color of the last row or column. If this field is not set, the last row or column is filled with either first_band_color or second_band_color, depending on the color of the previous row or column. Deprecated: Use footer_color_style.', ) footerColorStyle: Optional[ColorStyle] = Field( None, description='The color of the last row or column. If this field is not set, the last row or column is filled with either first_band_color or second_band_color, depending on the color of the previous row or column. If footer_color is also set, this field takes precedence.', ) headerColor: Optional[Color] = Field( None, description='The color of the first row or column. If this field is set, the first row or column is filled with this color and the colors alternate between first_band_color and second_band_color starting from the second row or column. Otherwise, the first row or column is filled with first_band_color and the colors proceed to alternate as they normally would. Deprecated: Use header_color_style.', ) headerColorStyle: Optional[ColorStyle] = Field( None, description='The color of the first row or column. If this field is set, the first row or column is filled with this color and the colors alternate between first_band_color and second_band_color starting from the second row or column. Otherwise, the first row or column is filled with first_band_color and the colors proceed to alternate as they normally would. If header_color is also set, this field takes precedence.', ) secondBandColor: Optional[Color] = Field( None, description='The second color that is alternating. (Required) Deprecated: Use second_band_color_style.', ) secondBandColorStyle: Optional[ColorStyle] = Field( None, description='The second color that is alternating. (Required) If second_band_color is also set, this field takes precedence.', ) class BaselineValueFormat(BaseModel): comparisonType: Optional[ComparisonType] = Field( None, description='The comparison type of key value with baseline value.' ) description: Optional[str] = Field( None, description='Description which is appended after the baseline value. This field is optional.', ) negativeColor: Optional[Color] = Field( None, description='Color to be used, in case baseline value represents a negative change for key value. This field is optional. Deprecated: Use negative_color_style.', ) negativeColorStyle: Optional[ColorStyle] = Field( None, description='Color to be used, in case baseline value represents a negative change for key value. This field is optional. If negative_color is also set, this field takes precedence.', ) position: Optional[TextPosition] = Field( None, description='Specifies the horizontal text positioning of baseline value. This field is optional. If not specified, default positioning is used.', ) positiveColor: Optional[Color] = Field( None, description='Color to be used, in case baseline value represents a positive change for key value. This field is optional. Deprecated: Use positive_color_style.', ) positiveColorStyle: Optional[ColorStyle] = Field( None, description='Color to be used, in case baseline value represents a positive change for key value. This field is optional. If positive_color is also set, this field takes precedence.', ) textFormat: Optional[TextFormat] = Field( None, description='Text formatting options for baseline value. The link field is not supported.', ) class BasicChartAxis(BaseModel): format: Optional[TextFormat] = Field( None, description='The format of the title. Only valid if the axis is not associated with the domain. The link field is not supported.', ) position: Optional[Position] = Field(None, description='The position of this axis.') title: Optional[str] = Field( None, description='The title of this axis. If set, this overrides any title inferred from headers of the data.', ) titleTextPosition: Optional[TextPosition] = Field( None, description='The axis title text position.' ) viewWindowOptions: Optional[ChartAxisViewWindowOptions] = Field( None, description='The view window options for this axis.' ) class BasicSeriesDataPointStyleOverride(BaseModel): color: Optional[Color] = Field( None, description='Color of the series data point. If empty, the series default is used. Deprecated: Use color_style.', ) colorStyle: Optional[ColorStyle] = Field( None, description='Color of the series data point. If empty, the series default is used. If color is also set, this field takes precedence.', ) index: Optional[int] = Field( None, description='Zero based index of the series data point.' ) pointStyle: Optional[PointStyle] = Field( None, description='Point style of the series data point. Valid only if the chartType is AREA, LINE, or SCATTER. COMBO charts are also supported if the series chart type is AREA, LINE, or SCATTER. If empty, the series default is used.', ) class BatchGetValuesResponse(BaseModel): spreadsheetId: Optional[str] = Field( None, description='The ID of the spreadsheet the data was retrieved from.' ) valueRanges: Optional[List[ValueRange]] = Field( None, description='The requested values. The order of the ValueRanges is the same as the order of the requested ranges.', ) class BatchUpdateValuesRequest(BaseModel): data: Optional[List[ValueRange]] = Field( None, description='The new values to apply to the spreadsheet.' ) includeValuesInResponse: Optional[bool] = Field( None, description='Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. The `updatedData` field within each of the BatchUpdateValuesResponse.responses contains the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).', ) responseDateTimeRenderOption: Optional[ResponseDateTimeRenderOption] = Field( None, description='Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.', ) responseValueRenderOption: Optional[ResponseValueRenderOption] = Field( None, description='Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.', ) valueInputOption: Optional[ValueInputOption] = Field( None, description='How the input data should be interpreted.' ) class BigQueryDataSourceSpec(BaseModel): projectId: Optional[str] = Field( None, description='The ID of a BigQuery enabled GCP project with a billing account attached. For any queries executed against the data source, the project is charged.', ) querySpec: Optional[BigQueryQuerySpec] = Field( None, description='A BigQueryQuerySpec.' ) tableSpec: Optional[BigQueryTableSpec] = Field( None, description='A BigQueryTableSpec.' ) class BooleanCondition(BaseModel): type: Optional[Type1] = Field(None, description='The type of condition.') values: Optional[List[ConditionValue]] = Field( None, description='The values of the condition. The number of supported values depends on the condition type. Some support zero values, others one or two values, and ConditionType.ONE_OF_LIST supports an arbitrary number of values.', ) class Border(BaseModel): color: Optional[Color] = Field( None, description='The color of the border. Deprecated: Use color_style.' ) colorStyle: Optional[ColorStyle] = Field( None, description='The color of the border. If color is also set, this field takes precedence.', ) style: Optional[Style] = Field(None, description='The style of the border.') width: Optional[int] = Field( None, description='The width of the border, in pixels. Deprecated; the width is determined by the "style" field.', ) class Borders(BaseModel): bottom: Optional[Border] = Field(None, description='The bottom border of the cell.') left: Optional[Border] = Field(None, description='The left border of the cell.') right: Optional[Border] = Field(None, description='The right border of the cell.') top: Optional[Border] = Field(None, description='The top border of the cell.') class CellFormat(BaseModel): backgroundColor: Optional[Color] = Field( None, description='The background color of the cell. Deprecated: Use background_color_style.', ) backgroundColorStyle: Optional[ColorStyle] = Field( None, description='The background color of the cell. If background_color is also set, this field takes precedence.', ) borders: Optional[Borders] = Field(None, description='The borders of the cell.') horizontalAlignment: Optional[HorizontalAlignment] = Field( None, description='The horizontal alignment of the value in the cell.' ) hyperlinkDisplayType: Optional[HyperlinkDisplayType] = Field( None, description='If one exists, how a hyperlink should be displayed in the cell.', ) numberFormat: Optional[NumberFormat] = Field( None, description='A format describing how number values should be represented to the user.', ) padding: Optional[Padding] = Field(None, description='The padding of the cell.') textDirection: Optional[TextDirection] = Field( None, description='The direction of the text in the cell.' ) textFormat: Optional[TextFormat] = Field( None, description="The format of the text in the cell (unless overridden by a format run). Setting a cell-level link here clears the cell's existing links. Setting the link field in a TextFormatRun takes precedence over the cell-level link.", ) textRotation: Optional[TextRotation] = Field( None, description='The rotation applied to text in the cell.' ) verticalAlignment: Optional[VerticalAlignment] = Field( None, description='The vertical alignment of the value in the cell.' ) wrapStrategy: Optional[WrapStrategy] = Field( None, description='The wrap strategy for the value in the cell.' ) class ChartGroupRule(BaseModel): dateTimeRule: Optional[ChartDateTimeRule] = Field( None, description='A ChartDateTimeRule.' ) histogramRule: Optional[ChartHistogramRule] = Field( None, description='A ChartHistogramRule' ) class ChartSourceRange(BaseModel): sources: Optional[List[GridRange]] = Field( None, description='The ranges of data for a series or domain. Exactly one dimension must have a length of 1, and all sources in the list must have the same dimension with length 1. The domain (if it exists) & all series must have the same number of source ranges. If using more than one source range, then the source range at a given offset must be in order and contiguous across the domain and series. For example, these are valid configurations: domain sources: A1:A5 series1 sources: B1:B5 series2 sources: D6:D10 domain sources: A1:A5, C10:C12 series1 sources: B1:B5, D10:D12 series2 sources: C1:C5, E10:E12', ) class CopyPasteRequest(BaseModel): destination: Optional[GridRange] = Field( None, description="The location to paste to. If the range covers a span that's a multiple of the source's height or width, then the data will be repeated to fill in the destination range. If the range is smaller than the source range, the entire source data will still be copied (beyond the end of the destination range).", ) pasteOrientation: Optional[PasteOrientation] = Field( None, description='How that data should be oriented when pasting.' ) pasteType: Optional[PasteType] = Field( None, description='What kind of data to paste.' ) source: Optional[GridRange] = Field(None, description='The source range to copy.') class CutPasteRequest(BaseModel): destination: Optional[GridCoordinate] = Field( None, description='The top-left coordinate where the data should be pasted.' ) pasteType: Optional[PasteType] = Field( None, description='What kind of data to paste. All the source data will be cut, regardless of what is pasted.', ) source: Optional[GridRange] = Field(None, description='The source data to cut.') class DataSourceColumn(BaseModel): formula: Optional[str] = Field( None, description='The formula of the calculated column.' ) reference: Optional[DataSourceColumnReference] = Field( None, description='The column reference.' ) class DataSourceObjectReference(BaseModel): chartId: Optional[int] = Field( None, description='References to a data source chart.' ) dataSourceFormulaCell: Optional[GridCoordinate] = Field( None, description='References to a cell containing DataSourceFormula.' ) dataSourcePivotTableAnchorCell: Optional[GridCoordinate] = Field( None, description='References to a data source PivotTable anchored at the cell.' ) dataSourceTableAnchorCell: Optional[GridCoordinate] = Field( None, description='References to a DataSourceTable anchored at the cell.' ) sheetId: Optional[str] = Field( None, description='References to a DATA_SOURCE sheet.' ) class DataSourceObjectReferences(BaseModel): references: Optional[List[DataSourceObjectReference]] = Field( None, description='The references.' ) class DataSourceParameter(BaseModel): name: Optional[str] = Field( None, description='Named parameter. Must be a legitimate identifier for the DataSource that supports it. For example, [BigQuery identifier](https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical#identifiers).', ) namedRangeId: Optional[str] = Field( None, description='ID of a NamedRange. Its size must be 1x1.' ) range: Optional[GridRange] = Field( None, description='A range that contains the value of the parameter. Its size must be 1x1.', ) class DataSourceRefreshDailySchedule(BaseModel): startTime: Optional[TimeOfDay] = Field( None, description='The start time of a time interval in which a data source refresh is scheduled. Only `hours` part is used. The time interval size defaults to that in the Sheets editor.', ) class DataSourceRefreshMonthlySchedule(BaseModel): daysOfMonth: Optional[List[int]] = Field( None, description='Days of the month to refresh. Only 1-28 are supported, mapping to the 1st to the 28th day. At lesat one day must be specified.', ) startTime: Optional[TimeOfDay] = Field( None, description='The start time of a time interval in which a data source refresh is scheduled. Only `hours` part is used. The time interval size defaults to that in the Sheets editor.', ) class DataSourceRefreshWeeklySchedule(BaseModel): daysOfWeek: Optional[List[DaysOfWeekEnum]] = Field( None, description='Days of the week to refresh. At least one day must be specified.', ) startTime: Optional[TimeOfDay] = Field( None, description='The start time of a time interval in which a data source refresh is scheduled. Only `hours` part is used. The time interval size defaults to that in the Sheets editor.', ) class DataSourceSheetProperties(BaseModel): columns: Optional[List[DataSourceColumn]] = Field( None, description='The columns displayed on the sheet, corresponding to the values in RowData.', ) dataExecutionStatus: Optional[DataExecutionStatus] = Field( None, description='The data execution status.' ) dataSourceId: Optional[str] = Field( None, description='ID of the DataSource the sheet is connected to.' ) class DataSourceSpec(BaseModel): bigQuery: Optional[BigQueryDataSourceSpec] = Field( None, description='A BigQueryDataSourceSpec.' ) parameters: Optional[List[DataSourceParameter]] = Field( None, description='The parameters of the data source, used when querying the data source.', ) class DataValidationRule(BaseModel): condition: Optional[BooleanCondition] = Field( None, description='The condition that data in the cell must match.' ) inputMessage: Optional[str] = Field( None, description='A message to show the user when adding data to the cell.' ) showCustomUi: Optional[bool] = Field( None, description='True if the UI should be customized based on the kind of condition. If true, "List" conditions will show a dropdown.', ) strict: Optional[bool] = Field( None, description='True if invalid data should be rejected.' ) class DeleteDimensionGroupRequest(BaseModel): range: Optional[DimensionRange] = Field( None, description='The range of the group to be deleted.' ) class DeleteDimensionRequest(BaseModel): range: Optional[DimensionRange] = Field( None, description='The dimensions to delete from the sheet.' ) class DeleteDuplicatesRequest(BaseModel): comparisonColumns: Optional[List[DimensionRange]] = Field( None, description='The columns in the range to analyze for duplicate values. If no columns are selected then all columns are analyzed for duplicates.', ) range: Optional[GridRange] = Field( None, description='The range to remove duplicates rows from.' ) class DeleteRangeRequest(BaseModel): range: Optional[GridRange] = Field( None, description='The range of cells to delete.' ) shiftDimension: Optional[ShiftDimension] = Field( None, description='The dimension from which deleted cells will be replaced with. If ROWS, existing cells will be shifted upward to replace the deleted cells. If COLUMNS, existing cells will be shifted left to replace the deleted cells.', ) class DeveloperMetadataLocation(BaseModel): dimensionRange: Optional[DimensionRange] = Field( None, description='Represents the row or column when metadata is associated with a dimension. The specified DimensionRange must represent a single row or column; it cannot be unbounded or span multiple rows or columns.', ) locationType: Optional[LocationType] = Field( None, description='The type of location this object represents. This field is read-only.', ) sheetId: Optional[int] = Field( None, description='The ID of the sheet when metadata is associated with an entire sheet.', ) spreadsheet: Optional[bool] = Field( None, description='True when metadata is associated with an entire spreadsheet.' ) class DeveloperMetadataLookup(BaseModel): locationMatchingStrategy: Optional[LocationMatchingStrategy] = Field( None, description='Determines how this lookup matches the location. If this field is specified as EXACT, only developer metadata associated on the exact location specified is matched. If this field is specified to INTERSECTING, developer metadata associated on intersecting locations is also matched. If left unspecified, this field assumes a default value of INTERSECTING. If this field is specified, a metadataLocation must also be specified.', ) locationType: Optional[LocationType] = Field( None, description='Limits the selected developer metadata to those entries which are associated with locations of the specified type. For example, when this field is specified as ROW this lookup only considers developer metadata associated on rows. If the field is left unspecified, all location types are considered. This field cannot be specified as SPREADSHEET when the locationMatchingStrategy is specified as INTERSECTING or when the metadataLocation is specified as a non-spreadsheet location: spreadsheet metadata cannot intersect any other developer metadata location. This field also must be left unspecified when the locationMatchingStrategy is specified as EXACT.', ) metadataId: Optional[int] = Field( None, description='Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id.', ) metadataKey: Optional[str] = Field( None, description='Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key.', ) metadataLocation: Optional[DeveloperMetadataLocation] = Field( None, description='Limits the selected developer metadata to those entries associated with the specified location. This field either matches exact locations or all intersecting locations according the specified locationMatchingStrategy.', ) metadataValue: Optional[str] = Field( None, description='Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value.', ) visibility: Optional[Visibility] = Field( None, description='Limits the selected developer metadata to that which has a matching DeveloperMetadata.visibility. If left unspecified, all developer metadata visibile to the requesting project is considered.', ) class DimensionGroup(BaseModel): collapsed: Optional[bool] = Field( None, description="This field is true if this group is collapsed. A collapsed group remains collapsed if an overlapping group at a shallower depth is expanded. A true value does not imply that all dimensions within the group are hidden, since a dimension's visibility can change independently from this group property. However, when this property is updated, all dimensions within it are set to hidden if this field is true, or set to visible if this field is false.", ) depth: Optional[int] = Field( None, description='The depth of the group, representing how many groups have a range that wholly contains the range of this group.', ) range: Optional[DimensionRange] = Field( None, description='The range over which this group exists.' ) class EmbeddedObjectPosition(BaseModel): newSheet: Optional[bool] = Field( None, description='If true, the embedded object is put on a new sheet whose ID is chosen for you. Used only when writing.', ) overlayPosition: Optional[OverlayPosition] = Field( None, description='The position at which the object is overlaid on top of a grid.', ) sheetId: Optional[int] = Field( None, description='The sheet this is on. Set only if the embedded object is on its own sheet. Must be non-negative.', ) class FilterCriteria(BaseModel): condition: Optional[BooleanCondition] = Field( None, description='A condition that must be true for values to be shown. (This does not override hidden_values -- if a value is listed there, it will still be hidden.)', ) hiddenValues: Optional[List[str]] = Field( None, description='Values that should be hidden.' ) visibleBackgroundColor: Optional[Color] = Field( None, description='The background fill color to filter by; only cells with this fill color are shown. Mutually exclusive with visible_foreground_color. Deprecated: Use visible_background_color_style.', ) visibleBackgroundColorStyle: Optional[ColorStyle] = Field( None, description='The background fill color to filter by; only cells with this fill color are shown. This field is mutually exclusive with visible_foreground_color, and must be set to an RGB-type color. If visible_background_color is also set, this field takes precedence.', ) visibleForegroundColor: Optional[Color] = Field( None, description='The foreground color to filter by; only cells with this foreground color are shown. Mutually exclusive with visible_background_color. Deprecated: Use visible_foreground_color_style.', ) visibleForegroundColorStyle: Optional[ColorStyle] = Field( None, description='The foreground color to filter by; only cells with this foreground color are shown. This field is mutually exclusive with visible_background_color, and must be set to an RGB-type color. If visible_foreground_color is also set, this field takes precedence.', ) class FilterSpec(BaseModel): columnIndex: Optional[int] = Field(None, description='The column index.') dataSourceColumnReference: Optional[DataSourceColumnReference] = Field( None, description='Reference to a data source column.' ) filterCriteria: Optional[FilterCriteria] = Field( None, description='The criteria for the column.' ) class FilterView(BaseModel): criteria: Optional[Dict[str, FilterCriteria]] = Field( None, description="The criteria for showing/hiding values per column. The map's key is the column index, and the value is the criteria for that column. This field is deprecated in favor of filter_specs.", ) filterSpecs: Optional[List[FilterSpec]] = Field( None, description='The filter criteria for showing/hiding values per column. Both criteria and filter_specs are populated in responses. If both fields are specified in an update request, this field takes precedence.', ) filterViewId: Optional[int] = Field(None, description='The ID of the filter view.') namedRangeId: Optional[str] = Field( None, description='The named range this filter view is backed by, if any. When writing, only one of range or named_range_id may be set.', ) range: Optional[GridRange] = Field( None, description='The range this filter view covers. When writing, only one of range or named_range_id may be set.', ) sortSpecs: Optional[List[SortSpec]] = Field( None, description='The sort order per column. Later specifications are used when values are equal in the earlier specifications.', ) title: Optional[str] = Field(None, description='The name of the filter view.') class FindReplaceRequest(BaseModel): allSheets: Optional[bool] = Field( None, description='True to find/replace over all sheets.' ) find: Optional[str] = Field(None, description='The value to search.') includeFormulas: Optional[bool] = Field( None, description='True if the search should include cells with formulas. False to skip cells with formulas.', ) matchCase: Optional[bool] = Field( None, description='True if the search is case sensitive.' ) matchEntireCell: Optional[bool] = Field( None, description='True if the find value should match the entire cell.' ) range: Optional[GridRange] = Field( None, description='The range to find/replace over.' ) replacement: Optional[str] = Field( None, description='The value to use as the replacement.' ) searchByRegex: Optional[bool] = Field( None, description='True if the find value is a regex. The regular expression and replacement should follow Java regex rules at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. The replacement string is allowed to refer to capturing groups. For example, if one cell has the contents `"Google Sheets"` and another has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of `"$1 Rocks"` would change the contents of the cells to `"GSheets Rocks"` and `"GDocs Rocks"` respectively.', ) sheetId: Optional[int] = Field(None, description='The sheet to find/replace over.') class GradientRule(BaseModel): maxpoint: Optional[InterpolationPoint] = Field( None, description='The final interpolation point.' ) midpoint: Optional[InterpolationPoint] = Field( None, description='An optional midway interpolation point.' ) minpoint: Optional[InterpolationPoint] = Field( None, description='The starting interpolation point.' ) class KeyValueFormat(BaseModel): position: Optional[TextPosition] = Field( None, description='Specifies the horizontal text positioning of key value. This field is optional. If not specified, default positioning is used.', ) textFormat: Optional[TextFormat] = Field( None, description='Text formatting options for key value. The link field is not supported.', ) class ManualRule(BaseModel): groups: Optional[List[ManualRuleGroup]] = Field( None, description='The list of group names and the corresponding items from the source data that map to each group name.', ) class PivotFilterCriteria(BaseModel): condition: Optional[BooleanCondition] = Field( None, description='A condition that must be true for values to be shown. (`visibleValues` does not override this -- even if a value is listed there, it is still hidden if it does not meet the condition.) Condition values that refer to ranges in A1-notation are evaluated relative to the pivot table sheet. References are treated absolutely, so are not filled down the pivot table. For example, a condition value of `=A1` on "Pivot Table 1" is treated as `\'Pivot Table 1\'!$A$1`. The source data of the pivot table can be referenced by column header name. For example, if the source data has columns named "Revenue" and "Cost" and a condition is applied to the "Revenue" column with type `NUMBER_GREATER` and value `=Cost`, then only columns where "Revenue" > "Cost" are included.', ) visibleByDefault: Optional[bool] = Field( None, description='Whether values are visible by default. If true, the visible_values are ignored, all values that meet condition (if specified) are shown. If false, values that are both in visible_values and meet condition are shown.', ) visibleValues: Optional[List[str]] = Field( None, description='Values that should be included. Values not listed here are excluded.', ) class PivotFilterSpec(BaseModel): columnOffsetIndex: Optional[int] = Field( None, description='The column offset of the source range.' ) dataSourceColumnReference: Optional[DataSourceColumnReference] = Field( None, description='The reference to the data source column.' ) filterCriteria: Optional[PivotFilterCriteria] = Field( None, description='The criteria for the column.' ) class PivotGroupRule(BaseModel): dateTimeRule: Optional[DateTimeRule] = Field(None, description='A DateTimeRule.') histogramRule: Optional[HistogramRule] = Field(None, description='A HistogramRule.') manualRule: Optional[ManualRule] = Field(None, description='A ManualRule.') class RefreshDataSourceObjectExecutionStatus(BaseModel): dataExecutionStatus: Optional[DataExecutionStatus] = Field( None, description='The data execution status.' ) reference: Optional[DataSourceObjectReference] = Field( None, description='Reference to a data source object being refreshed.' ) class RefreshDataSourceRequest(BaseModel): dataSourceId: Optional[str] = Field( None, description='Reference to a DataSource. If specified, refreshes all associated data source objects for the data source.', ) force: Optional[bool] = Field( None, description='Refreshes the data source objects regardless of the current state. If not set and a referenced data source object was in error state, the refresh will fail immediately.', ) isAll: Optional[bool] = Field( None, description='Refreshes all existing data source objects in the spreadsheet.', ) references: Optional[DataSourceObjectReferences] = Field( None, description='References to data source objects to refresh.' ) class RefreshDataSourceResponse(BaseModel): statuses: Optional[List[RefreshDataSourceObjectExecutionStatus]] = Field( None, description='All the refresh status for the data source object references specified in the request. If is_all is specified, the field contains only those in failure status.', ) class SetDataValidationRequest(BaseModel): range: Optional[GridRange] = Field( None, description='The range the data validation rule should apply to.' ) rule: Optional[DataValidationRule] = Field( None, description='The data validation rule to set on each cell in the range, or empty to clear the data validation in the range.', ) class SheetProperties(BaseModel): dataSourceSheetProperties: Optional[DataSourceSheetProperties] = Field( None, description='Output only. If present, the field contains DATA_SOURCE sheet specific properties.', ) gridProperties: Optional[GridProperties] = Field( None, description='Additional properties of the sheet if this sheet is a grid. (If the sheet is an object sheet, containing a chart or image, then this field will be absent.) When writing it is an error to set any grid properties on non-grid sheets. If this sheet is a DATA_SOURCE sheet, this field is output only but contains the properties that reflect how a data source sheet is rendered in the UI, e.g. row_count.', ) hidden: Optional[bool] = Field( None, description="True if the sheet is hidden in the UI, false if it's visible.", ) index: Optional[int] = Field( None, description='The index of the sheet within the spreadsheet. When adding or updating sheet properties, if this field is excluded then the sheet is added or moved to the end of the sheet list. When updating sheet indices or inserting sheets, movement is considered in "before the move" indexes. For example, if there were 3 sheets (S1, S2, S3) in order to move S1 ahead of S2 the index would have to be set to 2. A sheet index update request is ignored if the requested index is identical to the sheets current index or if the requested new index is equal to the current sheet index + 1.', ) rightToLeft: Optional[bool] = Field( None, description='True if the sheet is an RTL sheet instead of an LTR sheet.' ) sheetId: Optional[int] = Field( None, description='The ID of the sheet. Must be non-negative. This field cannot be changed once set.', ) sheetType: Optional[SheetType] = Field( None, description='The type of sheet. Defaults to GRID. This field cannot be changed once set.', ) tabColor: Optional[Color] = Field( None, description='The color of the tab in the UI. Deprecated: Use tab_color_style.', ) tabColorStyle: Optional[ColorStyle] = Field( None, description='The color of the tab in the UI. If tab_color is also set, this field takes precedence.', ) title: Optional[str] = Field(None, description='The name of the sheet.') class SlicerSpec(BaseModel): applyToPivotTables: Optional[bool] = Field( None, description='True if the filter should apply to pivot tables. If not set, default to `True`.', ) backgroundColor: Optional[Color] = Field( None, description='The background color of the slicer. Deprecated: Use background_color_style.', ) backgroundColorStyle: Optional[ColorStyle] = Field( None, description='The background color of the slicer. If background_color is also set, this field takes precedence.', ) columnIndex: Optional[int] = Field( None, description='The column index in the data table on which the filter is applied to.', ) dataRange: Optional[GridRange] = Field( None, description='The data range of the slicer.' ) filterCriteria: Optional[FilterCriteria] = Field( None, description='The filtering criteria of the slicer.' ) horizontalAlignment: Optional[HorizontalAlignment] = Field( None, description='The horizontal alignment of title in the slicer. If unspecified, defaults to `LEFT`', ) textFormat: Optional[TextFormat] = Field( None, description='The text format of title in the slicer. The link field is not supported.', ) title: Optional[str] = Field(None, description='The title of the slicer.') class SortRangeRequest(BaseModel): range: Optional[GridRange] = Field(None, description='The range to sort.') sortSpecs: Optional[List[SortSpec]] = Field( None, description='The sort order per column. Later specifications are used when values are equal in the earlier specifications.', ) class SpreadsheetTheme(BaseModel): primaryFontFamily: Optional[str] = Field( None, description='Name of the primary font family.' ) themeColors: Optional[List[ThemeColorPair]] = Field( None, description='The spreadsheet theme color pairs. To update you must provide all theme color pairs.', ) class UpdateBordersRequest(BaseModel): bottom: Optional[Border] = Field( None, description='The border to put at the bottom of the range.' ) innerHorizontal: Optional[Border] = Field( None, description='The horizontal border to put within the range.' ) innerVertical: Optional[Border] = Field( None, description='The vertical border to put within the range.' ) left: Optional[Border] = Field( None, description='The border to put at the left of the range.' ) range: Optional[GridRange] = Field( None, description='The range whose borders should be updated.' ) right: Optional[Border] = Field( None, description='The border to put at the right of the range.' ) top: Optional[Border] = Field( None, description='The border to put at the top of the range.' ) class UpdateDimensionGroupRequest(BaseModel): dimensionGroup: Optional[DimensionGroup] = Field( None, description='The group whose state should be updated. The range and depth of the group should specify a valid group on the sheet, and all other fields updated.', ) fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `dimensionGroup` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) class UpdateEmbeddedObjectPositionRequest(BaseModel): fields: Optional[str] = Field( None, description='The fields of OverlayPosition that should be updated when setting a new position. Used only if newPosition.overlayPosition is set, in which case at least one field must be specified. The root `newPosition.overlayPosition` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) newPosition: Optional[EmbeddedObjectPosition] = Field( None, description='An explicit position to move the embedded object to. If newPosition.sheetId is set, a new sheet with that ID will be created. If newPosition.newSheet is set to true, a new sheet will be created with an ID that will be chosen for you.', ) objectId: Optional[int] = Field(None, description='The ID of the object to moved.') class UpdateEmbeddedObjectPositionResponse(BaseModel): position: Optional[EmbeddedObjectPosition] = Field( None, description='The new position of the embedded object.' ) class UpdateFilterViewRequest(BaseModel): fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `filter` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) filter: Optional[FilterView] = Field( None, description='The new properties of the filter view.' ) class UpdateSheetPropertiesRequest(BaseModel): fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) properties: Optional[SheetProperties] = Field( None, description='The properties to update.' ) class UpdateSlicerSpecRequest(BaseModel): fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `SlicerSpec` is implied and should not be specified. A single "*"` can be used as short-hand for listing every field.', ) slicerId: Optional[int] = Field(None, description='The id of the slicer to update.') spec: Optional[SlicerSpec] = Field( None, description='The specification to apply to the slicer.' ) class UpdateValuesResponse(BaseModel): spreadsheetId: Optional[str] = Field( None, description='The spreadsheet the updates were applied to.' ) updatedCells: Optional[int] = Field( None, description='The number of cells updated.' ) updatedColumns: Optional[int] = Field( None, description='The number of columns where at least one cell in the column was updated.', ) updatedData: Optional[ValueRange] = Field( None, description="The values of the cells after updates were applied. This is only included if the request's `includeValuesInResponse` field was `true`.", ) updatedRange: Optional[str] = Field( None, description='The range (in A1 notation) that updates were applied to.' ) updatedRows: Optional[int] = Field( None, description='The number of rows where at least one cell in the row was updated.', ) class AddDimensionGroupResponse(BaseModel): dimensionGroups: Optional[List[DimensionGroup]] = Field( None, description='All groups of a dimension after adding a group to that dimension.', ) class AddFilterViewRequest(BaseModel): filter: Optional[FilterView] = Field( None, description='The filter to add. The filterViewId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a filter that already exists.)', ) class AddFilterViewResponse(BaseModel): filter: Optional[FilterView] = Field( None, description='The newly added filter view.' ) class AddSheetRequest(BaseModel): properties: Optional[SheetProperties] = Field( None, description='The properties the new sheet should have. All properties are optional. The sheetId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a sheet that already exists.)', ) class AddSheetResponse(BaseModel): properties: Optional[SheetProperties] = Field( None, description='The properties of the newly added sheet.' ) class AppendValuesResponse(BaseModel): spreadsheetId: Optional[str] = Field( None, description='The spreadsheet the updates were applied to.' ) tableRange: Optional[str] = Field( None, description='The range (in A1 notation) of the table that values are being appended to (before the values were appended). Empty if no table was found.', ) updates: Optional[UpdateValuesResponse] = Field( None, description='Information about the updates that were applied.' ) class BandedRange(BaseModel): bandedRangeId: Optional[int] = Field( None, description='The id of the banded range.' ) columnProperties: Optional[BandingProperties] = Field( None, description='Properties for column bands. These properties are applied on a column- by-column basis throughout all the columns in the range. At least one of row_properties or column_properties must be specified.', ) range: Optional[GridRange] = Field( None, description='The range over which these properties are applied.' ) rowProperties: Optional[BandingProperties] = Field( None, description='Properties for row bands. These properties are applied on a row-by-row basis throughout all the rows in the range. At least one of row_properties or column_properties must be specified.', ) class BasicFilter(BaseModel): criteria: Optional[Dict[str, FilterCriteria]] = Field( None, description="The criteria for showing/hiding values per column. The map's key is the column index, and the value is the criteria for that column. This field is deprecated in favor of filter_specs.", ) filterSpecs: Optional[List[FilterSpec]] = Field( None, description='The filter criteria per column. Both criteria and filter_specs are populated in responses. If both fields are specified in an update request, this field takes precedence.', ) range: Optional[GridRange] = Field(None, description='The range the filter covers.') sortSpecs: Optional[List[SortSpec]] = Field( None, description='The sort order per column. Later specifications are used when values are equal in the earlier specifications.', ) class BatchUpdateValuesResponse(BaseModel): responses: Optional[List[UpdateValuesResponse]] = Field( None, description='One UpdateValuesResponse per requested range, in the same order as the requests appeared.', ) spreadsheetId: Optional[str] = Field( None, description='The spreadsheet the updates were applied to.' ) totalUpdatedCells: Optional[int] = Field( None, description='The total number of cells updated.' ) totalUpdatedColumns: Optional[int] = Field( None, description='The total number of columns where at least one cell in the column was updated.', ) totalUpdatedRows: Optional[int] = Field( None, description='The total number of rows where at least one cell in the row was updated.', ) totalUpdatedSheets: Optional[int] = Field( None, description='The total number of sheets where at least one cell in the sheet was updated.', ) class BooleanRule(BaseModel): condition: Optional[BooleanCondition] = Field( None, description='The condition of the rule. If the condition evaluates to true, the format is applied.', ) format: Optional[CellFormat] = Field( None, description='The format to apply. Conditional formatting can only apply a subset of formatting: bold, italic, strikethrough, foreground color & background color.', ) class ChartData(BaseModel): aggregateType: Optional[AggregateType] = Field( None, description='The aggregation type for the series of a data source chart. Only supported for data source charts.', ) columnReference: Optional[DataSourceColumnReference] = Field( None, description='The reference to the data source column that the data reads from.', ) groupRule: Optional[ChartGroupRule] = Field( None, description='The rule to group the data by if the ChartData backs the domain of a data source chart. Only supported for data source charts.', ) sourceRange: Optional[ChartSourceRange] = Field( None, description='The source ranges of the data.' ) class ConditionalFormatRule(BaseModel): booleanRule: Optional[BooleanRule] = Field( None, description='The formatting is either "on" or "off" according to the rule.', ) gradientRule: Optional[GradientRule] = Field( None, description='The formatting will vary based on the gradients in the rule.' ) ranges: Optional[List[GridRange]] = Field( None, description='The ranges that are formatted if the condition is true. All the ranges must be on the same grid.', ) class DataFilter(BaseModel): a1Range: Optional[str] = Field( None, description='Selects data that matches the specified A1 range.' ) developerMetadataLookup: Optional[DeveloperMetadataLookup] = Field( None, description='Selects data associated with the developer metadata matching the criteria described by this DeveloperMetadataLookup.', ) gridRange: Optional[GridRange] = Field( None, description='Selects data that matches the range described by the GridRange.', ) class DataFilterValueRange(BaseModel): dataFilter: Optional[DataFilter] = Field( None, description='The data filter describing the location of the values in the spreadsheet.', ) majorDimension: Optional[MajorDimension] = Field( None, description='The major dimension of the values.' ) values: Optional[List[List]] = Field( None, description='The data to be written. If the provided values exceed any of the ranges matched by the data filter then the request fails. If the provided values are less than the matched ranges only the specified values are written, existing values in the matched ranges remain unaffected.', ) class DataLabel(BaseModel): customLabelData: Optional[ChartData] = Field( None, description='Data to use for custom labels. Only used if type is set to CUSTOM. This data must be the same length as the series or other element this data label is applied to. In addition, if the series is split into multiple source ranges, this source data must come from the next column in the source data. For example, if the series is B2:B4,E6:E8 then this data must come from C2:C4,F6:F8.', ) placement: Optional[Placement] = Field( None, description='The placement of the data label relative to the labeled data.', ) textFormat: Optional[TextFormat] = Field( None, description='The text format used for the data label. The link field is not supported.', ) type: Optional[Type3] = Field(None, description='The type of the data label.') class DataSource(BaseModel): calculatedColumns: Optional[List[DataSourceColumn]] = Field( None, description='All calculated columns in the data source.' ) dataSourceId: Optional[str] = Field( None, description='The spreadsheet-scoped unique ID that identifies the data source. Example: 1080547365.', ) sheetId: Optional[int] = Field( None, description='The ID of the Sheet connected with the data source. The field cannot be changed once set. When creating a data source, an associated DATA_SOURCE sheet is also created, if the field is not specified, the ID of the created sheet will be randomly generated.', ) spec: Optional[DataSourceSpec] = Field( None, description='The DataSourceSpec for the data source connected with this spreadsheet.', ) class DataSourceRefreshSchedule(BaseModel): dailySchedule: Optional[DataSourceRefreshDailySchedule] = Field( None, description='Daily refresh schedule.' ) enabled: Optional[bool] = Field( None, description='True if the refresh schedule is enabled, or false otherwise.' ) monthlySchedule: Optional[DataSourceRefreshMonthlySchedule] = Field( None, description='Monthly refresh schedule.' ) nextRun: Optional[Interval] = Field( None, description='Output only. The time interval of the next run.' ) refreshScope: Optional[RefreshScope] = Field( None, description='The scope of the refresh. Must be ALL_DATA_SOURCES.' ) weeklySchedule: Optional[DataSourceRefreshWeeklySchedule] = Field( None, description='Weekly refresh schedule.' ) class DataSourceTable(BaseModel): columnSelectionType: Optional[ColumnSelectionType] = Field( None, description='The type to select columns for the data source table. Defaults to SELECTED.', ) columns: Optional[List[DataSourceColumnReference]] = Field( None, description='Columns selected for the data source table. The column_selection_type must be SELECTED.', ) dataExecutionStatus: Optional[DataExecutionStatus] = Field( None, description='Output only. The data execution status.' ) dataSourceId: Optional[str] = Field( None, description='The ID of the data source the data source table is associated with.', ) filterSpecs: Optional[List[FilterSpec]] = Field( None, description='Filter specifications in the data source table.' ) rowLimit: Optional[int] = Field( None, description='The limit of rows to return. If not set, a default limit is applied. Please refer to the Sheets editor for the default and max limit.', ) sortSpecs: Optional[List[SortSpec]] = Field( None, description='Sort specifications in the data source table. The result of the data source table is sorted based on the sort specifications in order.', ) class DeleteConditionalFormatRuleResponse(BaseModel): rule: Optional[ConditionalFormatRule] = Field( None, description='The rule that was deleted.' ) class DeleteDeveloperMetadataRequest(BaseModel): dataFilter: Optional[DataFilter] = Field( None, description='The data filter describing the criteria used to select which developer metadata entry to delete.', ) class DeleteDimensionGroupResponse(BaseModel): dimensionGroups: Optional[List[DimensionGroup]] = Field( None, description='All groups of a dimension after deleting a group from that dimension.', ) class DeveloperMetadata(BaseModel): location: Optional[DeveloperMetadataLocation] = Field( None, description='The location where the metadata is associated.' ) metadataId: Optional[int] = Field( None, description='The spreadsheet-scoped unique ID that identifies the metadata. IDs may be specified when metadata is created, otherwise one will be randomly generated and assigned. Must be positive.', ) metadataKey: Optional[str] = Field( None, description='The metadata key. There may be multiple metadata in a spreadsheet with the same key. Developer metadata must always have a key specified.', ) metadataValue: Optional[str] = Field( None, description="Data associated with the metadata's key." ) visibility: Optional[Visibility] = Field( None, description='The metadata visibility. Developer metadata must always have a visibility specified.', ) class DimensionProperties(BaseModel): dataSourceColumnReference: Optional[DataSourceColumnReference] = Field( None, description='Output only. If set, this is a column in a data source sheet.', ) developerMetadata: Optional[List[DeveloperMetadata]] = Field( None, description='The developer metadata associated with a single row or column.', ) hiddenByFilter: Optional[bool] = Field( None, description='True if this dimension is being filtered. This field is read-only.', ) hiddenByUser: Optional[bool] = Field( None, description='True if this dimension is explicitly hidden.' ) pixelSize: Optional[int] = Field( None, description='The height (if a row) or width (if a column) of the dimension in pixels.', ) class DuplicateFilterViewResponse(BaseModel): filter: Optional[FilterView] = Field(None, description='The newly created filter.') class DuplicateSheetResponse(BaseModel): properties: Optional[SheetProperties] = Field( None, description='The properties of the duplicate sheet.' ) class GetSpreadsheetByDataFilterRequest(BaseModel): dataFilters: Optional[List[DataFilter]] = Field( None, description='The DataFilters used to select which ranges to retrieve from the spreadsheet.', ) includeGridData: Optional[bool] = Field( None, description='True if grid data should be returned. This parameter is ignored if a field mask was set in the request.', ) class HistogramSeries(BaseModel): barColor: Optional[Color] = Field( None, description='The color of the column representing this series in each bucket. This field is optional. Deprecated: Use bar_color_style.', ) barColorStyle: Optional[ColorStyle] = Field( None, description='The color of the column representing this series in each bucket. This field is optional. If bar_color is also set, this field takes precedence.', ) data: Optional[ChartData] = Field( None, description='The data for this histogram series.' ) class MatchedDeveloperMetadata(BaseModel): dataFilters: Optional[List[DataFilter]] = Field( None, description='All filters matching the returned developer metadata.' ) developerMetadata: Optional[DeveloperMetadata] = Field( None, description='The developer metadata matching the specified filters.' ) class MatchedValueRange(BaseModel): dataFilters: Optional[List[DataFilter]] = Field( None, description='The DataFilters from the request that matched the range of values.', ) valueRange: Optional[ValueRange] = Field( None, description='The values matched by the DataFilter.' ) class OrgChartSpec(BaseModel): labels: Optional[ChartData] = Field( None, description='The data containing the labels for all the nodes in the chart. Labels must be unique.', ) nodeColor: Optional[Color] = Field( None, description='The color of the org chart nodes. Deprecated: Use node_color_style.', ) nodeColorStyle: Optional[ColorStyle] = Field( None, description='The color of the org chart nodes. If node_color is also set, this field takes precedence.', ) nodeSize: Optional[NodeSize] = Field( None, description='The size of the org chart nodes.' ) parentLabels: Optional[ChartData] = Field( None, description='The data containing the label of the parent for the corresponding node. A blank value indicates that the node has no parent and is a top-level node. This field is optional.', ) selectedNodeColor: Optional[Color] = Field( None, description='The color of the selected org chart nodes. Deprecated: Use selected_node_color_style.', ) selectedNodeColorStyle: Optional[ColorStyle] = Field( None, description='The color of the selected org chart nodes. If selected_node_color is also set, this field takes precedence.', ) tooltips: Optional[ChartData] = Field( None, description='The data containing the tooltip for the corresponding node. A blank value results in no tooltip being displayed for the node. This field is optional.', ) class PieChartSpec(BaseModel): domain: Optional[ChartData] = Field( None, description='The data that covers the domain of the pie chart.' ) legendPosition: Optional[LegendPosition3] = Field( None, description='Where the legend of the pie chart should be drawn.' ) pieHole: Optional[float] = Field( None, description='The size of the hole in the pie chart.' ) series: Optional[ChartData] = Field( None, description='The data that covers the one and only series of the pie chart.', ) threeDimensional: Optional[bool] = Field( None, description='True if the pie is three dimensional.' ) class PivotGroup(BaseModel): dataSourceColumnReference: Optional[DataSourceColumnReference] = Field( None, description='The reference to the data source column this grouping is based on.', ) groupLimit: Optional[PivotGroupLimit] = Field( None, description='The count limit on rows or columns to apply to this pivot group.', ) groupRule: Optional[PivotGroupRule] = Field( None, description='The group rule to apply to this row/column group.' ) label: Optional[str] = Field( None, description="The labels to use for the row/column groups which can be customized. For example, in the following pivot table, the row label is `Region` (which could be renamed to `State`) and the column label is `Product` (which could be renamed `Item`). Pivot tables created before December 2017 do not have header labels. If you'd like to add header labels to an existing pivot table, please delete the existing pivot table and then create a new pivot table with same parameters. +--------------+---------+-------+ | SUM of Units | Product | | | Region | Pen | Paper | +--------------+---------+-------+ | New York | 345 | 98 | | Oregon | 234 | 123 | | Tennessee | 531 | 415 | +--------------+---------+-------+ | Grand Total | 1110 | 636 | +--------------+---------+-------+", ) repeatHeadings: Optional[bool] = Field( None, description='True if the headings in this pivot group should be repeated. This is only valid for row groupings and is ignored by columns. By default, we minimize repetition of headings by not showing higher level headings where they are the same. For example, even though the third row below corresponds to "Q1 Mar", "Q1" is not shown because it is redundant with previous rows. Setting repeat_headings to true would cause "Q1" to be repeated for "Feb" and "Mar". +--------------+ | Q1 | Jan | | | Feb | | | Mar | +--------+-----+ | Q1 Total | +--------------+', ) showTotals: Optional[bool] = Field( None, description='True if the pivot table should include the totals for this grouping.', ) sortOrder: Optional[SortOrder] = Field( None, description='The order the values in this group should be sorted.' ) sourceColumnOffset: Optional[int] = Field( None, description='The column offset of the source range that this grouping is based on. For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` means this group refers to column `C`, whereas the offset `1` would refer to column `D`.', ) valueBucket: Optional[PivotGroupSortValueBucket] = Field( None, description="The bucket of the opposite pivot group to sort by. If not specified, sorting is alphabetical by this group's values.", ) valueMetadata: Optional[List[PivotGroupValueMetadata]] = Field( None, description='Metadata about values in the grouping.' ) class PivotTable(BaseModel): columns: Optional[List[PivotGroup]] = Field( None, description='Each column grouping in the pivot table.' ) criteria: Optional[Dict[str, PivotFilterCriteria]] = Field( None, description="An optional mapping of filters per source column offset. The filters are applied before aggregating data into the pivot table. The map's key is the column offset of the source range that you want to filter, and the value is the criteria for that column. For example, if the source was `C10:E15`, a key of `0` will have the filter for column `C`, whereas the key `1` is for column `D`. This field is deprecated in favor of filter_specs.", ) dataExecutionStatus: Optional[DataExecutionStatus] = Field( None, description='Output only. The data execution status for data source pivot tables.', ) dataSourceId: Optional[str] = Field( None, description='The ID of the data source the pivot table is reading data from.', ) filterSpecs: Optional[List[PivotFilterSpec]] = Field( None, description='The filters applied to the source columns before aggregating data for the pivot table. Both criteria and filter_specs are populated in responses. If both fields are specified in an update request, this field takes precedence.', ) rows: Optional[List[PivotGroup]] = Field( None, description='Each row grouping in the pivot table.' ) source: Optional[GridRange] = Field( None, description='The range the pivot table is reading data from.' ) valueLayout: Optional[ValueLayout] = Field( None, description='Whether values should be listed horizontally (as columns) or vertically (as rows).', ) values: Optional[List[PivotValue]] = Field( None, description='A list of values to include in the pivot table.' ) class ScorecardChartSpec(BaseModel): aggregateType: Optional[AggregateType] = Field( None, description='The aggregation type for key and baseline chart data in scorecard chart. This field is not supported for data source charts. Use the ChartData.aggregateType field of the key_value_data or baseline_value_data instead for data source charts. This field is optional.', ) baselineValueData: Optional[ChartData] = Field( None, description='The data for scorecard baseline value. This field is optional.', ) baselineValueFormat: Optional[BaselineValueFormat] = Field( None, description='Formatting options for baseline value. This field is needed only if baseline_value_data is specified.', ) customFormatOptions: Optional[ChartCustomNumberFormatOptions] = Field( None, description='Custom formatting options for numeric key/baseline values in scorecard chart. This field is used only when number_format_source is set to CUSTOM. This field is optional.', ) keyValueData: Optional[ChartData] = Field( None, description='The data for scorecard key value.' ) keyValueFormat: Optional[KeyValueFormat] = Field( None, description='Formatting options for key value.' ) numberFormatSource: Optional[NumberFormatSource] = Field( None, description='The number format source used in the scorecard chart. This field is optional.', ) scaleFactor: Optional[float] = Field( None, description='Value to scale scorecard key and baseline value. For example, a factor of 10 can be used to divide all values in the chart by 10. This field is optional.', ) class SearchDeveloperMetadataRequest(BaseModel): dataFilters: Optional[List[DataFilter]] = Field( None, description='The data filters describing the criteria used to determine which DeveloperMetadata entries to return. DeveloperMetadata matching any of the specified filters are included in the response.', ) class SearchDeveloperMetadataResponse(BaseModel): matchedDeveloperMetadata: Optional[List[MatchedDeveloperMetadata]] = Field( None, description='The metadata matching the criteria of the search request.' ) class SetBasicFilterRequest(BaseModel): filter: Optional[BasicFilter] = Field(None, description='The filter to set.') class Slicer(BaseModel): position: Optional[EmbeddedObjectPosition] = Field( None, description='The position of the slicer. Note that slicer can be positioned only on existing sheet. Also, width and height of slicer can be automatically adjusted to keep it within permitted limits.', ) slicerId: Optional[int] = Field(None, description='The ID of the slicer.') spec: Optional[SlicerSpec] = Field( None, description='The specification of the slicer.' ) class SpreadsheetProperties(BaseModel): autoRecalc: Optional[AutoRecalc] = Field( None, description='The amount of time to wait before volatile functions are recalculated.', ) defaultFormat: Optional[CellFormat] = Field( None, description="The default format of all cells in the spreadsheet. CellData.effectiveFormat will not be set if the cell's format is equal to this default format. This field is read-only.", ) iterativeCalculationSettings: Optional[IterativeCalculationSettings] = Field( None, description='Determines whether and how circular references are resolved with iterative calculation. Absence of this field means that circular references result in calculation errors.', ) locale: Optional[str] = Field( None, description='The locale of the spreadsheet in one of the following formats: * an ISO 639-1 language code such as `en` * an ISO 639-2 language code such as `fil`, if no 639-1 code exists * a combination of the ISO language code and country code, such as `en_US` Note: when updating this field, not all locales/languages are supported.', ) spreadsheetTheme: Optional[SpreadsheetTheme] = Field( None, description='Theme applied to the spreadsheet.' ) timeZone: Optional[str] = Field( None, description="The time zone of the spreadsheet, in CLDR format such as `America/New_York`. If the time zone isn't recognized, this may be a custom time zone such as `GMT-07:00`.", ) title: Optional[str] = Field(None, description='The title of the spreadsheet.') class TreemapChartSpec(BaseModel): colorData: Optional[ChartData] = Field( None, description='The data that determines the background color of each treemap data cell. This field is optional. If not specified, size_data is used to determine background colors. If specified, the data is expected to be numeric. color_scale will determine how the values in this data map to data cell background colors.', ) colorScale: Optional[TreemapChartColorScale] = Field( None, description='The color scale for data cells in the treemap chart. Data cells are assigned colors based on their color values. These color values come from color_data, or from size_data if color_data is not specified. Cells with color values less than or equal to min_value will have minValueColor as their background color. Cells with color values greater than or equal to max_value will have maxValueColor as their background color. Cells with color values between min_value and max_value will have background colors on a gradient between minValueColor and maxValueColor, the midpoint of the gradient being midValueColor. Cells with missing or non-numeric color values will have noDataColor as their background color.', ) headerColor: Optional[Color] = Field( None, description='The background color for header cells. Deprecated: Use header_color_style.', ) headerColorStyle: Optional[ColorStyle] = Field( None, description='The background color for header cells. If header_color is also set, this field takes precedence.', ) hideTooltips: Optional[bool] = Field(None, description='True to hide tooltips.') hintedLevels: Optional[int] = Field( None, description='The number of additional data levels beyond the labeled levels to be shown on the treemap chart. These levels are not interactive and are shown without their labels. Defaults to 0 if not specified.', ) labels: Optional[ChartData] = Field( None, description='The data that contains the treemap cell labels.' ) levels: Optional[int] = Field( None, description='The number of data levels to show on the treemap chart. These levels are interactive and are shown with their labels. Defaults to 2 if not specified.', ) maxValue: Optional[float] = Field( None, description='The maximum possible data value. Cells with values greater than this will have the same color as cells with this value. If not specified, defaults to the actual maximum value from color_data, or the maximum value from size_data if color_data is not specified.', ) minValue: Optional[float] = Field( None, description='The minimum possible data value. Cells with values less than this will have the same color as cells with this value. If not specified, defaults to the actual minimum value from color_data, or the minimum value from size_data if color_data is not specified.', ) parentLabels: Optional[ChartData] = Field( None, description="The data the contains the treemap cells' parent labels." ) sizeData: Optional[ChartData] = Field( None, description='The data that determines the size of each treemap data cell. This data is expected to be numeric. The cells corresponding to non-numeric or missing data will not be rendered. If color_data is not specified, this data is used to determine data cell background colors as well.', ) textFormat: Optional[TextFormat] = Field( None, description='The text format for all labels on the chart. The link field is not supported.', ) class UpdateBandingRequest(BaseModel): bandedRange: Optional[BandedRange] = Field( None, description='The banded range to update with the new properties.' ) fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `bandedRange` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) class UpdateConditionalFormatRuleRequest(BaseModel): index: Optional[int] = Field( None, description='The zero-based index of the rule that should be replaced or moved.', ) newIndex: Optional[int] = Field( None, description='The zero-based new index the rule should end up at.' ) rule: Optional[ConditionalFormatRule] = Field( None, description='The rule that should replace the rule at the given index.' ) sheetId: Optional[int] = Field( None, description='The sheet of the rule to move. Required if new_index is set, unused otherwise.', ) class UpdateConditionalFormatRuleResponse(BaseModel): newIndex: Optional[int] = Field(None, description='The index of the new rule.') newRule: Optional[ConditionalFormatRule] = Field( None, description='The new rule that replaced the old rule (if replacing), or the rule that was moved (if moved)', ) oldIndex: Optional[int] = Field( None, description='The old index of the rule. Not set if a rule was replaced (because it is the same as new_index).', ) oldRule: Optional[ConditionalFormatRule] = Field( None, description='The old (deleted) rule. Not set if a rule was moved (because it is the same as new_rule).', ) class UpdateDataSourceRequest(BaseModel): dataSource: Optional[DataSource] = Field( None, description='The data source to update.' ) fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `dataSource` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) class UpdateDataSourceResponse(BaseModel): dataExecutionStatus: Optional[DataExecutionStatus] = Field( None, description='The data execution status.' ) dataSource: Optional[DataSource] = Field( None, description='The updated data source.' ) class UpdateDeveloperMetadataRequest(BaseModel): dataFilters: Optional[List[DataFilter]] = Field( None, description='The filters matching the developer metadata entries to update.', ) developerMetadata: Optional[DeveloperMetadata] = Field( None, description='The value that all metadata matched by the data filters will be updated to.', ) fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `developerMetadata` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) class UpdateDeveloperMetadataResponse(BaseModel): developerMetadata: Optional[List[DeveloperMetadata]] = Field( None, description='The updated developer metadata.' ) class UpdateDimensionPropertiesRequest(BaseModel): dataSourceSheetRange: Optional[DataSourceSheetDimensionRange] = Field( None, description='The columns on a data source sheet to update.' ) fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) properties: Optional[DimensionProperties] = Field( None, description='Properties to update.' ) range: Optional[DimensionRange] = Field( None, description='The rows or columns to update.' ) class UpdateSpreadsheetPropertiesRequest(BaseModel): fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root \'properties\' is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) properties: Optional[SpreadsheetProperties] = Field( None, description='The properties to update.' ) class UpdateValuesByDataFilterResponse(BaseModel): dataFilter: Optional[DataFilter] = Field( None, description='The data filter that selected the range that was updated.' ) updatedCells: Optional[int] = Field( None, description='The number of cells updated.' ) updatedColumns: Optional[int] = Field( None, description='The number of columns where at least one cell in the column was updated.', ) updatedData: Optional[ValueRange] = Field( None, description="The values of the cells in the range matched by the dataFilter after all updates were applied. This is only included if the request's `includeValuesInResponse` field was `true`.", ) updatedRange: Optional[str] = Field( None, description='The range (in [A1 notation](/sheets/api/guides/concepts#cell)) that updates were applied to.', ) updatedRows: Optional[int] = Field( None, description='The number of rows where at least one cell in the row was updated.', ) class WaterfallChartDomain(BaseModel): data: Optional[ChartData] = Field( None, description='The data of the WaterfallChartDomain.' ) reversed: Optional[bool] = Field( None, description='True to reverse the order of the domain values (horizontal axis).', ) class WaterfallChartSeries(BaseModel): customSubtotals: Optional[List[WaterfallChartCustomSubtotal]] = Field( None, description='Custom subtotal columns appearing in this series. The order in which subtotals are defined is not significant. Only one subtotal may be defined for each data point.', ) data: Optional[ChartData] = Field( None, description='The data being visualized in this series.' ) dataLabel: Optional[DataLabel] = Field( None, description='Information about the data labels for this series.' ) hideTrailingSubtotal: Optional[bool] = Field( None, description='True to hide the subtotal column from the end of the series. By default, a subtotal column will appear at the end of each series. Setting this field to true will hide that subtotal column for this series.', ) negativeColumnsStyle: Optional[WaterfallChartColumnStyle] = Field( None, description='Styles for all columns in this series with negative values.' ) positiveColumnsStyle: Optional[WaterfallChartColumnStyle] = Field( None, description='Styles for all columns in this series with positive values.' ) subtotalColumnsStyle: Optional[WaterfallChartColumnStyle] = Field( None, description='Styles for all subtotal columns in this series.' ) class WaterfallChartSpec(BaseModel): connectorLineStyle: Optional[LineStyle] = Field( None, description='The line style for the connector lines.' ) domain: Optional[WaterfallChartDomain] = Field( None, description='The domain data (horizontal axis) for the waterfall chart.' ) firstValueIsTotal: Optional[bool] = Field( None, description='True to interpret the first value as a total.' ) hideConnectorLines: Optional[bool] = Field( None, description='True to hide connector lines between columns.' ) series: Optional[List[WaterfallChartSeries]] = Field( None, description='The data this waterfall chart is visualizing.' ) stackedType: Optional[StackedType1] = Field(None, description='The stacked type.') totalDataLabel: Optional[DataLabel] = Field( None, description='Controls whether to display additional data labels on stacked charts which sum the total value of all stacked values at each value along the domain axis. stacked_type must be STACKED and neither CUSTOM nor placement can be set on the total_data_label.', ) class AddBandingRequest(BaseModel): bandedRange: Optional[BandedRange] = Field( None, description='The banded range to add. The bandedRangeId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.)', ) class AddBandingResponse(BaseModel): bandedRange: Optional[BandedRange] = Field( None, description='The banded range that was added.' ) class AddConditionalFormatRuleRequest(BaseModel): index: Optional[int] = Field( None, description='The zero-based index where the rule should be inserted.' ) rule: Optional[ConditionalFormatRule] = Field(None, description='The rule to add.') class AddDataSourceRequest(BaseModel): dataSource: Optional[DataSource] = Field( None, description='The data source to add.' ) class AddDataSourceResponse(BaseModel): dataExecutionStatus: Optional[DataExecutionStatus] = Field( None, description='The data execution status.' ) dataSource: Optional[DataSource] = Field( None, description='The data source that was created.' ) class AddSlicerRequest(BaseModel): slicer: Optional[Slicer] = Field( None, description='The slicer that should be added to the spreadsheet, including the position where it should be placed. The slicerId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a slicer that already exists.)', ) class AddSlicerResponse(BaseModel): slicer: Optional[Slicer] = Field(None, description='The newly added slicer.') class BasicChartDomain(BaseModel): domain: Optional[ChartData] = Field( None, description='The data of the domain. For example, if charting stock prices over time, this is the data representing the dates.', ) reversed: Optional[bool] = Field( None, description='True to reverse the order of the domain values (horizontal axis).', ) class BasicChartSeries(BaseModel): color: Optional[Color] = Field( None, description='The color for elements (such as bars, lines, and points) associated with this series. If empty, a default color is used. Deprecated: Use color_style.', ) colorStyle: Optional[ColorStyle] = Field( None, description='The color for elements (such as bars, lines, and points) associated with this series. If empty, a default color is used. If color is also set, this field takes precedence.', ) dataLabel: Optional[DataLabel] = Field( None, description='Information about the data labels for this series.' ) lineStyle: Optional[LineStyle] = Field( None, description='The line style of this series. Valid only if the chartType is AREA, LINE, or SCATTER. COMBO charts are also supported if the series chart type is AREA or LINE.', ) pointStyle: Optional[PointStyle] = Field( None, description='The style for points associated with this series. Valid only if the chartType is AREA, LINE, or SCATTER. COMBO charts are also supported if the series chart type is AREA, LINE, or SCATTER. If empty, a default point style is used.', ) series: Optional[ChartData] = Field( None, description='The data being visualized in this chart series.' ) styleOverrides: Optional[List[BasicSeriesDataPointStyleOverride]] = Field( None, description='Style override settings for series data points.' ) targetAxis: Optional[TargetAxis] = Field( None, description='The minor axis that will specify the range of values for this series. For example, if charting stocks over time, the "Volume" series may want to be pinned to the right with the prices pinned to the left, because the scale of trading volume is different than the scale of prices. It is an error to specify an axis that isn\'t a valid minor axis for the chart\'s type.', ) type: Optional[Type] = Field( None, description='The type of this series. Valid only if the chartType is COMBO. Different types will change the way the series is visualized. Only LINE, AREA, and COLUMN are supported.', ) class BasicChartSpec(BaseModel): axis: Optional[List[BasicChartAxis]] = Field( None, description='The axis on the chart.' ) chartType: Optional[ChartType] = Field(None, description='The type of the chart.') compareMode: Optional[CompareMode] = Field( None, description='The behavior of tooltips and data highlighting when hovering on data and chart area.', ) domains: Optional[List[BasicChartDomain]] = Field( None, description='The domain of data this is charting. Only a single domain is supported.', ) headerCount: Optional[int] = Field( None, description='The number of rows or columns in the data that are "headers". If not set, Google Sheets will guess how many rows are headers based on the data. (Note that BasicChartAxis.title may override the axis title inferred from the header values.)', ) interpolateNulls: Optional[bool] = Field( None, description='If some values in a series are missing, gaps may appear in the chart (e.g, segments of lines in a line chart will be missing). To eliminate these gaps set this to true. Applies to Line, Area, and Combo charts.', ) legendPosition: Optional[LegendPosition] = Field( None, description='The position of the chart legend.' ) lineSmoothing: Optional[bool] = Field( None, description='Gets whether all lines should be rendered smooth or straight by default. Applies to Line charts.', ) series: Optional[List[BasicChartSeries]] = Field( None, description='The data this chart is visualizing.' ) stackedType: Optional[StackedType] = Field( None, description='The stacked type for charts that support vertical stacking. Applies to Area, Bar, Column, Combo, and Stepped Area charts.', ) threeDimensional: Optional[bool] = Field( None, description='True to make the chart 3D. Applies to Bar and Column charts.' ) totalDataLabel: Optional[DataLabel] = Field( None, description='Controls whether to display additional data labels on stacked charts which sum the total value of all stacked values at each value along the domain axis. These data labels can only be set when chart_type is one of AREA, BAR, COLUMN, COMBO or STEPPED_AREA and stacked_type is either STACKED or PERCENT_STACKED. In addition, for COMBO, this will only be supported if there is only one type of stackable series type or one type has more series than the others and each of the other types have no more than one series. For example, if a chart has two stacked bar series and one area series, the total data labels will be supported. If it has three bar series and two area series, total data labels are not allowed. Neither CUSTOM nor placement can be set on the total_data_label.', ) class BatchClearValuesByDataFilterRequest(BaseModel): dataFilters: Optional[List[DataFilter]] = Field( None, description='The DataFilters used to determine which ranges to clear.' ) class BatchGetValuesByDataFilterRequest(BaseModel): dataFilters: Optional[List[DataFilter]] = Field( None, description='The data filters used to match the ranges of values to retrieve. Ranges that match any of the specified data filters are included in the response.', ) dateTimeRenderOption: Optional[DateTimeRenderOption] = Field( None, description='How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.', ) majorDimension: Optional[MajorDimension] = Field( None, description='The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then a request that selects that range and sets `majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas a request that sets `majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.', ) valueRenderOption: Optional[ValueRenderOption] = Field( None, description='How values should be represented in the output. The default render option is FORMATTED_VALUE.', ) class BatchGetValuesByDataFilterResponse(BaseModel): spreadsheetId: Optional[str] = Field( None, description='The ID of the spreadsheet the data was retrieved from.' ) valueRanges: Optional[List[MatchedValueRange]] = Field( None, description='The requested values with the list of data filters that matched them.', ) class BatchUpdateValuesByDataFilterRequest(BaseModel): data: Optional[List[DataFilterValueRange]] = Field( None, description='The new values to apply to the spreadsheet. If more than one range is matched by the specified DataFilter the specified values are applied to all of those ranges.', ) includeValuesInResponse: Optional[bool] = Field( None, description='Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. The `updatedData` field within each of the BatchUpdateValuesResponse.responses contains the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).', ) responseDateTimeRenderOption: Optional[ResponseDateTimeRenderOption] = Field( None, description='Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.', ) responseValueRenderOption: Optional[ResponseValueRenderOption] = Field( None, description='Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.', ) valueInputOption: Optional[ValueInputOption] = Field( None, description='How the input data should be interpreted.' ) class BatchUpdateValuesByDataFilterResponse(BaseModel): responses: Optional[List[UpdateValuesByDataFilterResponse]] = Field( None, description='The response for each range updated.' ) spreadsheetId: Optional[str] = Field( None, description='The spreadsheet the updates were applied to.' ) totalUpdatedCells: Optional[int] = Field( None, description='The total number of cells updated.' ) totalUpdatedColumns: Optional[int] = Field( None, description='The total number of columns where at least one cell in the column was updated.', ) totalUpdatedRows: Optional[int] = Field( None, description='The total number of rows where at least one cell in the row was updated.', ) totalUpdatedSheets: Optional[int] = Field( None, description='The total number of sheets where at least one cell in the sheet was updated.', ) class BubbleChartSpec(BaseModel): bubbleBorderColor: Optional[Color] = Field( None, description='The bubble border color. Deprecated: Use bubble_border_color_style.', ) bubbleBorderColorStyle: Optional[ColorStyle] = Field( None, description='The bubble border color. If bubble_border_color is also set, this field takes precedence.', ) bubbleLabels: Optional[ChartData] = Field( None, description='The data containing the bubble labels. These do not need to be unique.', ) bubbleMaxRadiusSize: Optional[int] = Field( None, description='The max radius size of the bubbles, in pixels. If specified, the field must be a positive value.', ) bubbleMinRadiusSize: Optional[int] = Field( None, description='The minimum radius size of the bubbles, in pixels. If specific, the field must be a positive value.', ) bubbleOpacity: Optional[float] = Field( None, description='The opacity of the bubbles between 0 and 1.0. 0 is fully transparent and 1 is fully opaque.', ) bubbleSizes: Optional[ChartData] = Field( None, description='The data containing the bubble sizes. Bubble sizes are used to draw the bubbles at different sizes relative to each other. If specified, group_ids must also be specified. This field is optional.', ) bubbleTextStyle: Optional[TextFormat] = Field( None, description='The format of the text inside the bubbles. Strikethrough, underline, and link are not supported.', ) domain: Optional[ChartData] = Field( None, description='The data containing the bubble x-values. These values locate the bubbles in the chart horizontally.', ) groupIds: Optional[ChartData] = Field( None, description='The data containing the bubble group IDs. All bubbles with the same group ID are drawn in the same color. If bubble_sizes is specified then this field must also be specified but may contain blank values. This field is optional.', ) legendPosition: Optional[LegendPosition1] = Field( None, description='Where the legend of the chart should be drawn.' ) series: Optional[ChartData] = Field( None, description='The data containing the bubble y-values. These values locate the bubbles in the chart vertically.', ) class CandlestickDomain(BaseModel): data: Optional[ChartData] = Field( None, description='The data of the CandlestickDomain.' ) reversed: Optional[bool] = Field( None, description='True to reverse the order of the domain values (horizontal axis).', ) class CandlestickSeries(BaseModel): data: Optional[ChartData] = Field( None, description='The data of the CandlestickSeries.' ) class CellData(BaseModel): dataSourceFormula: Optional[DataSourceFormula] = Field( None, description='Output only. Information about a data source formula on the cell. The field is set if user_entered_value is a formula referencing some DATA_SOURCE sheet, e.g. `=SUM(DataSheet!Column)`.', ) dataSourceTable: Optional[DataSourceTable] = Field( None, description='A data source table anchored at this cell. The size of data source table itself is computed dynamically based on its configuration. Only the first cell of the data source table contains the data source table definition. The other cells will contain the display values of the data source table result in their effective_value fields.', ) dataValidation: Optional[DataValidationRule] = Field( None, description='A data validation rule on the cell, if any. When writing, the new data validation rule will overwrite any prior rule.', ) effectiveFormat: Optional[CellFormat] = Field( None, description='The effective format being used by the cell. This includes the results of applying any conditional formatting and, if the cell contains a formula, the computed number format. If the effective format is the default format, effective format will not be written. This field is read-only.', ) effectiveValue: Optional[ExtendedValue] = Field( None, description='The effective value of the cell. For cells with formulas, this is the calculated value. For cells with literals, this is the same as the user_entered_value. This field is read-only.', ) formattedValue: Optional[str] = Field( None, description="The formatted value of the cell. This is the value as it's shown to the user. This field is read-only.", ) hyperlink: Optional[str] = Field( None, description='A hyperlink this cell points to, if any. If the cell contains multiple hyperlinks, this field will be empty. This field is read-only. To set it, use a `=HYPERLINK` formula in the userEnteredValue.formulaValue field. A cell-level link can also be set from the userEnteredFormat.textFormat field. Alternatively, set a hyperlink in the textFormatRun.format.link field that spans the entire cell.', ) note: Optional[str] = Field(None, description='Any note on the cell.') pivotTable: Optional[PivotTable] = Field( None, description='A pivot table anchored at this cell. The size of pivot table itself is computed dynamically based on its data, grouping, filters, values, etc. Only the top-left cell of the pivot table contains the pivot table definition. The other cells will contain the calculated values of the results of the pivot in their effective_value fields.', ) textFormatRuns: Optional[List[TextFormatRun]] = Field( None, description='Runs of rich text applied to subsections of the cell. Runs are only valid on user entered strings, not formulas, bools, or numbers. Properties of a run start at a specific index in the text and continue until the next run. Runs will inherit the properties of the cell unless explicitly changed. When writing, the new runs will overwrite any prior runs. When writing a new user_entered_value, previous runs are erased.', ) userEnteredFormat: Optional[CellFormat] = Field( None, description='The format the user entered for the cell. When writing, the new format will be merged with the existing format.', ) userEnteredValue: Optional[ExtendedValue] = Field( None, description="The value the user entered in the cell. e.g., `1234`, `'Hello'`, or `=NOW()` Note: Dates, Times and DateTimes are represented as doubles in serial number format.", ) class CreateDeveloperMetadataRequest(BaseModel): developerMetadata: Optional[DeveloperMetadata] = Field( None, description='The developer metadata to create.' ) class CreateDeveloperMetadataResponse(BaseModel): developerMetadata: Optional[DeveloperMetadata] = Field( None, description='The developer metadata that was created.' ) class DeleteDeveloperMetadataResponse(BaseModel): deletedDeveloperMetadata: Optional[List[DeveloperMetadata]] = Field( None, description='The metadata that was deleted.' ) class HistogramChartSpec(BaseModel): bucketSize: Optional[float] = Field( None, description='By default the bucket size (the range of values stacked in a single column) is chosen automatically, but it may be overridden here. E.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 - 3.0, etc. Cannot be negative. This field is optional.', ) legendPosition: Optional[LegendPosition2] = Field( None, description='The position of the chart legend.' ) outlierPercentile: Optional[float] = Field( None, description='The outlier percentile is used to ensure that outliers do not adversely affect the calculation of bucket sizes. For example, setting an outlier percentile of 0.05 indicates that the top and bottom 5% of values when calculating buckets. The values are still included in the chart, they will be added to the first or last buckets instead of their own buckets. Must be between 0.0 and 0.5.', ) series: Optional[List[HistogramSeries]] = Field( None, description='The series for a histogram may be either a single series of values to be bucketed or multiple series, each of the same length, containing the name of the series followed by the values to be bucketed for that series.', ) showItemDividers: Optional[bool] = Field( None, description='Whether horizontal divider lines should be displayed between items in each column.', ) class RepeatCellRequest(BaseModel): cell: Optional[CellData] = Field(None, description='The data to write.') fields: Optional[str] = Field( None, description='The fields that should be updated. At least one field must be specified. The root `cell` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) range: Optional[GridRange] = Field( None, description='The range to repeat the cell in.' ) class RowData(BaseModel): values: Optional[List[CellData]] = Field( None, description='The values in the row, one per column.' ) class UpdateCellsRequest(BaseModel): fields: Optional[str] = Field( None, description='The fields of CellData that should be updated. At least one field must be specified. The root is the CellData; \'row.values.\' should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) range: Optional[GridRange] = Field( None, description='The range to write data to. If the data in rows does not cover the entire requested range, the fields matching those set in fields will be cleared.', ) rows: Optional[List[RowData]] = Field(None, description='The data to write.') start: Optional[GridCoordinate] = Field( None, description='The coordinate to start writing data at. Any number of rows and columns (including a different number of columns per row) may be written.', ) class AppendCellsRequest(BaseModel): fields: Optional[str] = Field( None, description='The fields of CellData that should be updated. At least one field must be specified. The root is the CellData; \'row.values.\' should not be specified. A single `"*"` can be used as short-hand for listing every field.', ) rows: Optional[List[RowData]] = Field(None, description='The data to append.') sheetId: Optional[int] = Field( None, description='The sheet ID to append the data to.' ) class CandlestickData(BaseModel): closeSeries: Optional[CandlestickSeries] = Field( None, description='The range data (vertical axis) for the close/final value for each candle. This is the top of the candle body. If greater than the open value the candle will be filled. Otherwise the candle will be hollow.', ) highSeries: Optional[CandlestickSeries] = Field( None, description="The range data (vertical axis) for the high/maximum value for each candle. This is the top of the candle's center line.", ) lowSeries: Optional[CandlestickSeries] = Field( None, description="The range data (vertical axis) for the low/minimum value for each candle. This is the bottom of the candle's center line.", ) openSeries: Optional[CandlestickSeries] = Field( None, description='The range data (vertical axis) for the open/initial value for each candle. This is the bottom of the candle body. If less than the close value the candle will be filled. Otherwise the candle will be hollow.', ) class GridData(BaseModel): columnMetadata: Optional[List[DimensionProperties]] = Field( None, description='Metadata about the requested columns in the grid, starting with the column in start_column.', ) rowData: Optional[List[RowData]] = Field( None, description='The data in the grid, one entry per row, starting with the row in startRow. The values in RowData will correspond to columns starting at start_column.', ) rowMetadata: Optional[List[DimensionProperties]] = Field( None, description='Metadata about the requested rows in the grid, starting with the row in start_row.', ) startColumn: Optional[int] = Field( None, description='The first column this GridData refers to, zero-based.' ) startRow: Optional[int] = Field( None, description='The first row this GridData refers to, zero-based.' ) class CandlestickChartSpec(BaseModel): data: Optional[List[CandlestickData]] = Field( None, description='The Candlestick chart data. Only one CandlestickData is supported.', ) domain: Optional[CandlestickDomain] = Field( None, description='The domain data (horizontal axis) for the candlestick chart. String data will be treated as discrete labels, other data will be treated as continuous values.', ) class ChartSpec(BaseModel): altText: Optional[str] = Field( None, description='The alternative text that describes the chart. This is often used for accessibility.', ) backgroundColor: Optional[Color] = Field( None, description='The background color of the entire chart. Not applicable to Org charts. Deprecated: Use background_color_style.', ) backgroundColorStyle: Optional[ColorStyle] = Field( None, description='The background color of the entire chart. Not applicable to Org charts. If background_color is also set, this field takes precedence.', ) basicChart: Optional[BasicChartSpec] = Field( None, description='A basic chart specification, can be one of many kinds of charts. See BasicChartType for the list of all charts this supports.', ) bubbleChart: Optional[BubbleChartSpec] = Field( None, description='A bubble chart specification.' ) candlestickChart: Optional[CandlestickChartSpec] = Field( None, description='A candlestick chart specification.' ) dataSourceChartProperties: Optional[DataSourceChartProperties] = Field( None, description='If present, the field contains data source chart specific properties.', ) filterSpecs: Optional[List[FilterSpec]] = Field( None, description='The filters applied to the source data of the chart. Only supported for data source charts.', ) fontName: Optional[str] = Field( None, description='The name of the font to use by default for all chart text (e.g. title, axis labels, legend). If a font is specified for a specific part of the chart it will override this font name.', ) hiddenDimensionStrategy: Optional[HiddenDimensionStrategy] = Field( None, description='Determines how the charts will use hidden rows or columns.' ) histogramChart: Optional[HistogramChartSpec] = Field( None, description='A histogram chart specification.' ) maximized: Optional[bool] = Field( None, description="True to make a chart fill the entire space in which it's rendered with minimum padding. False to use the default padding. (Not applicable to Geo and Org charts.)", ) orgChart: Optional[OrgChartSpec] = Field( None, description='An org chart specification.' ) pieChart: Optional[PieChartSpec] = Field( None, description='A pie chart specification.' ) scorecardChart: Optional[ScorecardChartSpec] = Field( None, description='A scorecard chart specification.' ) sortSpecs: Optional[List[SortSpec]] = Field( None, description='The order to sort the chart data by. Only a single sort spec is supported. Only supported for data source charts.', ) subtitle: Optional[str] = Field(None, description='The subtitle of the chart.') subtitleTextFormat: Optional[TextFormat] = Field( None, description='The subtitle text format. Strikethrough, underline, and link are not supported.', ) subtitleTextPosition: Optional[TextPosition] = Field( None, description='The subtitle text position. This field is optional.' ) title: Optional[str] = Field(None, description='The title of the chart.') titleTextFormat: Optional[TextFormat] = Field( None, description='The title text format. Strikethrough, underline, and link are not supported.', ) titleTextPosition: Optional[TextPosition] = Field( None, description='The title text position. This field is optional.' ) treemapChart: Optional[TreemapChartSpec] = Field( None, description='A treemap chart specification.' ) waterfallChart: Optional[WaterfallChartSpec] = Field( None, description='A waterfall chart specification.' ) class EmbeddedChart(BaseModel): border: Optional[EmbeddedObjectBorder] = Field( None, description='The border of the chart.' ) chartId: Optional[int] = Field(None, description='The ID of the chart.') position: Optional[EmbeddedObjectPosition] = Field( None, description='The position of the chart.' ) spec: Optional[ChartSpec] = Field( None, description='The specification of the chart.' ) class Sheet(BaseModel): bandedRanges: Optional[List[BandedRange]] = Field( None, description='The banded (alternating colors) ranges on this sheet.' ) basicFilter: Optional[BasicFilter] = Field( None, description='The filter on this sheet, if any.' ) charts: Optional[List[EmbeddedChart]] = Field( None, description='The specifications of every chart on this sheet.' ) columnGroups: Optional[List[DimensionGroup]] = Field( None, description='All column groups on this sheet, ordered by increasing range start index, then by group depth.', ) conditionalFormats: Optional[List[ConditionalFormatRule]] = Field( None, description='The conditional format rules in this sheet.' ) data: Optional[List[GridData]] = Field( None, description='Data in the grid, if this is a grid sheet. The number of GridData objects returned is dependent on the number of ranges requested on this sheet. For example, if this is representing `Sheet1`, and the spreadsheet was requested with ranges `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a startRow/startColumn of `0`, while the second one will have `startRow 14` (zero-based row 15), and `startColumn 3` (zero-based column D). For a DATA_SOURCE sheet, you can not request a specific range, the GridData contains all the values.', ) developerMetadata: Optional[List[DeveloperMetadata]] = Field( None, description='The developer metadata associated with a sheet.' ) filterViews: Optional[List[FilterView]] = Field( None, description='The filter views in this sheet.' ) merges: Optional[List[GridRange]] = Field( None, description='The ranges that are merged together.' ) properties: Optional[SheetProperties] = Field( None, description='The properties of the sheet.' ) protectedRanges: Optional[List[ProtectedRange]] = Field( None, description='The protected ranges in this sheet.' ) rowGroups: Optional[List[DimensionGroup]] = Field( None, description='All row groups on this sheet, ordered by increasing range start index, then by group depth.', ) slicers: Optional[List[Slicer]] = Field( None, description='The slicers on this sheet.' ) class Spreadsheet(BaseModel): dataSourceSchedules: Optional[List[DataSourceRefreshSchedule]] = Field( None, description='Output only. A list of data source refresh schedules.' ) dataSources: Optional[List[DataSource]] = Field( None, description='A list of external data sources connected with the spreadsheet.', ) developerMetadata: Optional[List[DeveloperMetadata]] = Field( None, description='The developer metadata associated with a spreadsheet.' ) namedRanges: Optional[List[NamedRange]] = Field( None, description='The named ranges defined in a spreadsheet.' ) properties: Optional[SpreadsheetProperties] = Field( None, description='Overall properties of a spreadsheet.' ) sheets: Optional[List[Sheet]] = Field( None, description='The sheets that are part of a spreadsheet.' ) spreadsheetId: Optional[str] = Field( None, description='The ID of the spreadsheet. This field is read-only.' ) spreadsheetUrl: Optional[str] = Field( None, description='The url of the spreadsheet. This field is read-only.' ) class UpdateChartSpecRequest(BaseModel): chartId: Optional[int] = Field(None, description='The ID of the chart to update.') spec: Optional[ChartSpec] = Field( None, description='The specification to apply to the chart.' ) class AddChartRequest(BaseModel): chart: Optional[EmbeddedChart] = Field( None, description='The chart that should be added to the spreadsheet, including the position where it should be placed. The chartId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of an embedded object that already exists.)', ) class AddChartResponse(BaseModel): chart: Optional[EmbeddedChart] = Field(None, description='The newly added chart.') class Request(BaseModel): addBanding: Optional[AddBandingRequest] = Field( None, description='Adds a new banded range' ) addChart: Optional[AddChartRequest] = Field(None, description='Adds a chart.') addConditionalFormatRule: Optional[AddConditionalFormatRuleRequest] = Field( None, description='Adds a new conditional format rule.' ) addDataSource: Optional[AddDataSourceRequest] = Field( None, description='Adds a data source.' ) addDimensionGroup: Optional[AddDimensionGroupRequest] = Field( None, description='Creates a group over the specified range.' ) addFilterView: Optional[AddFilterViewRequest] = Field( None, description='Adds a filter view.' ) addNamedRange: Optional[AddNamedRangeRequest] = Field( None, description='Adds a named range.' ) addProtectedRange: Optional[AddProtectedRangeRequest] = Field( None, description='Adds a protected range.' ) addSheet: Optional[AddSheetRequest] = Field(None, description='Adds a sheet.') addSlicer: Optional[AddSlicerRequest] = Field(None, description='Adds a slicer.') appendCells: Optional[AppendCellsRequest] = Field( None, description='Appends cells after the last row with data in a sheet.' ) appendDimension: Optional[AppendDimensionRequest] = Field( None, description='Appends dimensions to the end of a sheet.' ) autoFill: Optional[AutoFillRequest] = Field( None, description='Automatically fills in more data based on existing data.' ) autoResizeDimensions: Optional[AutoResizeDimensionsRequest] = Field( None, description='Automatically resizes one or more dimensions based on the contents of the cells in that dimension.', ) clearBasicFilter: Optional[ClearBasicFilterRequest] = Field( None, description='Clears the basic filter on a sheet.' ) copyPaste: Optional[CopyPasteRequest] = Field( None, description='Copies data from one area and pastes it to another.' ) createDeveloperMetadata: Optional[CreateDeveloperMetadataRequest] = Field( None, description='Creates new developer metadata' ) cutPaste: Optional[CutPasteRequest] = Field( None, description='Cuts data from one area and pastes it to another.' ) deleteBanding: Optional[DeleteBandingRequest] = Field( None, description='Removes a banded range' ) deleteConditionalFormatRule: Optional[DeleteConditionalFormatRuleRequest] = Field( None, description='Deletes an existing conditional format rule.' ) deleteDataSource: Optional[DeleteDataSourceRequest] = Field( None, description='Deletes a data source.' ) deleteDeveloperMetadata: Optional[DeleteDeveloperMetadataRequest] = Field( None, description='Deletes developer metadata' ) deleteDimension: Optional[DeleteDimensionRequest] = Field( None, description='Deletes rows or columns in a sheet.' ) deleteDimensionGroup: Optional[DeleteDimensionGroupRequest] = Field( None, description='Deletes a group over the specified range.' ) deleteDuplicates: Optional[DeleteDuplicatesRequest] = Field( None, description='Removes rows containing duplicate values in specified columns of a cell range.', ) deleteEmbeddedObject: Optional[DeleteEmbeddedObjectRequest] = Field( None, description='Deletes an embedded object (e.g, chart, image) in a sheet.' ) deleteFilterView: Optional[DeleteFilterViewRequest] = Field( None, description='Deletes a filter view from a sheet.' ) deleteNamedRange: Optional[DeleteNamedRangeRequest] = Field( None, description='Deletes a named range.' ) deleteProtectedRange: Optional[DeleteProtectedRangeRequest] = Field( None, description='Deletes a protected range.' ) deleteRange: Optional[DeleteRangeRequest] = Field( None, description='Deletes a range of cells from a sheet, shifting the remaining cells.', ) deleteSheet: Optional[DeleteSheetRequest] = Field( None, description='Deletes a sheet.' ) duplicateFilterView: Optional[DuplicateFilterViewRequest] = Field( None, description='Duplicates a filter view.' ) duplicateSheet: Optional[DuplicateSheetRequest] = Field( None, description='Duplicates a sheet.' ) findReplace: Optional[FindReplaceRequest] = Field( None, description='Finds and replaces occurrences of some text with other text.' ) insertDimension: Optional[InsertDimensionRequest] = Field( None, description='Inserts new rows or columns in a sheet.' ) insertRange: Optional[InsertRangeRequest] = Field( None, description='Inserts new cells in a sheet, shifting the existing cells.' ) mergeCells: Optional[MergeCellsRequest] = Field( None, description='Merges cells together.' ) moveDimension: Optional[MoveDimensionRequest] = Field( None, description='Moves rows or columns to another location in a sheet.' ) pasteData: Optional[PasteDataRequest] = Field( None, description='Pastes data (HTML or delimited) into a sheet.' ) randomizeRange: Optional[RandomizeRangeRequest] = Field( None, description='Randomizes the order of the rows in a range.' ) refreshDataSource: Optional[RefreshDataSourceRequest] = Field( None, description='Refreshs one or multiple data sources and associated dbobjects.', ) repeatCell: Optional[RepeatCellRequest] = Field( None, description='Repeats a single cell across a range.' ) setBasicFilter: Optional[SetBasicFilterRequest] = Field( None, description='Sets the basic filter on a sheet.' ) setDataValidation: Optional[SetDataValidationRequest] = Field( None, description='Sets data validation for one or more cells.' ) sortRange: Optional[SortRangeRequest] = Field( None, description='Sorts data in a range.' ) textToColumns: Optional[TextToColumnsRequest] = Field( None, description='Converts a column of text into many columns of text.' ) trimWhitespace: Optional[TrimWhitespaceRequest] = Field( None, description='Trims cells of whitespace (such as spaces, tabs, or new lines).', ) unmergeCells: Optional[UnmergeCellsRequest] = Field( None, description='Unmerges merged cells.' ) updateBanding: Optional[UpdateBandingRequest] = Field( None, description='Updates a banded range' ) updateBorders: Optional[UpdateBordersRequest] = Field( None, description='Updates the borders in a range of cells.' ) updateCells: Optional[UpdateCellsRequest] = Field( None, description='Updates many cells at once.' ) updateChartSpec: Optional[UpdateChartSpecRequest] = Field( None, description="Updates a chart's specifications." ) updateConditionalFormatRule: Optional[UpdateConditionalFormatRuleRequest] = Field( None, description='Updates an existing conditional format rule.' ) updateDataSource: Optional[UpdateDataSourceRequest] = Field( None, description='Updates a data source.' ) updateDeveloperMetadata: Optional[UpdateDeveloperMetadataRequest] = Field( None, description='Updates an existing developer metadata entry' ) updateDimensionGroup: Optional[UpdateDimensionGroupRequest] = Field( None, description='Updates the state of the specified group.' ) updateDimensionProperties: Optional[UpdateDimensionPropertiesRequest] = Field( None, description="Updates dimensions' properties." ) updateEmbeddedObjectBorder: Optional[UpdateEmbeddedObjectBorderRequest] = Field( None, description="Updates an embedded object's border." ) updateEmbeddedObjectPosition: Optional[UpdateEmbeddedObjectPositionRequest] = Field( None, description="Updates an embedded object's (e.g. chart, image) position." ) updateFilterView: Optional[UpdateFilterViewRequest] = Field( None, description='Updates the properties of a filter view.' ) updateNamedRange: Optional[UpdateNamedRangeRequest] = Field( None, description='Updates a named range.' ) updateProtectedRange: Optional[UpdateProtectedRangeRequest] = Field( None, description='Updates a protected range.' ) updateSheetProperties: Optional[UpdateSheetPropertiesRequest] = Field( None, description="Updates a sheet's properties." ) updateSlicerSpec: Optional[UpdateSlicerSpecRequest] = Field( None, description="Updates a slicer's specifications." ) updateSpreadsheetProperties: Optional[UpdateSpreadsheetPropertiesRequest] = Field( None, description="Updates the spreadsheet's properties." ) class Response(BaseModel): addBanding: Optional[AddBandingResponse] = Field( None, description='A reply from adding a banded range.' ) addChart: Optional[AddChartResponse] = Field( None, description='A reply from adding a chart.' ) addDataSource: Optional[AddDataSourceResponse] = Field( None, description='A reply from adding a data source.' ) addDimensionGroup: Optional[AddDimensionGroupResponse] = Field( None, description='A reply from adding a dimension group.' ) addFilterView: Optional[AddFilterViewResponse] = Field( None, description='A reply from adding a filter view.' ) addNamedRange: Optional[AddNamedRangeResponse] = Field( None, description='A reply from adding a named range.' ) addProtectedRange: Optional[AddProtectedRangeResponse] = Field( None, description='A reply from adding a protected range.' ) addSheet: Optional[AddSheetResponse] = Field( None, description='A reply from adding a sheet.' ) addSlicer: Optional[AddSlicerResponse] = Field( None, description='A reply from adding a slicer.' ) createDeveloperMetadata: Optional[CreateDeveloperMetadataResponse] = Field( None, description='A reply from creating a developer metadata entry.' ) deleteConditionalFormatRule: Optional[DeleteConditionalFormatRuleResponse] = Field( None, description='A reply from deleting a conditional format rule.' ) deleteDeveloperMetadata: Optional[DeleteDeveloperMetadataResponse] = Field( None, description='A reply from deleting a developer metadata entry.' ) deleteDimensionGroup: Optional[DeleteDimensionGroupResponse] = Field( None, description='A reply from deleting a dimension group.' ) deleteDuplicates: Optional[DeleteDuplicatesResponse] = Field( None, description='A reply from removing rows containing duplicate values.' ) duplicateFilterView: Optional[DuplicateFilterViewResponse] = Field( None, description='A reply from duplicating a filter view.' ) duplicateSheet: Optional[DuplicateSheetResponse] = Field( None, description='A reply from duplicating a sheet.' ) findReplace: Optional[FindReplaceResponse] = Field( None, description='A reply from doing a find/replace.' ) refreshDataSource: Optional[RefreshDataSourceResponse] = Field( None, description='A reply from refreshing data source objects.' ) trimWhitespace: Optional[TrimWhitespaceResponse] = Field( None, description='A reply from trimming whitespace.' ) updateConditionalFormatRule: Optional[UpdateConditionalFormatRuleResponse] = Field( None, description='A reply from updating a conditional format rule.' ) updateDataSource: Optional[UpdateDataSourceResponse] = Field( None, description='A reply from updating a data source.' ) updateDeveloperMetadata: Optional[UpdateDeveloperMetadataResponse] = Field( None, description='A reply from updating a developer metadata entry.' ) updateEmbeddedObjectPosition: Optional[UpdateEmbeddedObjectPositionResponse] = ( Field(None, description="A reply from updating an embedded object's position.") ) class BatchUpdateSpreadsheetRequest(BaseModel): includeSpreadsheetInResponse: Optional[bool] = Field( None, description='Determines if the update response should include the spreadsheet resource.', ) requests: Optional[List[Request]] = Field( None, description='A list of updates to apply to the spreadsheet. Requests will be applied in the order they are specified. If any request is not valid, no requests will be applied.', ) responseIncludeGridData: Optional[bool] = Field( None, description="True if grid data should be returned. Meaningful only if include_spreadsheet_in_response is 'true'. This parameter is ignored if a field mask was set in the request.", ) responseRanges: Optional[List[str]] = Field( None, description="Limits the ranges included in the response spreadsheet. Meaningful only if include_spreadsheet_in_response is 'true'.", ) class BatchUpdateSpreadsheetResponse(BaseModel): replies: Optional[List[Response]] = Field( None, description='The reply of the updates. This maps 1:1 with the updates, although replies to some requests may be empty.', ) spreadsheetId: Optional[str] = Field( None, description='The spreadsheet the updates were applied to.' ) updatedSpreadsheet: Optional[Spreadsheet] = Field( None, description='The spreadsheet after updates were applied. This is only set if BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response is `true`.', )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ag2-mcp-servers/google-sheets-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server