| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  | # Copyright 2015 Google Inc. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # 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. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | require 'google/apis/core/base_service' | 
					
						
							|  |  |  | require 'google/apis/core/json_representation' | 
					
						
							|  |  |  | require 'google/apis/core/hashable' | 
					
						
							|  |  |  | require 'google/apis/errors' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module Google | 
					
						
							|  |  |  |   module Apis | 
					
						
							|  |  |  |     module SheetsV4 | 
					
						
							|  |  |  |       # Google Sheets API | 
					
						
							|  |  |  |       # | 
					
						
							| 
									
										
										
										
											2016-05-25 16:16:15 +00:00
										 |  |  |       # Reads and writes Google Sheets. | 
					
						
							| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  |       # | 
					
						
							|  |  |  |       # @example | 
					
						
							|  |  |  |       #    require 'google/apis/sheets_v4' | 
					
						
							|  |  |  |       # | 
					
						
							|  |  |  |       #    Sheets = Google::Apis::SheetsV4 # Alias the module | 
					
						
							|  |  |  |       #    service = Sheets::SheetsService.new | 
					
						
							|  |  |  |       # | 
					
						
							|  |  |  |       # @see https://developers.google.com/sheets/ | 
					
						
							|  |  |  |       class SheetsService < Google::Apis::Core::BaseService | 
					
						
							| 
									
										
										
										
											2017-04-03 20:18:48 +00:00
										 |  |  |         # @return [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. | 
					
						
							|  |  |  |         attr_accessor :key | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-04 19:35:56 +00:00
										 |  |  |         # @return [String] | 
					
						
							|  |  |  |         #  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. | 
					
						
							|  |  |  |         attr_accessor :quota_user | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  |         def initialize | 
					
						
							|  |  |  |           super('https://sheets.googleapis.com/', '') | 
					
						
							| 
									
										
										
										
											2017-04-03 20:18:48 +00:00
										 |  |  |           @batch_path = 'batch' | 
					
						
							| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Applies one or more updates to the spreadsheet. Each request is validated | 
					
						
							|  |  |  |         # before being applied. If any request is not valid then the entire request will | 
					
						
							|  |  |  |         # fail and nothing will be applied. Some requests have replies to give you some | 
					
						
							|  |  |  |         # information about how they are applied. The replies will mirror the requests. | 
					
						
							|  |  |  |         # For example, if you applied 4 updates and the 3rd one had a reply, then the | 
					
						
							|  |  |  |         # response will have 2 empty replies, the actual reply, and another empty reply, | 
					
						
							|  |  |  |         # in that order. Due to the collaborative nature of spreadsheets, it is not | 
					
						
							|  |  |  |         # guaranteed that the spreadsheet will reflect exactly your changes after this | 
					
						
							|  |  |  |         # completes, however it is guaranteed that the updates in the request will be | 
					
						
							| 
									
										
										
										
											2017-02-13 23:28:52 +00:00
										 |  |  |         # applied together atomically. Your changes may be altered with respect to | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # collaborator changes. If there are no collaborators, the spreadsheet should | 
					
						
							|  |  |  |         # reflect your changes. | 
					
						
							| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							| 
									
										
										
										
											2017-02-13 23:28:52 +00:00
										 |  |  |         #   The spreadsheet to apply the updates to. | 
					
						
							|  |  |  |         # @param [Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest] batch_update_spreadsheet_request_object | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							| 
									
										
										
										
											2017-01-25 07:37:13 +00:00
										 |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							| 
									
										
										
										
											2017-02-13 23:28:52 +00:00
										 |  |  |         # @yieldparam result [Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse] parsed result object | 
					
						
							| 
									
										
										
										
											2017-01-25 07:37:13 +00:00
										 |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							| 
									
										
										
										
											2017-02-13 23:28:52 +00:00
										 |  |  |         # @return [Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse] | 
					
						
							| 
									
										
										
										
											2017-01-25 07:37:13 +00:00
										 |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         def batch_update_spreadsheet(spreadsheet_id, batch_update_spreadsheet_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}:batchUpdate', options) | 
					
						
							| 
									
										
										
										
											2017-02-13 23:28:52 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest::Representation | 
					
						
							|  |  |  |           command.request_object = batch_update_spreadsheet_request_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse | 
					
						
							| 
									
										
										
										
											2017-01-25 07:37:13 +00:00
										 |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |         # Creates a spreadsheet, returning the newly created spreadsheet. | 
					
						
							|  |  |  |         # @param [Google::Apis::SheetsV4::Spreadsheet] spreadsheet_object | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |         # @yieldparam result [Google::Apis::SheetsV4::Spreadsheet] parsed result object | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |         # @return [Google::Apis::SheetsV4::Spreadsheet] | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         def create_spreadsheet(spreadsheet_object = nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets', options) | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::Spreadsheet::Representation | 
					
						
							|  |  |  |           command.request_object = spreadsheet_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::Spreadsheet | 
					
						
							|  |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Returns the spreadsheet at the given ID. The caller must specify the | 
					
						
							|  |  |  |         # spreadsheet ID. By default, data within grids will not be returned. You can | 
					
						
							|  |  |  |         # include grid data one of two ways: * Specify a field mask listing your desired | 
					
						
							|  |  |  |         # fields using the `fields` URL parameter in HTTP * Set the includeGridData URL | 
					
						
							|  |  |  |         # parameter to true. If a field mask is set, the `includeGridData` parameter is | 
					
						
							|  |  |  |         # ignored For large spreadsheets, it is recommended to retrieve only the | 
					
						
							|  |  |  |         # specific fields of the spreadsheet that you want. To retrieve only subsets of | 
					
						
							|  |  |  |         # the spreadsheet, use the ranges URL parameter. Multiple ranges can be | 
					
						
							|  |  |  |         # specified. Limiting the range will return only the portions of the spreadsheet | 
					
						
							|  |  |  |         # that intersect the requested ranges. Ranges are specified using A1 notation. | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         #   The spreadsheet to request. | 
					
						
							|  |  |  |         # @param [Boolean] include_grid_data | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   True if grid data should be returned. This parameter is ignored if a field | 
					
						
							|  |  |  |         #   mask was set in the request. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [Array<String>, String] ranges | 
					
						
							|  |  |  |         #   The ranges to retrieve from the spreadsheet. | 
					
						
							|  |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							|  |  |  |         # @yieldparam result [Google::Apis::SheetsV4::Spreadsheet] parsed result object | 
					
						
							|  |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @return [Google::Apis::SheetsV4::Spreadsheet] | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							|  |  |  |         def get_spreadsheet(spreadsheet_id, include_grid_data: nil, ranges: nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}', options) | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::Spreadsheet | 
					
						
							|  |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							|  |  |  |           command.query['includeGridData'] = include_grid_data unless include_grid_data.nil? | 
					
						
							|  |  |  |           command.query['ranges'] = ranges unless ranges.nil? | 
					
						
							|  |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							|  |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							|  |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Returns the spreadsheet at the given ID. The caller must specify the | 
					
						
							|  |  |  |         # spreadsheet ID. This method differs from GetSpreadsheet in that it allows | 
					
						
							|  |  |  |         # selecting which subsets of spreadsheet data to return by specifying a | 
					
						
							|  |  |  |         # dataFilters parameter. Multiple DataFilters can be specified. Specifying one | 
					
						
							|  |  |  |         # or more data filters will return the portions of the spreadsheet that | 
					
						
							|  |  |  |         # intersect ranges matched by any of the filters. By default, data within grids | 
					
						
							|  |  |  |         # will not be returned. You can include grid data one of two ways: * Specify a | 
					
						
							|  |  |  |         # field mask listing your desired fields using the `fields` URL parameter in | 
					
						
							|  |  |  |         # HTTP * Set the includeGridData parameter to true. If a field mask is set, the ` | 
					
						
							|  |  |  |         # includeGridData` parameter is ignored For large spreadsheets, it is | 
					
						
							|  |  |  |         # recommended to retrieve only the specific fields of the spreadsheet that you | 
					
						
							|  |  |  |         # want. | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							|  |  |  |         #   The spreadsheet to request. | 
					
						
							|  |  |  |         # @param [Google::Apis::SheetsV4::GetSpreadsheetByDataFilterRequest] get_spreadsheet_by_data_filter_request_object | 
					
						
							|  |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							|  |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							|  |  |  |         # @yieldparam result [Google::Apis::SheetsV4::Spreadsheet] parsed result object | 
					
						
							|  |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @return [Google::Apis::SheetsV4::Spreadsheet] | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							|  |  |  |         def get_spreadsheet_by_data_filter(spreadsheet_id, get_spreadsheet_by_data_filter_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}:getByDataFilter', options) | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::GetSpreadsheetByDataFilterRequest::Representation | 
					
						
							|  |  |  |           command.request_object = get_spreadsheet_by_data_filter_request_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::Spreadsheet | 
					
						
							|  |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							|  |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							|  |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							|  |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Returns the developer metadata with the specified ID. The caller must specify | 
					
						
							|  |  |  |         # the spreadsheet ID and the developer metadata's unique metadataId. | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							|  |  |  |         #   The ID of the spreadsheet to retrieve metadata from. | 
					
						
							|  |  |  |         # @param [Fixnum] metadata_id | 
					
						
							|  |  |  |         #   The ID of the developer metadata to retrieve. | 
					
						
							|  |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							|  |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							|  |  |  |         # @yieldparam result [Google::Apis::SheetsV4::DeveloperMetadata] parsed result object | 
					
						
							|  |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @return [Google::Apis::SheetsV4::DeveloperMetadata] | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							|  |  |  |         def get_spreadsheet_developer_metadatum(spreadsheet_id, metadata_id, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}', options) | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |           command.response_representation = Google::Apis::SheetsV4::DeveloperMetadata::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::DeveloperMetadata | 
					
						
							|  |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							|  |  |  |           command.params['metadataId'] = metadata_id unless metadata_id.nil? | 
					
						
							|  |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							|  |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							|  |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Returns all developer metadata matching the specified DataFilter. If the | 
					
						
							|  |  |  |         # provided DataFilter represents a DeveloperMetadataLookup object, this will | 
					
						
							|  |  |  |         # return all DeveloperMetadata entries selected by it. If the DataFilter | 
					
						
							|  |  |  |         # represents a location in a spreadsheet, this will return all developer | 
					
						
							|  |  |  |         # metadata associated with locations intersecting that region. | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							|  |  |  |         #   The ID of the spreadsheet to retrieve metadata from. | 
					
						
							|  |  |  |         # @param [Google::Apis::SheetsV4::SearchDeveloperMetadataRequest] search_developer_metadata_request_object | 
					
						
							|  |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							|  |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							|  |  |  |         # @yieldparam result [Google::Apis::SheetsV4::SearchDeveloperMetadataResponse] parsed result object | 
					
						
							|  |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @return [Google::Apis::SheetsV4::SearchDeveloperMetadataResponse] | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							|  |  |  |         def search_developer_metadatum_developer_metadata(spreadsheet_id, search_developer_metadata_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/developerMetadata:search', options) | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::SearchDeveloperMetadataRequest::Representation | 
					
						
							|  |  |  |           command.request_object = search_developer_metadata_request_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::SearchDeveloperMetadataResponse::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::SearchDeveloperMetadataResponse | 
					
						
							|  |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							|  |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							|  |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							|  |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Copies a single sheet from a spreadsheet to another spreadsheet. Returns the | 
					
						
							|  |  |  |         # properties of the newly created sheet. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							|  |  |  |         #   The ID of the spreadsheet containing the sheet to copy. | 
					
						
							|  |  |  |         # @param [Fixnum] sheet_id | 
					
						
							|  |  |  |         #   The ID of the sheet to copy. | 
					
						
							|  |  |  |         # @param [Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest] copy_sheet_to_another_spreadsheet_request_object | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @yieldparam result [Google::Apis::SheetsV4::SheetProperties] parsed result object | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @return [Google::Apis::SheetsV4::SheetProperties] | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         def copy_spreadsheet(spreadsheet_id, sheet_id, copy_sheet_to_another_spreadsheet_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo', options) | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest::Representation | 
					
						
							|  |  |  |           command.request_object = copy_sheet_to_another_spreadsheet_request_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::SheetProperties::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::SheetProperties | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.params['sheetId'] = sheet_id unless sheet_id.nil? | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2017-04-03 20:18:48 +00:00
										 |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # Appends values to a spreadsheet. The input range is used to search for | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # existing data and find a "table" within that range. Values will be appended to | 
					
						
							|  |  |  |         # the next row of the table, starting with the first column of the table. See | 
					
						
							|  |  |  |         # the [guide](/sheets/api/guides/values#appending_values) and [sample code](/ | 
					
						
							|  |  |  |         # sheets/api/samples/writing#append_values) for specific details of how tables | 
					
						
							|  |  |  |         # are detected and data is appended. The caller must specify the spreadsheet ID, | 
					
						
							|  |  |  |         # range, and a valueInputOption. The `valueInputOption` only controls how the | 
					
						
							|  |  |  |         # input data will be added to the sheet (column-wise or row-wise), it does not | 
					
						
							|  |  |  |         # influence what cell the data starts being written to. | 
					
						
							| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							| 
									
										
										
										
											2016-10-20 20:15:24 +00:00
										 |  |  |         #   The ID of the spreadsheet to update. | 
					
						
							|  |  |  |         # @param [String] range | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   The A1 notation of a range to search for a logical table of data. Values are | 
					
						
							|  |  |  |         #   appended after the last row of the table. | 
					
						
							| 
									
										
										
										
											2016-10-20 20:15:24 +00:00
										 |  |  |         # @param [Google::Apis::SheetsV4::ValueRange] value_range_object | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [Boolean] include_values_in_response | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   Determines if the update response should include the values of the cells that | 
					
						
							|  |  |  |         #   were appended. By default, responses do not include the updated values. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] insert_data_option | 
					
						
							|  |  |  |         #   How the input data should be inserted. | 
					
						
							| 
									
										
										
										
											2016-11-08 23:43:14 +00:00
										 |  |  |         # @param [String] response_date_time_render_option | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   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]. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] response_value_render_option | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   Determines how values in the response should be rendered. The default render | 
					
						
							|  |  |  |         #   option is ValueRenderOption.FORMATTED_VALUE. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] value_input_option | 
					
						
							|  |  |  |         #   How the input data should be interpreted. | 
					
						
							|  |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @yieldparam result [Google::Apis::SheetsV4::AppendValuesResponse] parsed result object | 
					
						
							| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @return [Google::Apis::SheetsV4::AppendValuesResponse] | 
					
						
							| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, include_values_in_response: nil, insert_data_option: nil, response_date_time_render_option: nil, response_value_render_option: nil, value_input_option: nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:append', options) | 
					
						
							| 
									
										
										
										
											2016-10-20 20:15:24 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation | 
					
						
							|  |  |  |           command.request_object = value_range_object | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.response_representation = Google::Apis::SheetsV4::AppendValuesResponse::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::AppendValuesResponse | 
					
						
							| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							| 
									
										
										
										
											2016-10-20 20:15:24 +00:00
										 |  |  |           command.params['range'] = range unless range.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? | 
					
						
							|  |  |  |           command.query['insertDataOption'] = insert_data_option unless insert_data_option.nil? | 
					
						
							|  |  |  |           command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? | 
					
						
							| 
									
										
										
										
											2017-05-04 19:35:56 +00:00
										 |  |  |           command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? | 
					
						
							| 
									
										
										
										
											2016-10-20 20:15:24 +00:00
										 |  |  |           command.query['valueInputOption'] = value_input_option unless value_input_option.nil? | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2016-10-20 20:15:24 +00:00
										 |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Clears one or more ranges of values from a spreadsheet. The caller must | 
					
						
							|  |  |  |         # specify the spreadsheet ID and one or more ranges. Only values are cleared -- | 
					
						
							|  |  |  |         # all other properties of the cell (such as formatting, data validation, etc..) | 
					
						
							|  |  |  |         # are kept. | 
					
						
							| 
									
										
										
										
											2016-10-20 20:15:24 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							| 
									
										
										
										
											2017-03-30 22:30:51 +00:00
										 |  |  |         #   The ID of the spreadsheet to update. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [Google::Apis::SheetsV4::BatchClearValuesRequest] batch_clear_values_request_object | 
					
						
							|  |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							| 
									
										
										
										
											2017-01-25 07:37:13 +00:00
										 |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @yieldparam result [Google::Apis::SheetsV4::BatchClearValuesResponse] parsed result object | 
					
						
							| 
									
										
										
										
											2017-01-25 07:37:13 +00:00
										 |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @return [Google::Apis::SheetsV4::BatchClearValuesResponse] | 
					
						
							| 
									
										
										
										
											2017-01-25 07:37:13 +00:00
										 |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         def batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchClear', options) | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::BatchClearValuesRequest::Representation | 
					
						
							|  |  |  |           command.request_object = batch_clear_values_request_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::BatchClearValuesResponse::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::BatchClearValuesResponse | 
					
						
							| 
									
										
										
										
											2017-01-25 07:37:13 +00:00
										 |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2017-03-27 22:14:47 +00:00
										 |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Clears one or more ranges of values from a spreadsheet. The caller must | 
					
						
							|  |  |  |         # specify the spreadsheet ID and one or more DataFilters. Ranges matching any of | 
					
						
							|  |  |  |         # the specified data filters will be cleared. Only values are cleared -- all | 
					
						
							|  |  |  |         # other properties of the cell (such as formatting, data validation, etc..) are | 
					
						
							|  |  |  |         # kept. | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							|  |  |  |         #   The ID of the spreadsheet to update. | 
					
						
							|  |  |  |         # @param [Google::Apis::SheetsV4::BatchClearValuesByDataFilterRequest] batch_clear_values_by_data_filter_request_object | 
					
						
							|  |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							|  |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							|  |  |  |         # @yieldparam result [Google::Apis::SheetsV4::BatchClearValuesByDataFilterResponse] parsed result object | 
					
						
							|  |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @return [Google::Apis::SheetsV4::BatchClearValuesByDataFilterResponse] | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							|  |  |  |         def batch_spreadsheet_value_clear_by_data_filter(spreadsheet_id, batch_clear_values_by_data_filter_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter', options) | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::BatchClearValuesByDataFilterRequest::Representation | 
					
						
							|  |  |  |           command.request_object = batch_clear_values_by_data_filter_request_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::BatchClearValuesByDataFilterResponse::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::BatchClearValuesByDataFilterResponse | 
					
						
							|  |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							|  |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							|  |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							|  |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Returns one or more ranges of values from a spreadsheet. The caller must | 
					
						
							|  |  |  |         # specify the spreadsheet ID and one or more ranges. | 
					
						
							| 
									
										
										
										
											2017-03-27 22:14:47 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							| 
									
										
										
										
											2017-03-30 22:30:51 +00:00
										 |  |  |         #   The ID of the spreadsheet to retrieve data from. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] date_time_render_option | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   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]. | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |         # @param [String] major_dimension | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   The major dimension that results should use. For example, if the spreadsheet | 
					
						
							|  |  |  |         #   data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=A1:B2,majorDimension= | 
					
						
							|  |  |  |         #   ROWS` returns `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension= | 
					
						
							|  |  |  |         #   COLUMNS` returns `[[1,3],[2,4]]`. | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |         # @param [Array<String>, String] ranges | 
					
						
							|  |  |  |         #   The A1 notation of the values to retrieve. | 
					
						
							|  |  |  |         # @param [String] value_render_option | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   How values should be represented in the output. The default render option is | 
					
						
							|  |  |  |         #   ValueRenderOption.FORMATTED_VALUE. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							| 
									
										
										
										
											2017-03-27 22:14:47 +00:00
										 |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |         # @yieldparam result [Google::Apis::SheetsV4::BatchGetValuesResponse] parsed result object | 
					
						
							| 
									
										
										
										
											2017-03-27 22:14:47 +00:00
										 |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |         # @return [Google::Apis::SheetsV4::BatchGetValuesResponse] | 
					
						
							| 
									
										
										
										
											2017-03-27 22:14:47 +00:00
										 |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         def batch_get_spreadsheet_values(spreadsheet_id, date_time_render_option: nil, major_dimension: nil, ranges: nil, value_render_option: nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values:batchGet', options) | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           command.response_representation = Google::Apis::SheetsV4::BatchGetValuesResponse::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::BatchGetValuesResponse | 
					
						
							| 
									
										
										
										
											2017-03-27 22:14:47 +00:00
										 |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? | 
					
						
							| 
									
										
										
										
											2017-05-26 16:44:32 +00:00
										 |  |  |           command.query['majorDimension'] = major_dimension unless major_dimension.nil? | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           command.query['ranges'] = ranges unless ranges.nil? | 
					
						
							|  |  |  |           command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2017-10-03 00:35:28 +00:00
										 |  |  |         # Returns one or more ranges of values that match the specified data filters. | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # The caller must specify the spreadsheet ID and one or more DataFilters. Ranges | 
					
						
							|  |  |  |         # that match any of the data filters in the request will be returned. | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							|  |  |  |         #   The ID of the spreadsheet to retrieve data from. | 
					
						
							|  |  |  |         # @param [Google::Apis::SheetsV4::BatchGetValuesByDataFilterRequest] batch_get_values_by_data_filter_request_object | 
					
						
							|  |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							|  |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							|  |  |  |         # @yieldparam result [Google::Apis::SheetsV4::BatchGetValuesByDataFilterResponse] parsed result object | 
					
						
							|  |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @return [Google::Apis::SheetsV4::BatchGetValuesByDataFilterResponse] | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							|  |  |  |         def batch_spreadsheet_value_get_by_data_filter(spreadsheet_id, batch_get_values_by_data_filter_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter', options) | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::BatchGetValuesByDataFilterRequest::Representation | 
					
						
							|  |  |  |           command.request_object = batch_get_values_by_data_filter_request_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::BatchGetValuesByDataFilterResponse::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::BatchGetValuesByDataFilterResponse | 
					
						
							|  |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							|  |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							|  |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							|  |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Sets values in one or more ranges of a spreadsheet. The caller must specify | 
					
						
							|  |  |  |         # the spreadsheet ID, a valueInputOption, and one or more ValueRanges. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							|  |  |  |         #   The ID of the spreadsheet to update. | 
					
						
							|  |  |  |         # @param [Google::Apis::SheetsV4::BatchUpdateValuesRequest] batch_update_values_request_object | 
					
						
							|  |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							|  |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							|  |  |  |         # @yieldparam result [Google::Apis::SheetsV4::BatchUpdateValuesResponse] parsed result object | 
					
						
							|  |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @return [Google::Apis::SheetsV4::BatchUpdateValuesResponse] | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							|  |  |  |         def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchUpdate', options) | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::BatchUpdateValuesRequest::Representation | 
					
						
							|  |  |  |           command.request_object = batch_update_values_request_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::BatchUpdateValuesResponse::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::BatchUpdateValuesResponse | 
					
						
							|  |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							| 
									
										
										
										
											2017-06-02 06:11:31 +00:00
										 |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Sets values in one or more ranges of a spreadsheet. The caller must specify | 
					
						
							|  |  |  |         # the spreadsheet ID, a valueInputOption, and one or more DataFilterValueRanges. | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							|  |  |  |         #   The ID of the spreadsheet to update. | 
					
						
							|  |  |  |         # @param [Google::Apis::SheetsV4::BatchUpdateValuesByDataFilterRequest] batch_update_values_by_data_filter_request_object | 
					
						
							|  |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							|  |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							|  |  |  |         # @yieldparam result [Google::Apis::SheetsV4::BatchUpdateValuesByDataFilterResponse] parsed result object | 
					
						
							|  |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @return [Google::Apis::SheetsV4::BatchUpdateValuesByDataFilterResponse] | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							|  |  |  |         def batch_spreadsheet_value_update_by_data_filter(spreadsheet_id, batch_update_values_by_data_filter_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter', options) | 
					
						
							| 
									
										
										
										
											2017-09-20 00:35:54 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::BatchUpdateValuesByDataFilterRequest::Representation | 
					
						
							|  |  |  |           command.request_object = batch_update_values_by_data_filter_request_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::BatchUpdateValuesByDataFilterResponse::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::BatchUpdateValuesByDataFilterResponse | 
					
						
							|  |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							|  |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							|  |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Clears values from a spreadsheet. The caller must specify the spreadsheet ID | 
					
						
							|  |  |  |         # and range. Only values are cleared -- all other properties of the cell (such | 
					
						
							|  |  |  |         # as formatting, data validation, etc..) are kept. | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							|  |  |  |         #   The ID of the spreadsheet to update. | 
					
						
							|  |  |  |         # @param [String] range | 
					
						
							|  |  |  |         #   The A1 notation of the values to clear. | 
					
						
							|  |  |  |         # @param [Google::Apis::SheetsV4::ClearValuesRequest] clear_values_request_object | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							|  |  |  |         # @yieldparam result [Google::Apis::SheetsV4::ClearValuesResponse] parsed result object | 
					
						
							|  |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @return [Google::Apis::SheetsV4::ClearValuesResponse] | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         def clear_values(spreadsheet_id, range, clear_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:clear', options) | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::ClearValuesRequest::Representation | 
					
						
							|  |  |  |           command.request_object = clear_values_request_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::ClearValuesResponse::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::ClearValuesResponse | 
					
						
							|  |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							|  |  |  |           command.params['range'] = range unless range.nil? | 
					
						
							|  |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2017-02-03 19:29:28 +00:00
										 |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Returns a range of values from a spreadsheet. The caller must specify the | 
					
						
							|  |  |  |         # spreadsheet ID and a range. | 
					
						
							| 
									
										
										
										
											2017-02-03 19:29:28 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         #   The ID of the spreadsheet to retrieve data from. | 
					
						
							| 
									
										
										
										
											2017-02-03 19:29:28 +00:00
										 |  |  |         # @param [String] range | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         #   The A1 notation of the values to retrieve. | 
					
						
							|  |  |  |         # @param [String] date_time_render_option | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   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]. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] major_dimension | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   The major dimension that results should use. For example, if the spreadsheet | 
					
						
							|  |  |  |         #   data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=A1:B2,majorDimension= | 
					
						
							|  |  |  |         #   ROWS` returns `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension= | 
					
						
							|  |  |  |         #   COLUMNS` returns `[[1,3],[2,4]]`. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] value_render_option | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   How values should be represented in the output. The default render option is | 
					
						
							|  |  |  |         #   ValueRenderOption.FORMATTED_VALUE. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							| 
									
										
										
										
											2017-02-03 19:29:28 +00:00
										 |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @yieldparam result [Google::Apis::SheetsV4::ValueRange] parsed result object | 
					
						
							| 
									
										
										
										
											2017-02-03 19:29:28 +00:00
										 |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @return [Google::Apis::SheetsV4::ValueRange] | 
					
						
							| 
									
										
										
										
											2017-02-03 19:29:28 +00:00
										 |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         def get_spreadsheet_values(spreadsheet_id, range, date_time_render_option: nil, major_dimension: nil, value_render_option: nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.response_representation = Google::Apis::SheetsV4::ValueRange::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::ValueRange | 
					
						
							| 
									
										
										
										
											2017-02-03 19:29:28 +00:00
										 |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							|  |  |  |           command.params['range'] = range unless range.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? | 
					
						
							|  |  |  |           command.query['majorDimension'] = major_dimension unless major_dimension.nil? | 
					
						
							|  |  |  |           command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2017-02-13 23:28:52 +00:00
										 |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         # Sets values in a range of a spreadsheet. The caller must specify the | 
					
						
							|  |  |  |         # spreadsheet ID, range, and a valueInputOption. | 
					
						
							| 
									
										
										
										
											2017-02-13 23:28:52 +00:00
										 |  |  |         # @param [String] spreadsheet_id | 
					
						
							|  |  |  |         #   The ID of the spreadsheet to update. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] range | 
					
						
							|  |  |  |         #   The A1 notation of the values to update. | 
					
						
							|  |  |  |         # @param [Google::Apis::SheetsV4::ValueRange] value_range_object | 
					
						
							|  |  |  |         # @param [Boolean] include_values_in_response | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   Determines if the update response should include the values of the cells that | 
					
						
							|  |  |  |         #   were updated. By default, responses do not include the updated values. If the | 
					
						
							|  |  |  |         #   range to write was larger than the range actually written, the response | 
					
						
							|  |  |  |         #   includes all values in the requested range (excluding trailing empty rows and | 
					
						
							|  |  |  |         #   columns). | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] response_date_time_render_option | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   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. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] response_value_render_option | 
					
						
							| 
									
										
										
										
											2020-08-18 00:38:22 +00:00
										 |  |  |         #   Determines how values in the response should be rendered. The default render | 
					
						
							|  |  |  |         #   option is ValueRenderOption.FORMATTED_VALUE. | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @param [String] value_input_option | 
					
						
							|  |  |  |         #   How the input data should be interpreted. | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |         # @param [String] fields | 
					
						
							|  |  |  |         #   Selector specifying which fields to include in a partial response. | 
					
						
							| 
									
										
										
										
											2017-06-14 17:02:03 +00:00
										 |  |  |         # @param [String] quota_user | 
					
						
							|  |  |  |         #   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. | 
					
						
							|  |  |  |         # @param [Google::Apis::RequestOptions] options | 
					
						
							|  |  |  |         #   Request-specific options | 
					
						
							|  |  |  |         # | 
					
						
							|  |  |  |         # @yield [result, err] Result & error if block supplied | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @yieldparam result [Google::Apis::SheetsV4::UpdateValuesResponse] parsed result object | 
					
						
							| 
									
										
										
										
											2017-06-14 17:02:03 +00:00
										 |  |  |         # @yieldparam err [StandardError] error object if request failed | 
					
						
							|  |  |  |         # | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         # @return [Google::Apis::SheetsV4::UpdateValuesResponse] | 
					
						
							| 
									
										
										
										
											2017-06-14 17:02:03 +00:00
										 |  |  |         # | 
					
						
							|  |  |  |         # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried | 
					
						
							|  |  |  |         # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification | 
					
						
							|  |  |  |         # @raise [Google::Apis::AuthorizationError] Authorization is required | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |         def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, include_values_in_response: nil, response_date_time_render_option: nil, response_value_render_option: nil, value_input_option: nil, fields: nil, quota_user: nil, options: nil, &block) | 
					
						
							| 
									
										
										
										
											2019-05-10 00:37:26 +00:00
										 |  |  |           command = make_simple_command(:put, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation | 
					
						
							|  |  |  |           command.request_object = value_range_object | 
					
						
							|  |  |  |           command.response_representation = Google::Apis::SheetsV4::UpdateValuesResponse::Representation | 
					
						
							|  |  |  |           command.response_class = Google::Apis::SheetsV4::UpdateValuesResponse | 
					
						
							| 
									
										
										
										
											2017-06-14 17:02:03 +00:00
										 |  |  |           command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.params['range'] = range unless range.nil? | 
					
						
							|  |  |  |           command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? | 
					
						
							|  |  |  |           command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? | 
					
						
							|  |  |  |           command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? | 
					
						
							|  |  |  |           command.query['valueInputOption'] = value_input_option unless value_input_option.nil? | 
					
						
							| 
									
										
										
										
											2017-07-12 20:10:42 +00:00
										 |  |  |           command.query['fields'] = fields unless fields.nil? | 
					
						
							| 
									
										
										
										
											2017-08-25 19:54:22 +00:00
										 |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  |           execute_or_queue_command(command, &block) | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         protected | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         def apply_command_defaults(command) | 
					
						
							| 
									
										
										
										
											2017-04-03 20:18:48 +00:00
										 |  |  |           command.query['key'] = key unless key.nil? | 
					
						
							| 
									
										
										
										
											2017-05-04 19:35:56 +00:00
										 |  |  |           command.query['quotaUser'] = quota_user unless quota_user.nil? | 
					
						
							| 
									
										
										
										
											2016-05-16 16:49:15 +00:00
										 |  |  |         end | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |