UNPKG

googleapis

Version:
1,126 lines 236 kB
/** * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { OAuth2Client, JWT, Compute, UserRefreshClient } from 'google-auth-library'; import { GoogleConfigurable, MethodOptions, GlobalOptions, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { GaxiosPromise } from 'gaxios'; export declare namespace sheets_v4 { interface Options extends GlobalOptions { version: 'v4'; } interface StandardParameters { /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Google Sheets API * * Reads and writes Google Sheets. * * @example * const {google} = require('googleapis'); * const sheets = google.sheets('v4'); * * @namespace sheets * @type {Function} * @version v4 * @variation v4 * @param {object=} options Options for Sheets */ class Sheets { context: APIRequestContext; spreadsheets: Resource$Spreadsheets; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * Adds a new banded range to the spreadsheet. */ interface Schema$AddBandingRequest { /** * 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.) */ bandedRange?: Schema$BandedRange; } /** * The result of adding a banded range. */ interface Schema$AddBandingResponse { /** * The banded range that was added. */ bandedRange?: Schema$BandedRange; } /** * Adds a chart to a sheet in the spreadsheet. */ interface Schema$AddChartRequest { /** * 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.) */ chart?: Schema$EmbeddedChart; } /** * The result of adding a chart to a spreadsheet. */ interface Schema$AddChartResponse { /** * The newly added chart. */ chart?: Schema$EmbeddedChart; } /** * Adds a new conditional format rule at the given index. All subsequent rules' indexes are incremented. */ interface Schema$AddConditionalFormatRuleRequest { /** * The zero-based index where the rule should be inserted. */ index?: number; /** * The rule to add. */ rule?: Schema$ConditionalFormatRule; } /** * Creates a group over the specified range. If the requested range is a superset of the range of an existing group G, then the depth of G is incremented and this new group G' has the depth of that group. For example, a group [C:D, depth 1] + [B:E] results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested range is a subset of the range of an existing group G, then the depth of the new group G' becomes one greater than the depth of G. For example, a group [B:E, depth 1] + [C:D] results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested range starts before and ends within, or starts within and ends after, the range of an existing group G, then the range of the existing group G becomes the union of the ranges, and the new group G' has depth one greater than the depth of G and range as the intersection of the ranges. For example, a group [B:D, depth 1] + [C:E] results in groups [B:E, depth 1] and [C:D, depth 2]. */ interface Schema$AddDimensionGroupRequest { /** * The range over which to create a group. */ range?: Schema$DimensionRange; } /** * The result of adding a group. */ interface Schema$AddDimensionGroupResponse { /** * All groups of a dimension after adding a group to that dimension. */ dimensionGroups?: Schema$DimensionGroup[]; } /** * Adds a filter view. */ interface Schema$AddFilterViewRequest { /** * 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.) */ filter?: Schema$FilterView; } /** * The result of adding a filter view. */ interface Schema$AddFilterViewResponse { /** * The newly added filter view. */ filter?: Schema$FilterView; } /** * Adds a named range to the spreadsheet. */ interface Schema$AddNamedRangeRequest { /** * 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.) */ namedRange?: Schema$NamedRange; } /** * The result of adding a named range. */ interface Schema$AddNamedRangeResponse { /** * The named range to add. */ namedRange?: Schema$NamedRange; } /** * Adds a new protected range. */ interface Schema$AddProtectedRangeRequest { /** * 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.) */ protectedRange?: Schema$ProtectedRange; } /** * The result of adding a new protected range. */ interface Schema$AddProtectedRangeResponse { /** * The newly added protected range. */ protectedRange?: Schema$ProtectedRange; } /** * Adds a new sheet. When a sheet is added at a given index, all subsequent sheets' indexes are incremented. To add an object sheet, use AddChartRequest instead and specify EmbeddedObjectPosition.sheetId or EmbeddedObjectPosition.newSheet. */ interface Schema$AddSheetRequest { /** * 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.) */ properties?: Schema$SheetProperties; } /** * The result of adding a sheet. */ interface Schema$AddSheetResponse { /** * The properties of the newly added sheet. */ properties?: Schema$SheetProperties; } /** * Adds new cells after the last row with data in a sheet, inserting new rows into the sheet if necessary. */ interface Schema$AppendCellsRequest { /** * 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. */ fields?: string; /** * The data to append. */ rows?: Schema$RowData[]; /** * The sheet ID to append the data to. */ sheetId?: number; } /** * Appends rows or columns to the end of a sheet. */ interface Schema$AppendDimensionRequest { /** * Whether rows or columns should be appended. */ dimension?: string; /** * The number of rows or columns to append. */ length?: number; /** * The sheet to append rows or columns to. */ sheetId?: number; } /** * The response when updating a range of values in a spreadsheet. */ interface Schema$AppendValuesResponse { /** * The spreadsheet the updates were applied to. */ spreadsheetId?: string; /** * 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. */ tableRange?: string; /** * Information about the updates that were applied. */ updates?: Schema$UpdateValuesResponse; } /** * Fills in more data based on existing data. */ interface Schema$AutoFillRequest { /** * 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. */ range?: Schema$GridRange; /** * The source and destination areas to autofill. This explicitly lists the source of the autofill and where to extend that data. */ sourceAndDestination?: Schema$SourceAndDestination; /** * True if we should generate data with the "alternate" series. This differs based on the type and amount of source data. */ useAlternateSeries?: boolean; } /** * Automatically resizes one or more dimensions based on the contents of the cells in that dimension. */ interface Schema$AutoResizeDimensionsRequest { /** * The dimensions to automatically resize. */ dimensions?: Schema$DimensionRange; } /** * A banded (alternating colors) range in a sheet. */ interface Schema$BandedRange { /** * The id of the banded range. */ bandedRangeId?: number; /** * 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. */ columnProperties?: Schema$BandingProperties; /** * The range over which these properties are applied. */ range?: Schema$GridRange; /** * 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. */ rowProperties?: Schema$BandingProperties; } /** * Properties referring a single dimension (either row or column). If both BandedRange.row_properties and BandedRange.column_properties are set, the fill colors are applied to cells according to the following rules: * header_color and footer_color take priority over band colors. * first_band_color takes priority over second_band_color. * row_properties takes priority over column_properties. For example, the first row color takes priority over the first column color, but the first column color takes priority over the second row color. Similarly, the row header takes priority over the column header in the top left cell, but the column header takes priority over the first row color if the row header is not set. */ interface Schema$BandingProperties { /** * The first color that is alternating. (Required) */ firstBandColor?: Schema$Color; /** * The color of the last row or column. If this field is not set, the last row or column will be filled with either first_band_color or second_band_color, depending on the color of the previous row or column. */ footerColor?: Schema$Color; /** * The color of the first row or column. If this field is set, the first row or column will be filled with this color and the colors will alternate between first_band_color and second_band_color starting from the second row or column. Otherwise, the first row or column will be filled with first_band_color and the colors will proceed to alternate as they normally would. */ headerColor?: Schema$Color; /** * The second color that is alternating. (Required) */ secondBandColor?: Schema$Color; } /** * An axis of the chart. A chart may not have more than one axis per axis position. */ interface Schema$BasicChartAxis { /** * The format of the title. Only valid if the axis is not associated with the domain. */ format?: Schema$TextFormat; /** * The position of this axis. */ position?: string; /** * The title of this axis. If set, this overrides any title inferred from headers of the data. */ title?: string; /** * The axis title text position. */ titleTextPosition?: Schema$TextPosition; } /** * The domain of a chart. For example, if charting stock prices over time, this would be the date. */ interface Schema$BasicChartDomain { /** * The data of the domain. For example, if charting stock prices over time, this is the data representing the dates. */ domain?: Schema$ChartData; /** * True to reverse the order of the domain values (horizontal axis). */ reversed?: boolean; } /** * A single series of data in a chart. For example, if charting stock prices over time, multiple series may exist, one for the "Open Price", "High Price", "Low Price" and "Close Price". */ interface Schema$BasicChartSeries { /** * The color for elements (i.e. bars, lines, points) associated with this series. If empty, a default color is used. */ color?: Schema$Color; /** * 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. */ lineStyle?: Schema$LineStyle; /** * The data being visualized in this chart series. */ series?: Schema$ChartData; /** * 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. */ targetAxis?: string; /** * 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. */ type?: string; } /** * The specification for a basic chart. See BasicChartType for the list of charts this supports. */ interface Schema$BasicChartSpec { /** * The axis on the chart. */ axis?: Schema$BasicChartAxis[]; /** * The type of the chart. */ chartType?: string; /** * The behavior of tooltips and data highlighting when hovering on data and chart area. */ compareMode?: string; /** * The domain of data this is charting. Only a single domain is supported. */ domains?: Schema$BasicChartDomain[]; /** * 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.) */ headerCount?: number; /** * 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. */ interpolateNulls?: boolean; /** * The position of the chart legend. */ legendPosition?: string; /** * Gets whether all lines should be rendered smooth or straight by default. Applies to Line charts. */ lineSmoothing?: boolean; /** * The data this chart is visualizing. */ series?: Schema$BasicChartSeries[]; /** * The stacked type for charts that support vertical stacking. Applies to Area, Bar, Column, Combo, and Stepped Area charts. */ stackedType?: string; /** * True to make the chart 3D. Applies to Bar and Column charts. */ threeDimensional?: boolean; } /** * The default filter associated with a sheet. */ interface Schema$BasicFilter { /** * 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. */ criteria?: { [key: string]: Schema$FilterCriteria; }; /** * The range the filter covers. */ range?: Schema$GridRange; /** * The sort order per column. Later specifications are used when values are equal in the earlier specifications. */ sortSpecs?: Schema$SortSpec[]; } /** * The request for clearing more than one range selected by a DataFilter in a spreadsheet. */ interface Schema$BatchClearValuesByDataFilterRequest { /** * The DataFilters used to determine which ranges to clear. */ dataFilters?: Schema$DataFilter[]; } /** * The response when clearing a range of values selected with DataFilters in a spreadsheet. */ interface Schema$BatchClearValuesByDataFilterResponse { /** * The ranges that were cleared, in A1 notation. (If the requests were for an unbounded range or a ranger larger than the bounds of the sheet, this will be the actual ranges that were cleared, bounded to the sheet's limits.) */ clearedRanges?: string[]; /** * The spreadsheet the updates were applied to. */ spreadsheetId?: string; } /** * The request for clearing more than one range of values in a spreadsheet. */ interface Schema$BatchClearValuesRequest { /** * The ranges to clear, in A1 notation. */ ranges?: string[]; } /** * The response when clearing a range of values in a spreadsheet. */ interface Schema$BatchClearValuesResponse { /** * The ranges that were cleared, in A1 notation. (If the requests were for an unbounded range or a ranger larger than the bounds of the sheet, this will be the actual ranges that were cleared, bounded to the sheet's limits.) */ clearedRanges?: string[]; /** * The spreadsheet the updates were applied to. */ spreadsheetId?: string; } /** * The request for retrieving a range of values in a spreadsheet selected by a set of DataFilters. */ interface Schema$BatchGetValuesByDataFilterRequest { /** * The data filters used to match the ranges of values to retrieve. Ranges that match any of the specified data filters will be included in the response. */ dataFilters?: Schema$DataFilter[]; /** * 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 [DateTimeRenderOption.SERIAL_NUMBER]. */ dateTimeRenderOption?: string; /** * 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` will return `[[1,2],[3,4]]`, whereas a request that sets `majorDimension=COLUMNS` will return `[[1,3],[2,4]]`. */ majorDimension?: string; /** * How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE. */ valueRenderOption?: string; } /** * The response when retrieving more than one range of values in a spreadsheet selected by DataFilters. */ interface Schema$BatchGetValuesByDataFilterResponse { /** * The ID of the spreadsheet the data was retrieved from. */ spreadsheetId?: string; /** * The requested values with the list of data filters that matched them. */ valueRanges?: Schema$MatchedValueRange[]; } /** * The response when retrieving more than one range of values in a spreadsheet. */ interface Schema$BatchGetValuesResponse { /** * The ID of the spreadsheet the data was retrieved from. */ spreadsheetId?: string; /** * The requested values. The order of the ValueRanges is the same as the order of the requested ranges. */ valueRanges?: Schema$ValueRange[]; } /** * The request for updating any aspect of a spreadsheet. */ interface Schema$BatchUpdateSpreadsheetRequest { /** * Determines if the update response should include the spreadsheet resource. */ includeSpreadsheetInResponse?: boolean; /** * 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. */ requests?: Schema$Request[]; /** * True if grid data should be returned. Meaningful only if if include_spreadsheet_in_response is 'true'. This parameter is ignored if a field mask was set in the request. */ responseIncludeGridData?: boolean; /** * Limits the ranges included in the response spreadsheet. Meaningful only if include_spreadsheet_response is 'true'. */ responseRanges?: string[]; } /** * The reply for batch updating a spreadsheet. */ interface Schema$BatchUpdateSpreadsheetResponse { /** * The reply of the updates. This maps 1:1 with the updates, although replies to some requests may be empty. */ replies?: Schema$Response[]; /** * The spreadsheet the updates were applied to. */ spreadsheetId?: string; /** * The spreadsheet after updates were applied. This is only set if [BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is `true`. */ updatedSpreadsheet?: Schema$Spreadsheet; } /** * The request for updating more than one range of values in a spreadsheet. */ interface Schema$BatchUpdateValuesByDataFilterRequest { /** * The new values to apply to the spreadsheet. If more than one range is matched by the specified DataFilter the specified values will be applied to all of those ranges. */ data?: Schema$DataFilterValueRange[]; /** * 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 will contain the updated values. If the range to write was larger than than the range actually written, the response will include all values in the requested range (excluding trailing empty rows and columns). */ includeValuesInResponse?: boolean; /** * 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 DateTimeRenderOption.SERIAL_NUMBER. */ responseDateTimeRenderOption?: string; /** * Determines how values in the response should be rendered. The default render option is ValueRenderOption.FORMATTED_VALUE. */ responseValueRenderOption?: string; /** * How the input data should be interpreted. */ valueInputOption?: string; } /** * The response when updating a range of values in a spreadsheet. */ interface Schema$BatchUpdateValuesByDataFilterResponse { /** * The response for each range updated. */ responses?: Schema$UpdateValuesByDataFilterResponse[]; /** * The spreadsheet the updates were applied to. */ spreadsheetId?: string; /** * The total number of cells updated. */ totalUpdatedCells?: number; /** * The total number of columns where at least one cell in the column was updated. */ totalUpdatedColumns?: number; /** * The total number of rows where at least one cell in the row was updated. */ totalUpdatedRows?: number; /** * The total number of sheets where at least one cell in the sheet was updated. */ totalUpdatedSheets?: number; } /** * The request for updating more than one range of values in a spreadsheet. */ interface Schema$BatchUpdateValuesRequest { /** * The new values to apply to the spreadsheet. */ data?: Schema$ValueRange[]; /** * 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 will contain the updated values. If the range to write was larger than than the range actually written, the response will include all values in the requested range (excluding trailing empty rows and columns). */ includeValuesInResponse?: boolean; /** * 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 DateTimeRenderOption.SERIAL_NUMBER. */ responseDateTimeRenderOption?: string; /** * Determines how values in the response should be rendered. The default render option is ValueRenderOption.FORMATTED_VALUE. */ responseValueRenderOption?: string; /** * How the input data should be interpreted. */ valueInputOption?: string; } /** * The response when updating a range of values in a spreadsheet. */ interface Schema$BatchUpdateValuesResponse { /** * One UpdateValuesResponse per requested range, in the same order as the requests appeared. */ responses?: Schema$UpdateValuesResponse[]; /** * The spreadsheet the updates were applied to. */ spreadsheetId?: string; /** * The total number of cells updated. */ totalUpdatedCells?: number; /** * The total number of columns where at least one cell in the column was updated. */ totalUpdatedColumns?: number; /** * The total number of rows where at least one cell in the row was updated. */ totalUpdatedRows?: number; /** * The total number of sheets where at least one cell in the sheet was updated. */ totalUpdatedSheets?: number; } /** * A condition that can evaluate to true or false. BooleanConditions are used by conditional formatting, data validation, and the criteria in filters. */ interface Schema$BooleanCondition { /** * The type of condition. */ type?: string; /** * 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. */ values?: Schema$ConditionValue[]; } /** * A rule that may or may not match, depending on the condition. */ interface Schema$BooleanRule { /** * The condition of the rule. If the condition evaluates to true, the format is applied. */ condition?: Schema$BooleanCondition; /** * The format to apply. Conditional formatting can only apply a subset of formatting: bold, italic, strikethrough, foreground color & background color. */ format?: Schema$CellFormat; } /** * A border along a cell. */ interface Schema$Border { /** * The color of the border. */ color?: Schema$Color; /** * The style of the border. */ style?: string; /** * The width of the border, in pixels. Deprecated; the width is determined by the "style" field. */ width?: number; } /** * The borders of the cell. */ interface Schema$Borders { /** * The bottom border of the cell. */ bottom?: Schema$Border; /** * The left border of the cell. */ left?: Schema$Border; /** * The right border of the cell. */ right?: Schema$Border; /** * The top border of the cell. */ top?: Schema$Border; } /** * A <a href="/chart/interactive/docs/gallery/bubblechart">bubble chart</a>. */ interface Schema$BubbleChartSpec { /** * The bubble border color. */ bubbleBorderColor?: Schema$Color; /** * The data containing the bubble labels. These do not need to be unique. */ bubbleLabels?: Schema$ChartData; /** * The max radius size of the bubbles, in pixels. If specified, the field must be a positive value. */ bubbleMaxRadiusSize?: number; /** * The minimum radius size of the bubbles, in pixels. If specific, the field must be a positive value. */ bubbleMinRadiusSize?: number; /** * The opacity of the bubbles between 0 and 1.0. 0 is fully transparent and 1 is fully opaque. */ bubbleOpacity?: number; /** * The data contianing 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. */ bubbleSizes?: Schema$ChartData; /** * The format of the text inside the bubbles. Underline and Strikethrough are not supported. */ bubbleTextStyle?: Schema$TextFormat; /** * The data containing the bubble x-values. These values locate the bubbles in the chart horizontally. */ domain?: Schema$ChartData; /** * 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. */ groupIds?: Schema$ChartData; /** * Where the legend of the chart should be drawn. */ legendPosition?: string; /** * The data contianing the bubble y-values. These values locate the bubbles in the chart vertically. */ series?: Schema$ChartData; } /** * A <a href="/chart/interactive/docs/gallery/candlestickchart">candlestick chart</a>. */ interface Schema$CandlestickChartSpec { /** * The Candlestick chart data. Only one CandlestickData is supported. */ data?: Schema$CandlestickData[]; /** * 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. */ domain?: Schema$CandlestickDomain; } /** * The Candlestick chart data, each containing the low, open, close, and high values for a series. */ interface Schema$CandlestickData { /** * 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. */ closeSeries?: Schema$CandlestickSeries; /** * The range data (vertical axis) for the high/maximum value for each candle. This is the top of the candle's center line. */ highSeries?: Schema$CandlestickSeries; /** * The range data (vertical axis) for the low/minimum value for each candle. This is the bottom of the candle's center line. */ lowSeries?: Schema$CandlestickSeries; /** * 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. */ openSeries?: Schema$CandlestickSeries; } /** * The domain of a CandlestickChart. */ interface Schema$CandlestickDomain { /** * The data of the CandlestickDomain. */ data?: Schema$ChartData; /** * True to reverse the order of the domain values (horizontal axis). */ reversed?: boolean; } /** * The series of a CandlestickData. */ interface Schema$CandlestickSeries { /** * The data of the CandlestickSeries. */ data?: Schema$ChartData; } /** * Data about a specific cell. */ interface Schema$CellData { /** * A data validation rule on the cell, if any. When writing, the new data validation rule will overwrite any prior rule. */ dataValidation?: Schema$DataValidationRule; /** * 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. */ effectiveFormat?: Schema$CellFormat; /** * 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. */ effectiveValue?: Schema$ExtendedValue; /** * The formatted value of the cell. This is the value as it's shown to the user. This field is read-only. */ formattedValue?: string; /** * A hyperlink this cell points to, if any. This field is read-only. (To set it, use a `=HYPERLINK` formula in the userEnteredValue.formulaValue field.) */ hyperlink?: string; /** * Any note on the cell. */ note?: string; /** * 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. */ pivotTable?: Schema$PivotTable; /** * Runs of rich text applied to subsections of the cell. Runs are only valid on user entered strings, not formulas, bools, or numbers. Runs start at specific indexes in the text and continue until the next run. Properties of a run will continue unless explicitly changed in a subsequent run (and properties of the first run will continue 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. */ textFormatRuns?: Schema$TextFormatRun[]; /** * The format the user entered for the cell. When writing, the new format will be merged with the existing format. */ userEnteredFormat?: Schema$CellFormat; /** * 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. */ userEnteredValue?: Schema$ExtendedValue; } /** * The format of a cell. */ interface Schema$CellFormat { /** * The background color of the cell. */ backgroundColor?: Schema$Color; /** * The borders of the cell. */ borders?: Schema$Borders; /** * The horizontal alignment of the value in the cell. */ horizontalAlignment?: string; /** * How a hyperlink, if it exists, should be displayed in the cell. */ hyperlinkDisplayType?: string; /** * A format describing how number values should be represented to the user. */ numberFormat?: Schema$NumberFormat; /** * The padding of the cell. */ padding?: Schema$Padding; /** * The direction of the text in the cell. */ textDirection?: string; /** * The format of the text in the cell (unless overridden by a format run). */ textFormat?: Schema$TextFormat; /** * The rotation applied to text in a cell */ textRotation?: Schema$TextRotation; /** * The vertical alignment of the value in the cell. */ verticalAlignment?: string; /** * The wrap strategy for the value in the cell. */ wrapStrategy?: string; } /** * The data included in a domain or series. */ interface Schema$ChartData { /** * The source ranges of the data. */ sourceRange?: Schema$ChartSourceRange; } /** * Source ranges for a chart. */ interface Schema$ChartSourceRange { /** * 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 */ sources?: Schema$GridRange[]; } /** * The specifications of a chart. */ interface Schema$ChartSpec { /** * The alternative text that describes the chart. This is often used for accessibility. */ altText?: string; /** * The background color of the entire chart. Not applicable to Org charts. */ backgroundColor?: Schema$Color; /** * A basic chart specification, can be one of many kinds of charts. See BasicChartType for the list of all charts this supports. */ basicChart?: Schema$BasicChartSpec; /** * A bubble chart specification. */ bubbleChart?: Schema$BubbleChartSpec; /** * A candlestick chart specification. */ candlestickChart?: Schema$CandlestickChartSpec; /** * 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. */ fontName?: string; /** * Determines how the charts will use hidden rows or columns. */ hiddenDimensionStrategy?: string; /** * A histogram chart specification. */ histogramChart?: Schema$HistogramChartSpec; /** * 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.) */ maximized?: boolean; /** * An org chart specification. */ orgChart?: Schema$OrgChartSpec; /** * A pie chart specification. */ pieChart?: Schema$PieChartSpec; /** * The subtitle of the chart. */ subtitle?: string; /** * The subtitle text format. Strikethrough and underline are not supported. */ subtitleTextFormat?: Schema$TextFormat; /** * The subtitle text position. This field is optional. */ subtitleTextPosition?: Schema$TextPosition; /** * The title of the chart. */ title?: string; /** * The title text format. Strikethrough and underline are not supported. */ titleTextFormat?: Schema$TextFormat; /** * The title text position. This field is optional. */ titleTextPosition?: Schema$TextPosition; /** * A treemap chart specification. */ treemapChart?: Schema$TreemapChartSpec; /** * A waterfall chart specification. */ waterfallChart?: Schema$WaterfallChartSpec; } /** * Clears the basic filter, if any exists on the sheet. */ interface Schema$ClearBasicFilterRequest { /** * The sheet ID on which the basic filter should be cleared. */ sheetId?: number; } /** * The request for clearing a range of values in a spreadsheet. */ interface Schema$ClearValuesRequest { } /** * The response when clearing a range of values in a spreadsheet. */ interface Schema$ClearValuesResponse { /** * 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.) */ clearedRange?: string; /** * The spreadsheet the updates were applied to. */ spreadsheetId?: string; } /** * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of "java.awt.Color" in Java; it can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" method in iOS; and, with just a little work, it can be easily formatted into a CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ... */ interface Schema$Color { /** * 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 to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0). */ alpha?: number; /** * The amount of blue in the color as a value in the interval [0, 1]. */ blue?: number; /** * The amount of green in the color as a value in the interval [0, 1]. */ green?: number; /** * The amount of red in the color as a value in the interval [0, 1]. */ red?: number; } /** * A rule describing a conditional format. */ interface Schema$ConditionalFormatRule { /** * The formatting is either &q