| 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 * [responseValueRenderOption] - Determines how values in the response should |
| 315 * be rendered. |
| 316 * The default render option is ValueRenderOption.FORMATTED_VALUE. |
| 317 * Possible string values are: |
| 318 * - "FORMATTED_VALUE" : A FORMATTED_VALUE. |
| 319 * - "UNFORMATTED_VALUE" : A UNFORMATTED_VALUE. |
| 320 * - "FORMULA" : A FORMULA. |
| 321 * |
| 314 * [valueInputOption] - How the input data should be interpreted. | 322 * [valueInputOption] - How the input data should be interpreted. |
| 315 * Possible string values are: | 323 * Possible string values are: |
| 316 * - "INPUT_VALUE_OPTION_UNSPECIFIED" : A INPUT_VALUE_OPTION_UNSPECIFIED. | 324 * - "INPUT_VALUE_OPTION_UNSPECIFIED" : A INPUT_VALUE_OPTION_UNSPECIFIED. |
| 317 * - "RAW" : A RAW. | 325 * - "RAW" : A RAW. |
| 318 * - "USER_ENTERED" : A USER_ENTERED. | 326 * - "USER_ENTERED" : A USER_ENTERED. |
| 319 * | 327 * |
| 328 * [responseDateTimeRenderOption] - Determines how dates, times, and durations |
| 329 * in the response should be |
| 330 * rendered. This is ignored if response_value_render_option is |
| 331 * FORMATTED_VALUE. |
| 332 * The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. |
| 333 * Possible string values are: |
| 334 * - "SERIAL_NUMBER" : A SERIAL_NUMBER. |
| 335 * - "FORMATTED_STRING" : A FORMATTED_STRING. |
| 336 * |
| 337 * [includeValuesInResponse] - Determines if the update response should |
| 338 * include the values |
| 339 * of the cells that were appended. By default, responses |
| 340 * do not include the updated values. |
| 341 * |
| 320 * [insertDataOption] - How the input data should be inserted. | 342 * [insertDataOption] - How the input data should be inserted. |
| 321 * Possible string values are: | 343 * Possible string values are: |
| 322 * - "OVERWRITE" : A OVERWRITE. | 344 * - "OVERWRITE" : A OVERWRITE. |
| 323 * - "INSERT_ROWS" : A INSERT_ROWS. | 345 * - "INSERT_ROWS" : A INSERT_ROWS. |
| 324 * | 346 * |
| 325 * Completes with a [AppendValuesResponse]. | 347 * Completes with a [AppendValuesResponse]. |
| 326 * | 348 * |
| 327 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 349 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 328 * error. | 350 * error. |
| 329 * | 351 * |
| 330 * 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, |
| 331 * this method will complete with the same error. | 353 * this method will complete with the same error. |
| 332 */ | 354 */ |
| 333 async.Future<AppendValuesResponse> append(ValueRange request, core.String spre
adsheetId, core.String range, {core.String valueInputOption, core.String insertD
ataOption}) { | 355 async.Future<AppendValuesResponse> append(ValueRange request, core.String spre
adsheetId, core.String range, {core.String responseValueRenderOption, core.Strin
g valueInputOption, core.String responseDateTimeRenderOption, core.bool includeV
aluesInResponse, core.String insertDataOption}) { |
| 334 var _url = null; | 356 var _url = null; |
| 335 var _queryParams = new core.Map(); | 357 var _queryParams = new core.Map(); |
| 336 var _uploadMedia = null; | 358 var _uploadMedia = null; |
| 337 var _uploadOptions = null; | 359 var _uploadOptions = null; |
| 338 var _downloadOptions = commons.DownloadOptions.Metadata; | 360 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 339 var _body = null; | 361 var _body = null; |
| 340 | 362 |
| 341 if (request != null) { | 363 if (request != null) { |
| 342 _body = convert.JSON.encode((request).toJson()); | 364 _body = convert.JSON.encode((request).toJson()); |
| 343 } | 365 } |
| 344 if (spreadsheetId == null) { | 366 if (spreadsheetId == null) { |
| 345 throw new core.ArgumentError("Parameter spreadsheetId is required."); | 367 throw new core.ArgumentError("Parameter spreadsheetId is required."); |
| 346 } | 368 } |
| 347 if (range == null) { | 369 if (range == null) { |
| 348 throw new core.ArgumentError("Parameter range is required."); | 370 throw new core.ArgumentError("Parameter range is required."); |
| 349 } | 371 } |
| 372 if (responseValueRenderOption != null) { |
| 373 _queryParams["responseValueRenderOption"] = [responseValueRenderOption]; |
| 374 } |
| 350 if (valueInputOption != null) { | 375 if (valueInputOption != null) { |
| 351 _queryParams["valueInputOption"] = [valueInputOption]; | 376 _queryParams["valueInputOption"] = [valueInputOption]; |
| 352 } | 377 } |
| 378 if (responseDateTimeRenderOption != null) { |
| 379 _queryParams["responseDateTimeRenderOption"] = [responseDateTimeRenderOpti
on]; |
| 380 } |
| 381 if (includeValuesInResponse != null) { |
| 382 _queryParams["includeValuesInResponse"] = ["${includeValuesInResponse}"]; |
| 383 } |
| 353 if (insertDataOption != null) { | 384 if (insertDataOption != null) { |
| 354 _queryParams["insertDataOption"] = [insertDataOption]; | 385 _queryParams["insertDataOption"] = [insertDataOption]; |
| 355 } | 386 } |
| 356 | 387 |
| 357 _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'; |
| 358 | 389 |
| 359 var _response = _requester.request(_url, | 390 var _response = _requester.request(_url, |
| 360 "POST", | 391 "POST", |
| 361 body: _body, | 392 body: _body, |
| 362 queryParams: _queryParams, | 393 queryParams: _queryParams, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 * Returns one or more ranges of values from a spreadsheet. | 448 * Returns one or more ranges of values from a spreadsheet. |
| 418 * The caller must specify the spreadsheet ID and one or more ranges. | 449 * The caller must specify the spreadsheet ID and one or more ranges. |
| 419 * | 450 * |
| 420 * Request parameters: | 451 * Request parameters: |
| 421 * | 452 * |
| 422 * [spreadsheetId] - The ID of the spreadsheet to retrieve data from. | 453 * [spreadsheetId] - The ID of the spreadsheet to retrieve data from. |
| 423 * | 454 * |
| 424 * [ranges] - The A1 notation of the values to retrieve. | 455 * [ranges] - The A1 notation of the values to retrieve. |
| 425 * | 456 * |
| 426 * [valueRenderOption] - How values should be represented in the output. | 457 * [valueRenderOption] - How values should be represented in the output. |
| 458 * The default render option is ValueRenderOption.FORMATTED_VALUE. |
| 427 * Possible string values are: | 459 * Possible string values are: |
| 428 * - "FORMATTED_VALUE" : A FORMATTED_VALUE. | 460 * - "FORMATTED_VALUE" : A FORMATTED_VALUE. |
| 429 * - "UNFORMATTED_VALUE" : A UNFORMATTED_VALUE. | 461 * - "UNFORMATTED_VALUE" : A UNFORMATTED_VALUE. |
| 430 * - "FORMULA" : A FORMULA. | 462 * - "FORMULA" : A FORMULA. |
| 431 * | 463 * |
| 432 * [dateTimeRenderOption] - How dates, times, and durations should be | 464 * [dateTimeRenderOption] - How dates, times, and durations should be |
| 433 * represented in the output. | 465 * represented in the output. |
| 434 * This is ignored if value_render_option is | 466 * This is ignored if value_render_option is |
| 435 * FORMATTED_VALUE. | 467 * FORMATTED_VALUE. |
| 468 * The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. |
| 436 * Possible string values are: | 469 * Possible string values are: |
| 437 * - "SERIAL_NUMBER" : A SERIAL_NUMBER. | 470 * - "SERIAL_NUMBER" : A SERIAL_NUMBER. |
| 438 * - "FORMATTED_STRING" : A FORMATTED_STRING. | 471 * - "FORMATTED_STRING" : A FORMATTED_STRING. |
| 439 * | 472 * |
| 440 * [majorDimension] - The major dimension that results should use. | 473 * [majorDimension] - The major dimension that results should use. |
| 441 * | 474 * |
| 442 * For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, | 475 * For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, |
| 443 * then requesting `range=A1:B2,majorDimension=ROWS` will return | 476 * then requesting `range=A1:B2,majorDimension=ROWS` will return |
| 444 * `[[1,2],[3,4]]`, | 477 * `[[1,2],[3,4]]`, |
| 445 * whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return | 478 * whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 * Returns a range of values from a spreadsheet. | 629 * Returns a range of values from a spreadsheet. |
| 597 * The caller must specify the spreadsheet ID and a range. | 630 * The caller must specify the spreadsheet ID and a range. |
| 598 * | 631 * |
| 599 * Request parameters: | 632 * Request parameters: |
| 600 * | 633 * |
| 601 * [spreadsheetId] - The ID of the spreadsheet to retrieve data from. | 634 * [spreadsheetId] - The ID of the spreadsheet to retrieve data from. |
| 602 * | 635 * |
| 603 * [range] - The A1 notation of the values to retrieve. | 636 * [range] - The A1 notation of the values to retrieve. |
| 604 * | 637 * |
| 605 * [valueRenderOption] - How values should be represented in the output. | 638 * [valueRenderOption] - How values should be represented in the output. |
| 639 * The default render option is ValueRenderOption.FORMATTED_VALUE. |
| 606 * Possible string values are: | 640 * Possible string values are: |
| 607 * - "FORMATTED_VALUE" : A FORMATTED_VALUE. | 641 * - "FORMATTED_VALUE" : A FORMATTED_VALUE. |
| 608 * - "UNFORMATTED_VALUE" : A UNFORMATTED_VALUE. | 642 * - "UNFORMATTED_VALUE" : A UNFORMATTED_VALUE. |
| 609 * - "FORMULA" : A FORMULA. | 643 * - "FORMULA" : A FORMULA. |
| 610 * | 644 * |
| 611 * [dateTimeRenderOption] - How dates, times, and durations should be | 645 * [dateTimeRenderOption] - How dates, times, and durations should be |
| 612 * represented in the output. | 646 * represented in the output. |
| 613 * This is ignored if value_render_option is | 647 * This is ignored if value_render_option is |
| 614 * FORMATTED_VALUE. | 648 * FORMATTED_VALUE. |
| 649 * The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. |
| 615 * Possible string values are: | 650 * Possible string values are: |
| 616 * - "SERIAL_NUMBER" : A SERIAL_NUMBER. | 651 * - "SERIAL_NUMBER" : A SERIAL_NUMBER. |
| 617 * - "FORMATTED_STRING" : A FORMATTED_STRING. | 652 * - "FORMATTED_STRING" : A FORMATTED_STRING. |
| 618 * | 653 * |
| 619 * [majorDimension] - The major dimension that results should use. | 654 * [majorDimension] - The major dimension that results should use. |
| 620 * | 655 * |
| 621 * For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, | 656 * For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, |
| 622 * then requesting `range=A1:B2,majorDimension=ROWS` will return | 657 * then requesting `range=A1:B2,majorDimension=ROWS` will return |
| 623 * `[[1,2],[3,4]]`, | 658 * `[[1,2],[3,4]]`, |
| 624 * whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return | 659 * whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 * a valueInputOption. | 713 * a valueInputOption. |
| 679 * | 714 * |
| 680 * [request] - The metadata request object. | 715 * [request] - The metadata request object. |
| 681 * | 716 * |
| 682 * Request parameters: | 717 * Request parameters: |
| 683 * | 718 * |
| 684 * [spreadsheetId] - The ID of the spreadsheet to update. | 719 * [spreadsheetId] - The ID of the spreadsheet to update. |
| 685 * | 720 * |
| 686 * [range] - The A1 notation of the values to update. | 721 * [range] - The A1 notation of the values to update. |
| 687 * | 722 * |
| 723 * [responseValueRenderOption] - Determines how values in the response should |
| 724 * be rendered. |
| 725 * The default render option is ValueRenderOption.FORMATTED_VALUE. |
| 726 * Possible string values are: |
| 727 * - "FORMATTED_VALUE" : A FORMATTED_VALUE. |
| 728 * - "UNFORMATTED_VALUE" : A UNFORMATTED_VALUE. |
| 729 * - "FORMULA" : A FORMULA. |
| 730 * |
| 688 * [valueInputOption] - How the input data should be interpreted. | 731 * [valueInputOption] - How the input data should be interpreted. |
| 689 * Possible string values are: | 732 * Possible string values are: |
| 690 * - "INPUT_VALUE_OPTION_UNSPECIFIED" : A INPUT_VALUE_OPTION_UNSPECIFIED. | 733 * - "INPUT_VALUE_OPTION_UNSPECIFIED" : A INPUT_VALUE_OPTION_UNSPECIFIED. |
| 691 * - "RAW" : A RAW. | 734 * - "RAW" : A RAW. |
| 692 * - "USER_ENTERED" : A USER_ENTERED. | 735 * - "USER_ENTERED" : A USER_ENTERED. |
| 693 * | 736 * |
| 737 * [responseDateTimeRenderOption] - Determines how dates, times, and durations |
| 738 * in the response should be |
| 739 * rendered. This is ignored if response_value_render_option is |
| 740 * FORMATTED_VALUE. |
| 741 * The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. |
| 742 * Possible string values are: |
| 743 * - "SERIAL_NUMBER" : A SERIAL_NUMBER. |
| 744 * - "FORMATTED_STRING" : A FORMATTED_STRING. |
| 745 * |
| 746 * [includeValuesInResponse] - Determines if the update response should |
| 747 * include the values |
| 748 * of the cells that were updated. By default, responses |
| 749 * do not include the updated values. |
| 750 * If the range to write was larger than than the range actually written, |
| 751 * the response will include all values in the requested range (excluding |
| 752 * trailing empty rows and columns). |
| 753 * |
| 694 * Completes with a [UpdateValuesResponse]. | 754 * Completes with a [UpdateValuesResponse]. |
| 695 * | 755 * |
| 696 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 756 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 697 * error. | 757 * error. |
| 698 * | 758 * |
| 699 * If the used [http.Client] completes with an error when making a REST call, | 759 * If the used [http.Client] completes with an error when making a REST call, |
| 700 * this method will complete with the same error. | 760 * this method will complete with the same error. |
| 701 */ | 761 */ |
| 702 async.Future<UpdateValuesResponse> update(ValueRange request, core.String spre
adsheetId, core.String range, {core.String valueInputOption}) { | 762 async.Future<UpdateValuesResponse> update(ValueRange request, core.String spre
adsheetId, core.String range, {core.String responseValueRenderOption, core.Strin
g valueInputOption, core.String responseDateTimeRenderOption, core.bool includeV
aluesInResponse}) { |
| 703 var _url = null; | 763 var _url = null; |
| 704 var _queryParams = new core.Map(); | 764 var _queryParams = new core.Map(); |
| 705 var _uploadMedia = null; | 765 var _uploadMedia = null; |
| 706 var _uploadOptions = null; | 766 var _uploadOptions = null; |
| 707 var _downloadOptions = commons.DownloadOptions.Metadata; | 767 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 708 var _body = null; | 768 var _body = null; |
| 709 | 769 |
| 710 if (request != null) { | 770 if (request != null) { |
| 711 _body = convert.JSON.encode((request).toJson()); | 771 _body = convert.JSON.encode((request).toJson()); |
| 712 } | 772 } |
| 713 if (spreadsheetId == null) { | 773 if (spreadsheetId == null) { |
| 714 throw new core.ArgumentError("Parameter spreadsheetId is required."); | 774 throw new core.ArgumentError("Parameter spreadsheetId is required."); |
| 715 } | 775 } |
| 716 if (range == null) { | 776 if (range == null) { |
| 717 throw new core.ArgumentError("Parameter range is required."); | 777 throw new core.ArgumentError("Parameter range is required."); |
| 718 } | 778 } |
| 779 if (responseValueRenderOption != null) { |
| 780 _queryParams["responseValueRenderOption"] = [responseValueRenderOption]; |
| 781 } |
| 719 if (valueInputOption != null) { | 782 if (valueInputOption != null) { |
| 720 _queryParams["valueInputOption"] = [valueInputOption]; | 783 _queryParams["valueInputOption"] = [valueInputOption]; |
| 721 } | 784 } |
| 785 if (responseDateTimeRenderOption != null) { |
| 786 _queryParams["responseDateTimeRenderOption"] = [responseDateTimeRenderOpti
on]; |
| 787 } |
| 788 if (includeValuesInResponse != null) { |
| 789 _queryParams["includeValuesInResponse"] = ["${includeValuesInResponse}"]; |
| 790 } |
| 722 | 791 |
| 723 _url = 'v4/spreadsheets/' + commons.Escaper.ecapeVariable('$spreadsheetId')
+ '/values/' + commons.Escaper.ecapeVariable('$range'); | 792 _url = 'v4/spreadsheets/' + commons.Escaper.ecapeVariable('$spreadsheetId')
+ '/values/' + commons.Escaper.ecapeVariable('$range'); |
| 724 | 793 |
| 725 var _response = _requester.request(_url, | 794 var _response = _requester.request(_url, |
| 726 "PUT", | 795 "PUT", |
| 727 body: _body, | 796 body: _body, |
| 728 queryParams: _queryParams, | 797 queryParams: _queryParams, |
| 729 uploadOptions: _uploadOptions, | 798 uploadOptions: _uploadOptions, |
| 730 uploadMedia: _uploadMedia, | 799 uploadMedia: _uploadMedia, |
| 731 downloadOptions: _downloadOptions); | 800 downloadOptions: _downloadOptions); |
| (...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1806 } | 1875 } |
| 1807 if (valueRanges != null) { | 1876 if (valueRanges != null) { |
| 1808 _json["valueRanges"] = valueRanges.map((value) => (value).toJson()).toList
(); | 1877 _json["valueRanges"] = valueRanges.map((value) => (value).toJson()).toList
(); |
| 1809 } | 1878 } |
| 1810 return _json; | 1879 return _json; |
| 1811 } | 1880 } |
| 1812 } | 1881 } |
| 1813 | 1882 |
| 1814 /** The request for updating any aspect of a spreadsheet. */ | 1883 /** The request for updating any aspect of a spreadsheet. */ |
| 1815 class BatchUpdateSpreadsheetRequest { | 1884 class BatchUpdateSpreadsheetRequest { |
| 1885 /** |
| 1886 * Determines if the update response should include the spreadsheet |
| 1887 * resource. |
| 1888 */ |
| 1889 core.bool includeSpreadsheetInResponse; |
| 1816 /** A list of updates to apply to the spreadsheet. */ | 1890 /** A list of updates to apply to the spreadsheet. */ |
| 1817 core.List<Request> requests; | 1891 core.List<Request> requests; |
| 1892 /** |
| 1893 * True if grid data should be returned. Meaningful only if |
| 1894 * if include_spreadsheet_response is 'true'. |
| 1895 * This parameter is ignored if a field mask was set in the request. |
| 1896 */ |
| 1897 core.bool responseIncludeGridData; |
| 1898 /** |
| 1899 * Limits the ranges included in the response spreadsheet. |
| 1900 * Meaningful only if include_spreadsheet_response is 'true'. |
| 1901 */ |
| 1902 core.List<core.String> responseRanges; |
| 1818 | 1903 |
| 1819 BatchUpdateSpreadsheetRequest(); | 1904 BatchUpdateSpreadsheetRequest(); |
| 1820 | 1905 |
| 1821 BatchUpdateSpreadsheetRequest.fromJson(core.Map _json) { | 1906 BatchUpdateSpreadsheetRequest.fromJson(core.Map _json) { |
| 1907 if (_json.containsKey("includeSpreadsheetInResponse")) { |
| 1908 includeSpreadsheetInResponse = _json["includeSpreadsheetInResponse"]; |
| 1909 } |
| 1822 if (_json.containsKey("requests")) { | 1910 if (_json.containsKey("requests")) { |
| 1823 requests = _json["requests"].map((value) => new Request.fromJson(value)).t
oList(); | 1911 requests = _json["requests"].map((value) => new Request.fromJson(value)).t
oList(); |
| 1824 } | 1912 } |
| 1913 if (_json.containsKey("responseIncludeGridData")) { |
| 1914 responseIncludeGridData = _json["responseIncludeGridData"]; |
| 1915 } |
| 1916 if (_json.containsKey("responseRanges")) { |
| 1917 responseRanges = _json["responseRanges"]; |
| 1918 } |
| 1825 } | 1919 } |
| 1826 | 1920 |
| 1827 core.Map toJson() { | 1921 core.Map toJson() { |
| 1828 var _json = new core.Map(); | 1922 var _json = new core.Map(); |
| 1923 if (includeSpreadsheetInResponse != null) { |
| 1924 _json["includeSpreadsheetInResponse"] = includeSpreadsheetInResponse; |
| 1925 } |
| 1829 if (requests != null) { | 1926 if (requests != null) { |
| 1830 _json["requests"] = requests.map((value) => (value).toJson()).toList(); | 1927 _json["requests"] = requests.map((value) => (value).toJson()).toList(); |
| 1831 } | 1928 } |
| 1929 if (responseIncludeGridData != null) { |
| 1930 _json["responseIncludeGridData"] = responseIncludeGridData; |
| 1931 } |
| 1932 if (responseRanges != null) { |
| 1933 _json["responseRanges"] = responseRanges; |
| 1934 } |
| 1832 return _json; | 1935 return _json; |
| 1833 } | 1936 } |
| 1834 } | 1937 } |
| 1835 | 1938 |
| 1836 /** The reply for batch updating a spreadsheet. */ | 1939 /** The reply for batch updating a spreadsheet. */ |
| 1837 class BatchUpdateSpreadsheetResponse { | 1940 class BatchUpdateSpreadsheetResponse { |
| 1838 /** | 1941 /** |
| 1839 * The reply of the updates. This maps 1:1 with the updates, although | 1942 * The reply of the updates. This maps 1:1 with the updates, although |
| 1840 * replies to some requests may be empty. | 1943 * replies to some requests may be empty. |
| 1841 */ | 1944 */ |
| 1842 core.List<Response> replies; | 1945 core.List<Response> replies; |
| 1843 /** The spreadsheet the updates were applied to. */ | 1946 /** The spreadsheet the updates were applied to. */ |
| 1844 core.String spreadsheetId; | 1947 core.String spreadsheetId; |
| 1948 /** |
| 1949 * The spreadsheet after updates were applied. This is only set if |
| 1950 * [BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is `true`. |
| 1951 */ |
| 1952 Spreadsheet updatedSpreadsheet; |
| 1845 | 1953 |
| 1846 BatchUpdateSpreadsheetResponse(); | 1954 BatchUpdateSpreadsheetResponse(); |
| 1847 | 1955 |
| 1848 BatchUpdateSpreadsheetResponse.fromJson(core.Map _json) { | 1956 BatchUpdateSpreadsheetResponse.fromJson(core.Map _json) { |
| 1849 if (_json.containsKey("replies")) { | 1957 if (_json.containsKey("replies")) { |
| 1850 replies = _json["replies"].map((value) => new Response.fromJson(value)).to
List(); | 1958 replies = _json["replies"].map((value) => new Response.fromJson(value)).to
List(); |
| 1851 } | 1959 } |
| 1852 if (_json.containsKey("spreadsheetId")) { | 1960 if (_json.containsKey("spreadsheetId")) { |
| 1853 spreadsheetId = _json["spreadsheetId"]; | 1961 spreadsheetId = _json["spreadsheetId"]; |
| 1854 } | 1962 } |
| 1963 if (_json.containsKey("updatedSpreadsheet")) { |
| 1964 updatedSpreadsheet = new Spreadsheet.fromJson(_json["updatedSpreadsheet"])
; |
| 1965 } |
| 1855 } | 1966 } |
| 1856 | 1967 |
| 1857 core.Map toJson() { | 1968 core.Map toJson() { |
| 1858 var _json = new core.Map(); | 1969 var _json = new core.Map(); |
| 1859 if (replies != null) { | 1970 if (replies != null) { |
| 1860 _json["replies"] = replies.map((value) => (value).toJson()).toList(); | 1971 _json["replies"] = replies.map((value) => (value).toJson()).toList(); |
| 1861 } | 1972 } |
| 1862 if (spreadsheetId != null) { | 1973 if (spreadsheetId != null) { |
| 1863 _json["spreadsheetId"] = spreadsheetId; | 1974 _json["spreadsheetId"] = spreadsheetId; |
| 1864 } | 1975 } |
| 1976 if (updatedSpreadsheet != null) { |
| 1977 _json["updatedSpreadsheet"] = (updatedSpreadsheet).toJson(); |
| 1978 } |
| 1865 return _json; | 1979 return _json; |
| 1866 } | 1980 } |
| 1867 } | 1981 } |
| 1868 | 1982 |
| 1869 /** The request for updating more than one range of values in a spreadsheet. */ | 1983 /** The request for updating more than one range of values in a spreadsheet. */ |
| 1870 class BatchUpdateValuesRequest { | 1984 class BatchUpdateValuesRequest { |
| 1871 /** The new values to apply to the spreadsheet. */ | 1985 /** The new values to apply to the spreadsheet. */ |
| 1872 core.List<ValueRange> data; | 1986 core.List<ValueRange> data; |
| 1873 /** | 1987 /** |
| 1988 * Determines if the update response should include the values |
| 1989 * of the cells that were updated. By default, responses |
| 1990 * do not include the updated values. The `updatedData` field within |
| 1991 * each of the BatchUpdateValuesResponse.responses will contain |
| 1992 * the updated values. If the range to write was larger than than the range |
| 1993 * actually written, the response will include all values in the requested |
| 1994 * range (excluding trailing empty rows and columns). |
| 1995 */ |
| 1996 core.bool includeValuesInResponse; |
| 1997 /** |
| 1998 * Determines how dates, times, and durations in the response should be |
| 1999 * rendered. This is ignored if response_value_render_option is |
| 2000 * FORMATTED_VALUE. |
| 2001 * The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. |
| 2002 * Possible string values are: |
| 2003 * - "SERIAL_NUMBER" : Instructs date, time, datetime, and duration fields to |
| 2004 * be output |
| 2005 * as doubles in "serial number" format, as popularized by Lotus 1-2-3. |
| 2006 * Days are counted from December 31st 1899 and are incremented by 1, |
| 2007 * and times are fractions of a day. For example, January 1st 1900 at noon |
| 2008 * would be 1.5, 1 because it's 1 day offset from December 31st 1899, |
| 2009 * and .5 because noon is half a day. February 1st 1900 at 3pm would |
| 2010 * be 32.625. This correctly treats the year 1900 as not a leap year. |
| 2011 * - "FORMATTED_STRING" : Instructs date, time, datetime, and duration fields |
| 2012 * to be output |
| 2013 * as strings in their given number format (which is dependent |
| 2014 * on the spreadsheet locale). |
| 2015 */ |
| 2016 core.String responseDateTimeRenderOption; |
| 2017 /** |
| 2018 * Determines how values in the response should be rendered. |
| 2019 * The default render option is ValueRenderOption.FORMATTED_VALUE. |
| 2020 * Possible string values are: |
| 2021 * - "FORMATTED_VALUE" : Values will be calculated & formatted in the reply |
| 2022 * according to the |
| 2023 * cell's formatting. Formatting is based on the spreadsheet's locale, |
| 2024 * not the requesting user's locale. |
| 2025 * For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, |
| 2026 * then `A2` would return `"$1.23"`. |
| 2027 * - "UNFORMATTED_VALUE" : Values will be calculated, but not formatted in the |
| 2028 * reply. |
| 2029 * For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, |
| 2030 * then `A2` would return the number `1.23`. |
| 2031 * - "FORMULA" : Values will not be calculated. The reply will include the |
| 2032 * formulas. |
| 2033 * For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, |
| 2034 * then A2 would return `"=A1"`. |
| 2035 */ |
| 2036 core.String responseValueRenderOption; |
| 2037 /** |
| 1874 * How the input data should be interpreted. | 2038 * How the input data should be interpreted. |
| 1875 * Possible string values are: | 2039 * Possible string values are: |
| 1876 * - "INPUT_VALUE_OPTION_UNSPECIFIED" : Default input value. This value must | 2040 * - "INPUT_VALUE_OPTION_UNSPECIFIED" : Default input value. This value must |
| 1877 * not be used. | 2041 * not be used. |
| 1878 * - "RAW" : The values the user has entered will not be parsed and will be | 2042 * - "RAW" : The values the user has entered will not be parsed and will be |
| 1879 * stored | 2043 * stored |
| 1880 * as-is. | 2044 * as-is. |
| 1881 * - "USER_ENTERED" : The values will be parsed as if the user typed them into | 2045 * - "USER_ENTERED" : The values will be parsed as if the user typed them into |
| 1882 * the UI. | 2046 * the UI. |
| 1883 * Numbers will stay as numbers, but strings may be converted to numbers, | 2047 * Numbers will stay as numbers, but strings may be converted to numbers, |
| 1884 * dates, etc. following the same rules that are applied when entering | 2048 * dates, etc. following the same rules that are applied when entering |
| 1885 * text into a cell via the Google Sheets UI. | 2049 * text into a cell via the Google Sheets UI. |
| 1886 */ | 2050 */ |
| 1887 core.String valueInputOption; | 2051 core.String valueInputOption; |
| 1888 | 2052 |
| 1889 BatchUpdateValuesRequest(); | 2053 BatchUpdateValuesRequest(); |
| 1890 | 2054 |
| 1891 BatchUpdateValuesRequest.fromJson(core.Map _json) { | 2055 BatchUpdateValuesRequest.fromJson(core.Map _json) { |
| 1892 if (_json.containsKey("data")) { | 2056 if (_json.containsKey("data")) { |
| 1893 data = _json["data"].map((value) => new ValueRange.fromJson(value)).toList
(); | 2057 data = _json["data"].map((value) => new ValueRange.fromJson(value)).toList
(); |
| 1894 } | 2058 } |
| 2059 if (_json.containsKey("includeValuesInResponse")) { |
| 2060 includeValuesInResponse = _json["includeValuesInResponse"]; |
| 2061 } |
| 2062 if (_json.containsKey("responseDateTimeRenderOption")) { |
| 2063 responseDateTimeRenderOption = _json["responseDateTimeRenderOption"]; |
| 2064 } |
| 2065 if (_json.containsKey("responseValueRenderOption")) { |
| 2066 responseValueRenderOption = _json["responseValueRenderOption"]; |
| 2067 } |
| 1895 if (_json.containsKey("valueInputOption")) { | 2068 if (_json.containsKey("valueInputOption")) { |
| 1896 valueInputOption = _json["valueInputOption"]; | 2069 valueInputOption = _json["valueInputOption"]; |
| 1897 } | 2070 } |
| 1898 } | 2071 } |
| 1899 | 2072 |
| 1900 core.Map toJson() { | 2073 core.Map toJson() { |
| 1901 var _json = new core.Map(); | 2074 var _json = new core.Map(); |
| 1902 if (data != null) { | 2075 if (data != null) { |
| 1903 _json["data"] = data.map((value) => (value).toJson()).toList(); | 2076 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 1904 } | 2077 } |
| 2078 if (includeValuesInResponse != null) { |
| 2079 _json["includeValuesInResponse"] = includeValuesInResponse; |
| 2080 } |
| 2081 if (responseDateTimeRenderOption != null) { |
| 2082 _json["responseDateTimeRenderOption"] = responseDateTimeRenderOption; |
| 2083 } |
| 2084 if (responseValueRenderOption != null) { |
| 2085 _json["responseValueRenderOption"] = responseValueRenderOption; |
| 2086 } |
| 1905 if (valueInputOption != null) { | 2087 if (valueInputOption != null) { |
| 1906 _json["valueInputOption"] = valueInputOption; | 2088 _json["valueInputOption"] = valueInputOption; |
| 1907 } | 2089 } |
| 1908 return _json; | 2090 return _json; |
| 1909 } | 2091 } |
| 1910 } | 2092 } |
| 1911 | 2093 |
| 1912 /** The response when updating a range of values in a spreadsheet. */ | 2094 /** The response when updating a range of values in a spreadsheet. */ |
| 1913 class BatchUpdateValuesResponse { | 2095 class BatchUpdateValuesResponse { |
| 1914 /** | 2096 /** |
| (...skipping 4242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6157 * this field will be absent.) | 6339 * this field will be absent.) |
| 6158 * When writing it is an error to set any grid properties on non-grid sheets. | 6340 * When writing it is an error to set any grid properties on non-grid sheets. |
| 6159 */ | 6341 */ |
| 6160 GridProperties gridProperties; | 6342 GridProperties gridProperties; |
| 6161 /** True if the sheet is hidden in the UI, false if it's visible. */ | 6343 /** True if the sheet is hidden in the UI, false if it's visible. */ |
| 6162 core.bool hidden; | 6344 core.bool hidden; |
| 6163 /** | 6345 /** |
| 6164 * The index of the sheet within the spreadsheet. | 6346 * The index of the sheet within the spreadsheet. |
| 6165 * When adding or updating sheet properties, if this field | 6347 * When adding or updating sheet properties, if this field |
| 6166 * is excluded then the sheet will be added or moved to the end | 6348 * is excluded then the sheet will be added or moved to the end |
| 6167 * of the sheet list. | 6349 * of the sheet list. When updating sheet indices or inserting |
| 6350 * sheets, movement is considered in "before the move" indexes. |
| 6351 * For example, if there were 3 sheets (S1, S2, S3) in order to |
| 6352 * move S1 ahead of S2 the index would have to be set to 2. A sheet |
| 6353 * index update request will be ignored if the requested index is |
| 6354 * identical to the sheets current index or if the requested new |
| 6355 * index is equal to the current sheet index + 1. |
| 6168 */ | 6356 */ |
| 6169 core.int index; | 6357 core.int index; |
| 6170 /** True if the sheet is an RTL sheet instead of an LTR sheet. */ | 6358 /** True if the sheet is an RTL sheet instead of an LTR sheet. */ |
| 6171 core.bool rightToLeft; | 6359 core.bool rightToLeft; |
| 6172 /** | 6360 /** |
| 6173 * The ID of the sheet. Must be non-negative. | 6361 * The ID of the sheet. Must be non-negative. |
| 6174 * This field cannot be changed once set. | 6362 * This field cannot be changed once set. |
| 6175 */ | 6363 */ |
| 6176 core.int sheetId; | 6364 core.int sheetId; |
| 6177 /** | 6365 /** |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6372 core.List<NamedRange> namedRanges; | 6560 core.List<NamedRange> namedRanges; |
| 6373 /** Overall properties of a spreadsheet. */ | 6561 /** Overall properties of a spreadsheet. */ |
| 6374 SpreadsheetProperties properties; | 6562 SpreadsheetProperties properties; |
| 6375 /** The sheets that are part of a spreadsheet. */ | 6563 /** The sheets that are part of a spreadsheet. */ |
| 6376 core.List<Sheet> sheets; | 6564 core.List<Sheet> sheets; |
| 6377 /** | 6565 /** |
| 6378 * The ID of the spreadsheet. | 6566 * The ID of the spreadsheet. |
| 6379 * This field is read-only. | 6567 * This field is read-only. |
| 6380 */ | 6568 */ |
| 6381 core.String spreadsheetId; | 6569 core.String spreadsheetId; |
| 6570 /** |
| 6571 * The url of the spreadsheet. |
| 6572 * This field is read-only. |
| 6573 */ |
| 6574 core.String spreadsheetUrl; |
| 6382 | 6575 |
| 6383 Spreadsheet(); | 6576 Spreadsheet(); |
| 6384 | 6577 |
| 6385 Spreadsheet.fromJson(core.Map _json) { | 6578 Spreadsheet.fromJson(core.Map _json) { |
| 6386 if (_json.containsKey("namedRanges")) { | 6579 if (_json.containsKey("namedRanges")) { |
| 6387 namedRanges = _json["namedRanges"].map((value) => new NamedRange.fromJson(
value)).toList(); | 6580 namedRanges = _json["namedRanges"].map((value) => new NamedRange.fromJson(
value)).toList(); |
| 6388 } | 6581 } |
| 6389 if (_json.containsKey("properties")) { | 6582 if (_json.containsKey("properties")) { |
| 6390 properties = new SpreadsheetProperties.fromJson(_json["properties"]); | 6583 properties = new SpreadsheetProperties.fromJson(_json["properties"]); |
| 6391 } | 6584 } |
| 6392 if (_json.containsKey("sheets")) { | 6585 if (_json.containsKey("sheets")) { |
| 6393 sheets = _json["sheets"].map((value) => new Sheet.fromJson(value)).toList(
); | 6586 sheets = _json["sheets"].map((value) => new Sheet.fromJson(value)).toList(
); |
| 6394 } | 6587 } |
| 6395 if (_json.containsKey("spreadsheetId")) { | 6588 if (_json.containsKey("spreadsheetId")) { |
| 6396 spreadsheetId = _json["spreadsheetId"]; | 6589 spreadsheetId = _json["spreadsheetId"]; |
| 6397 } | 6590 } |
| 6591 if (_json.containsKey("spreadsheetUrl")) { |
| 6592 spreadsheetUrl = _json["spreadsheetUrl"]; |
| 6593 } |
| 6398 } | 6594 } |
| 6399 | 6595 |
| 6400 core.Map toJson() { | 6596 core.Map toJson() { |
| 6401 var _json = new core.Map(); | 6597 var _json = new core.Map(); |
| 6402 if (namedRanges != null) { | 6598 if (namedRanges != null) { |
| 6403 _json["namedRanges"] = namedRanges.map((value) => (value).toJson()).toList
(); | 6599 _json["namedRanges"] = namedRanges.map((value) => (value).toJson()).toList
(); |
| 6404 } | 6600 } |
| 6405 if (properties != null) { | 6601 if (properties != null) { |
| 6406 _json["properties"] = (properties).toJson(); | 6602 _json["properties"] = (properties).toJson(); |
| 6407 } | 6603 } |
| 6408 if (sheets != null) { | 6604 if (sheets != null) { |
| 6409 _json["sheets"] = sheets.map((value) => (value).toJson()).toList(); | 6605 _json["sheets"] = sheets.map((value) => (value).toJson()).toList(); |
| 6410 } | 6606 } |
| 6411 if (spreadsheetId != null) { | 6607 if (spreadsheetId != null) { |
| 6412 _json["spreadsheetId"] = spreadsheetId; | 6608 _json["spreadsheetId"] = spreadsheetId; |
| 6413 } | 6609 } |
| 6610 if (spreadsheetUrl != null) { |
| 6611 _json["spreadsheetUrl"] = spreadsheetUrl; |
| 6612 } |
| 6414 return _json; | 6613 return _json; |
| 6415 } | 6614 } |
| 6416 } | 6615 } |
| 6417 | 6616 |
| 6418 /** Properties of a spreadsheet. */ | 6617 /** Properties of a spreadsheet. */ |
| 6419 class SpreadsheetProperties { | 6618 class SpreadsheetProperties { |
| 6420 /** | 6619 /** |
| 6421 * The amount of time to wait before volatile functions are recalculated. | 6620 * The amount of time to wait before volatile functions are recalculated. |
| 6422 * Possible string values are: | 6621 * Possible string values are: |
| 6423 * - "RECALCULATION_INTERVAL_UNSPECIFIED" : Default value. This value must not | 6622 * - "RECALCULATION_INTERVAL_UNSPECIFIED" : Default value. This value must not |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7302 /** The response when updating a range of values in a spreadsheet. */ | 7501 /** The response when updating a range of values in a spreadsheet. */ |
| 7303 class UpdateValuesResponse { | 7502 class UpdateValuesResponse { |
| 7304 /** The spreadsheet the updates were applied to. */ | 7503 /** The spreadsheet the updates were applied to. */ |
| 7305 core.String spreadsheetId; | 7504 core.String spreadsheetId; |
| 7306 /** The number of cells updated. */ | 7505 /** The number of cells updated. */ |
| 7307 core.int updatedCells; | 7506 core.int updatedCells; |
| 7308 /** | 7507 /** |
| 7309 * The number of columns where at least one cell in the column was updated. | 7508 * The number of columns where at least one cell in the column was updated. |
| 7310 */ | 7509 */ |
| 7311 core.int updatedColumns; | 7510 core.int updatedColumns; |
| 7511 /** |
| 7512 * The values of the cells after updates were applied. |
| 7513 * This is only included if the request's `includeValuesInResponse` field |
| 7514 * was `true`. |
| 7515 */ |
| 7516 ValueRange updatedData; |
| 7312 /** The range (in A1 notation) that updates were applied to. */ | 7517 /** The range (in A1 notation) that updates were applied to. */ |
| 7313 core.String updatedRange; | 7518 core.String updatedRange; |
| 7314 /** The number of rows where at least one cell in the row was updated. */ | 7519 /** The number of rows where at least one cell in the row was updated. */ |
| 7315 core.int updatedRows; | 7520 core.int updatedRows; |
| 7316 | 7521 |
| 7317 UpdateValuesResponse(); | 7522 UpdateValuesResponse(); |
| 7318 | 7523 |
| 7319 UpdateValuesResponse.fromJson(core.Map _json) { | 7524 UpdateValuesResponse.fromJson(core.Map _json) { |
| 7320 if (_json.containsKey("spreadsheetId")) { | 7525 if (_json.containsKey("spreadsheetId")) { |
| 7321 spreadsheetId = _json["spreadsheetId"]; | 7526 spreadsheetId = _json["spreadsheetId"]; |
| 7322 } | 7527 } |
| 7323 if (_json.containsKey("updatedCells")) { | 7528 if (_json.containsKey("updatedCells")) { |
| 7324 updatedCells = _json["updatedCells"]; | 7529 updatedCells = _json["updatedCells"]; |
| 7325 } | 7530 } |
| 7326 if (_json.containsKey("updatedColumns")) { | 7531 if (_json.containsKey("updatedColumns")) { |
| 7327 updatedColumns = _json["updatedColumns"]; | 7532 updatedColumns = _json["updatedColumns"]; |
| 7328 } | 7533 } |
| 7534 if (_json.containsKey("updatedData")) { |
| 7535 updatedData = new ValueRange.fromJson(_json["updatedData"]); |
| 7536 } |
| 7329 if (_json.containsKey("updatedRange")) { | 7537 if (_json.containsKey("updatedRange")) { |
| 7330 updatedRange = _json["updatedRange"]; | 7538 updatedRange = _json["updatedRange"]; |
| 7331 } | 7539 } |
| 7332 if (_json.containsKey("updatedRows")) { | 7540 if (_json.containsKey("updatedRows")) { |
| 7333 updatedRows = _json["updatedRows"]; | 7541 updatedRows = _json["updatedRows"]; |
| 7334 } | 7542 } |
| 7335 } | 7543 } |
| 7336 | 7544 |
| 7337 core.Map toJson() { | 7545 core.Map toJson() { |
| 7338 var _json = new core.Map(); | 7546 var _json = new core.Map(); |
| 7339 if (spreadsheetId != null) { | 7547 if (spreadsheetId != null) { |
| 7340 _json["spreadsheetId"] = spreadsheetId; | 7548 _json["spreadsheetId"] = spreadsheetId; |
| 7341 } | 7549 } |
| 7342 if (updatedCells != null) { | 7550 if (updatedCells != null) { |
| 7343 _json["updatedCells"] = updatedCells; | 7551 _json["updatedCells"] = updatedCells; |
| 7344 } | 7552 } |
| 7345 if (updatedColumns != null) { | 7553 if (updatedColumns != null) { |
| 7346 _json["updatedColumns"] = updatedColumns; | 7554 _json["updatedColumns"] = updatedColumns; |
| 7347 } | 7555 } |
| 7556 if (updatedData != null) { |
| 7557 _json["updatedData"] = (updatedData).toJson(); |
| 7558 } |
| 7348 if (updatedRange != null) { | 7559 if (updatedRange != null) { |
| 7349 _json["updatedRange"] = updatedRange; | 7560 _json["updatedRange"] = updatedRange; |
| 7350 } | 7561 } |
| 7351 if (updatedRows != null) { | 7562 if (updatedRows != null) { |
| 7352 _json["updatedRows"] = updatedRows; | 7563 _json["updatedRows"] = updatedRows; |
| 7353 } | 7564 } |
| 7354 return _json; | 7565 return _json; |
| 7355 } | 7566 } |
| 7356 } | 7567 } |
| 7357 | 7568 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7423 } | 7634 } |
| 7424 if (range != null) { | 7635 if (range != null) { |
| 7425 _json["range"] = range; | 7636 _json["range"] = range; |
| 7426 } | 7637 } |
| 7427 if (values != null) { | 7638 if (values != null) { |
| 7428 _json["values"] = values; | 7639 _json["values"] = values; |
| 7429 } | 7640 } |
| 7430 return _json; | 7641 return _json; |
| 7431 } | 7642 } |
| 7432 } | 7643 } |
| OLD | NEW |