OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.sheets.v4; | 3 library googleapis.sheets.v4; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 * | 304 * |
305 * [request] - The metadata request object. | 305 * [request] - The metadata request object. |
306 * | 306 * |
307 * Request parameters: | 307 * Request parameters: |
308 * | 308 * |
309 * [spreadsheetId] - The ID of the spreadsheet to update. | 309 * [spreadsheetId] - The ID of the spreadsheet to update. |
310 * | 310 * |
311 * [range] - The A1 notation of a range to search for a logical table of data. | 311 * [range] - The A1 notation of a range to search for a logical table of data. |
312 * Values will be appended after the last row of the table. | 312 * Values will be appended after the last row of the table. |
313 * | 313 * |
| 314 * [responseDateTimeRenderOption] - Determines how dates, times, and durations |
| 315 * in the response should be |
| 316 * rendered. This is ignored if response_value_render_option is |
| 317 * FORMATTED_VALUE. |
| 318 * The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. |
| 319 * Possible string values are: |
| 320 * - "SERIAL_NUMBER" : A SERIAL_NUMBER. |
| 321 * - "FORMATTED_STRING" : A FORMATTED_STRING. |
| 322 * |
| 323 * [includeValuesInResponse] - Determines if the update response should |
| 324 * include the values |
| 325 * of the cells that were appended. By default, responses |
| 326 * do not include the updated values. |
| 327 * |
314 * [responseValueRenderOption] - Determines how values in the response should | 328 * [responseValueRenderOption] - Determines how values in the response should |
315 * be rendered. | 329 * be rendered. |
316 * The default render option is ValueRenderOption.FORMATTED_VALUE. | 330 * The default render option is ValueRenderOption.FORMATTED_VALUE. |
317 * Possible string values are: | 331 * Possible string values are: |
318 * - "FORMATTED_VALUE" : A FORMATTED_VALUE. | 332 * - "FORMATTED_VALUE" : A FORMATTED_VALUE. |
319 * - "UNFORMATTED_VALUE" : A UNFORMATTED_VALUE. | 333 * - "UNFORMATTED_VALUE" : A UNFORMATTED_VALUE. |
320 * - "FORMULA" : A FORMULA. | 334 * - "FORMULA" : A FORMULA. |
321 * | 335 * |
322 * [insertDataOption] - How the input data should be inserted. | 336 * [insertDataOption] - How the input data should be inserted. |
323 * Possible string values are: | 337 * Possible string values are: |
324 * - "OVERWRITE" : A OVERWRITE. | 338 * - "OVERWRITE" : A OVERWRITE. |
325 * - "INSERT_ROWS" : A INSERT_ROWS. | 339 * - "INSERT_ROWS" : A INSERT_ROWS. |
326 * | 340 * |
327 * [valueInputOption] - How the input data should be interpreted. | 341 * [valueInputOption] - How the input data should be interpreted. |
328 * Possible string values are: | 342 * Possible string values are: |
329 * - "INPUT_VALUE_OPTION_UNSPECIFIED" : A INPUT_VALUE_OPTION_UNSPECIFIED. | 343 * - "INPUT_VALUE_OPTION_UNSPECIFIED" : A INPUT_VALUE_OPTION_UNSPECIFIED. |
330 * - "RAW" : A RAW. | 344 * - "RAW" : A RAW. |
331 * - "USER_ENTERED" : A USER_ENTERED. | 345 * - "USER_ENTERED" : A USER_ENTERED. |
332 * | 346 * |
333 * [responseDateTimeRenderOption] - Determines how dates, times, and durations | |
334 * in the response should be | |
335 * rendered. This is ignored if response_value_render_option is | |
336 * FORMATTED_VALUE. | |
337 * The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. | |
338 * Possible string values are: | |
339 * - "SERIAL_NUMBER" : A SERIAL_NUMBER. | |
340 * - "FORMATTED_STRING" : A FORMATTED_STRING. | |
341 * | |
342 * [includeValuesInResponse] - Determines if the update response should | |
343 * include the values | |
344 * of the cells that were appended. By default, responses | |
345 * do not include the updated values. | |
346 * | |
347 * Completes with a [AppendValuesResponse]. | 347 * Completes with a [AppendValuesResponse]. |
348 * | 348 * |
349 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 349 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
350 * error. | 350 * error. |
351 * | 351 * |
352 * If the used [http.Client] completes with an error when making a REST call, | 352 * If the used [http.Client] completes with an error when making a REST call, |
353 * this method will complete with the same error. | 353 * this method will complete with the same error. |
354 */ | 354 */ |
355 async.Future<AppendValuesResponse> append(ValueRange request, core.String spre
adsheetId, core.String range, {core.String responseValueRenderOption, core.Strin
g insertDataOption, core.String valueInputOption, core.String responseDateTimeRe
nderOption, core.bool includeValuesInResponse}) { | 355 async.Future<AppendValuesResponse> append(ValueRange request, core.String spre
adsheetId, core.String range, {core.String responseDateTimeRenderOption, core.bo
ol includeValuesInResponse, core.String responseValueRenderOption, core.String i
nsertDataOption, core.String valueInputOption}) { |
356 var _url = null; | 356 var _url = null; |
357 var _queryParams = new core.Map(); | 357 var _queryParams = new core.Map(); |
358 var _uploadMedia = null; | 358 var _uploadMedia = null; |
359 var _uploadOptions = null; | 359 var _uploadOptions = null; |
360 var _downloadOptions = commons.DownloadOptions.Metadata; | 360 var _downloadOptions = commons.DownloadOptions.Metadata; |
361 var _body = null; | 361 var _body = null; |
362 | 362 |
363 if (request != null) { | 363 if (request != null) { |
364 _body = convert.JSON.encode((request).toJson()); | 364 _body = convert.JSON.encode((request).toJson()); |
365 } | 365 } |
366 if (spreadsheetId == null) { | 366 if (spreadsheetId == null) { |
367 throw new core.ArgumentError("Parameter spreadsheetId is required."); | 367 throw new core.ArgumentError("Parameter spreadsheetId is required."); |
368 } | 368 } |
369 if (range == null) { | 369 if (range == null) { |
370 throw new core.ArgumentError("Parameter range is required."); | 370 throw new core.ArgumentError("Parameter range is required."); |
371 } | 371 } |
| 372 if (responseDateTimeRenderOption != null) { |
| 373 _queryParams["responseDateTimeRenderOption"] = [responseDateTimeRenderOpti
on]; |
| 374 } |
| 375 if (includeValuesInResponse != null) { |
| 376 _queryParams["includeValuesInResponse"] = ["${includeValuesInResponse}"]; |
| 377 } |
372 if (responseValueRenderOption != null) { | 378 if (responseValueRenderOption != null) { |
373 _queryParams["responseValueRenderOption"] = [responseValueRenderOption]; | 379 _queryParams["responseValueRenderOption"] = [responseValueRenderOption]; |
374 } | 380 } |
375 if (insertDataOption != null) { | 381 if (insertDataOption != null) { |
376 _queryParams["insertDataOption"] = [insertDataOption]; | 382 _queryParams["insertDataOption"] = [insertDataOption]; |
377 } | 383 } |
378 if (valueInputOption != null) { | 384 if (valueInputOption != null) { |
379 _queryParams["valueInputOption"] = [valueInputOption]; | 385 _queryParams["valueInputOption"] = [valueInputOption]; |
380 } | 386 } |
381 if (responseDateTimeRenderOption != null) { | |
382 _queryParams["responseDateTimeRenderOption"] = [responseDateTimeRenderOpti
on]; | |
383 } | |
384 if (includeValuesInResponse != null) { | |
385 _queryParams["includeValuesInResponse"] = ["${includeValuesInResponse}"]; | |
386 } | |
387 | 387 |
388 _url = 'v4/spreadsheets/' + commons.Escaper.ecapeVariable('$spreadsheetId')
+ '/values/' + commons.Escaper.ecapeVariable('$range') + ':append'; | 388 _url = 'v4/spreadsheets/' + commons.Escaper.ecapeVariable('$spreadsheetId')
+ '/values/' + commons.Escaper.ecapeVariable('$range') + ':append'; |
389 | 389 |
390 var _response = _requester.request(_url, | 390 var _response = _requester.request(_url, |
391 "POST", | 391 "POST", |
392 body: _body, | 392 body: _body, |
393 queryParams: _queryParams, | 393 queryParams: _queryParams, |
394 uploadOptions: _uploadOptions, | 394 uploadOptions: _uploadOptions, |
395 uploadMedia: _uploadMedia, | 395 uploadMedia: _uploadMedia, |
396 downloadOptions: _downloadOptions); | 396 downloadOptions: _downloadOptions); |
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1663 * - "COLUMN" : A <a href="/chart/interactive/docs/gallery/columnchart">column | 1663 * - "COLUMN" : A <a href="/chart/interactive/docs/gallery/columnchart">column |
1664 * chart</a>. | 1664 * chart</a>. |
1665 * - "SCATTER" : A <a | 1665 * - "SCATTER" : A <a |
1666 * href="/chart/interactive/docs/gallery/scatterchart">scatter chart</a>. | 1666 * href="/chart/interactive/docs/gallery/scatterchart">scatter chart</a>. |
1667 * - "COMBO" : A <a href="/chart/interactive/docs/gallery/combochart">combo | 1667 * - "COMBO" : A <a href="/chart/interactive/docs/gallery/combochart">combo |
1668 * chart</a>. | 1668 * chart</a>. |
1669 */ | 1669 */ |
1670 core.String chartType; | 1670 core.String chartType; |
1671 /** | 1671 /** |
1672 * The domain of data this is charting. | 1672 * The domain of data this is charting. |
1673 * Only a single domain is currently supported. | 1673 * Only a single domain is supported. |
1674 */ | 1674 */ |
1675 core.List<BasicChartDomain> domains; | 1675 core.List<BasicChartDomain> domains; |
1676 /** | 1676 /** |
1677 * The number of rows or columns in the data that are "headers". | 1677 * The number of rows or columns in the data that are "headers". |
1678 * If not set, Google Sheets will guess how many rows are headers based | 1678 * If not set, Google Sheets will guess how many rows are headers based |
1679 * on the data. | 1679 * on the data. |
1680 * | 1680 * |
1681 * (Note that BasicChartAxis.title may override the axis title | 1681 * (Note that BasicChartAxis.title may override the axis title |
1682 * inferred from the header values.) | 1682 * inferred from the header values.) |
1683 */ | 1683 */ |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1803 | 1803 |
1804 core.Map toJson() { | 1804 core.Map toJson() { |
1805 var _json = new core.Map(); | 1805 var _json = new core.Map(); |
1806 if (ranges != null) { | 1806 if (ranges != null) { |
1807 _json["ranges"] = ranges; | 1807 _json["ranges"] = ranges; |
1808 } | 1808 } |
1809 return _json; | 1809 return _json; |
1810 } | 1810 } |
1811 } | 1811 } |
1812 | 1812 |
1813 /** The response when updating a range of values in a spreadsheet. */ | 1813 /** The response when clearing a range of values in a spreadsheet. */ |
1814 class BatchClearValuesResponse { | 1814 class BatchClearValuesResponse { |
1815 /** | 1815 /** |
1816 * The ranges that were cleared, in A1 notation. | 1816 * The ranges that were cleared, in A1 notation. |
1817 * (If the requests were for an unbounded range or a ranger larger | 1817 * (If the requests were for an unbounded range or a ranger larger |
1818 * than the bounds of the sheet, this will be the actual ranges | 1818 * than the bounds of the sheet, this will be the actual ranges |
1819 * that were cleared, bounded to the sheet's limits.) | 1819 * that were cleared, bounded to the sheet's limits.) |
1820 */ | 1820 */ |
1821 core.List<core.String> clearedRanges; | 1821 core.List<core.String> clearedRanges; |
1822 /** The spreadsheet the updates were applied to. */ | 1822 /** The spreadsheet the updates were applied to. */ |
1823 core.String spreadsheetId; | 1823 core.String spreadsheetId; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1880 } | 1880 } |
1881 } | 1881 } |
1882 | 1882 |
1883 /** The request for updating any aspect of a spreadsheet. */ | 1883 /** The request for updating any aspect of a spreadsheet. */ |
1884 class BatchUpdateSpreadsheetRequest { | 1884 class BatchUpdateSpreadsheetRequest { |
1885 /** | 1885 /** |
1886 * Determines if the update response should include the spreadsheet | 1886 * Determines if the update response should include the spreadsheet |
1887 * resource. | 1887 * resource. |
1888 */ | 1888 */ |
1889 core.bool includeSpreadsheetInResponse; | 1889 core.bool includeSpreadsheetInResponse; |
1890 /** A list of updates to apply to the spreadsheet. */ | 1890 /** |
| 1891 * A list of updates to apply to the spreadsheet. |
| 1892 * Requests will be applied in the order they are specified. |
| 1893 * If any request is not valid, no requests will be applied. |
| 1894 */ |
1891 core.List<Request> requests; | 1895 core.List<Request> requests; |
1892 /** | 1896 /** |
1893 * True if grid data should be returned. Meaningful only if | 1897 * True if grid data should be returned. Meaningful only if |
1894 * if include_spreadsheet_response is 'true'. | 1898 * if include_spreadsheet_response is 'true'. |
1895 * This parameter is ignored if a field mask was set in the request. | 1899 * This parameter is ignored if a field mask was set in the request. |
1896 */ | 1900 */ |
1897 core.bool responseIncludeGridData; | 1901 core.bool responseIncludeGridData; |
1898 /** | 1902 /** |
1899 * Limits the ranges included in the response spreadsheet. | 1903 * Limits the ranges included in the response spreadsheet. |
1900 * Meaningful only if include_spreadsheet_response is 'true'. | 1904 * Meaningful only if include_spreadsheet_response is 'true'. |
(...skipping 5938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7839 } | 7843 } |
7840 if (range != null) { | 7844 if (range != null) { |
7841 _json["range"] = range; | 7845 _json["range"] = range; |
7842 } | 7846 } |
7843 if (values != null) { | 7847 if (values != null) { |
7844 _json["values"] = values; | 7848 _json["values"] = values; |
7845 } | 7849 } |
7846 return _json; | 7850 return _json; |
7847 } | 7851 } |
7848 } | 7852 } |
OLD | NEW |