diff --git a/generated/google/apis/sheets_v1.rb b/generated/google/apis/sheets_v1.rb deleted file mode 100644 index ddb74baef..000000000 --- a/generated/google/apis/sheets_v1.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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/sheets_v1/service.rb' -require 'google/apis/sheets_v1/classes.rb' -require 'google/apis/sheets_v1/representations.rb' - -module Google - module Apis - # Google Sheets API - # - # An API for reading and modifying Google Sheets. - # - # @see - module SheetsV1 - VERSION = 'V1' - REVISION = '20160328' - - # View the files in your Google Drive - AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly' - - # View your Google Spreadsheets - AUTH_SPREADSHEETS_READONLY = 'https://www.googleapis.com/auth/spreadsheets.readonly' - - # View and manage your spreadsheets in Google Drive - AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets' - - # View and manage the files in your Google Drive - AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' - end - end -end diff --git a/generated/google/apis/sheets_v1/classes.rb b/generated/google/apis/sheets_v1/classes.rb deleted file mode 100644 index f7f5c2692..000000000 --- a/generated/google/apis/sheets_v1/classes.rb +++ /dev/null @@ -1,4542 +0,0 @@ -# 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 'date' -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 SheetsV1 - - # The result of moving an embedded object to a sheet. - class MoveEmbeddedObjectToSheetResponse - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV1::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - end - end - - # The result of adding a named range. - class AddNamedRangeResponse - include Google::Apis::Core::Hashable - - # A named range. - # Corresponds to the JSON property `namedRange` - # @return [Google::Apis::SheetsV1::NamedRange] - attr_accessor :named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range = args[:named_range] if args.key?(:named_range) - end - end - - # Updates an existing protected range with the specified protected range id. - class UpdateProtectedRangeRequest - include Google::Apis::Core::Hashable - - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV1::ProtectedRange] - attr_accessor :protected_range - - # The fields that should be updated. At least one field must be specified. - # The root 'protectedRange' is implied and should not be specified. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) - @fields = args[:fields] if args.key?(:fields) - end - end - - # The amount of padding around the cell, in pixels. - # When updating padding, every field must be specified. - class Padding - include Google::Apis::Core::Hashable - - # The left padding of the cell. - # Corresponds to the JSON property `left` - # @return [Fixnum] - attr_accessor :left - - # The right padding of the cell. - # Corresponds to the JSON property `right` - # @return [Fixnum] - attr_accessor :right - - # The top padding of the cell. - # Corresponds to the JSON property `top` - # @return [Fixnum] - attr_accessor :top - - # The bottom padding of the cell. - # Corresponds to the JSON property `bottom` - # @return [Fixnum] - attr_accessor :bottom - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @left = args[:left] if args.key?(:left) - @right = args[:right] if args.key?(:right) - @top = args[:top] if args.key?(:top) - @bottom = args[:bottom] if args.key?(:bottom) - end - end - - # Merges all cells in the range. - class MergeCellsRequest - include Google::Apis::Core::Hashable - - # How the cells should be merged. - # Corresponds to the JSON property `mergeType` - # @return [String] - attr_accessor :merge_type - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @merge_type = args[:merge_type] if args.key?(:merge_type) - @range = args[:range] if args.key?(:range) - end - end - - # The result of adding a sheet. - class AddSheetResponse - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV1::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - end - end - - # Updates a conditional format rule at the given index, - # or moves a conditional format rule to another index. - class UpdateConditionalFormatRuleRequest - include Google::Apis::Core::Hashable - - # The sheet of the rule to move. Required if newIndex is set, - # unused otherwise. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The 0-based index of the rule that should be replaced or moved. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # A rule describing a conditional format. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV1::ConditionalFormatRule] - attr_accessor :rule - - # The 0-based new index the rule should end up at. - # Corresponds to the JSON property `newIndex` - # @return [Fixnum] - attr_accessor :new_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @index = args[:index] if args.key?(:index) - @rule = args[:rule] if args.key?(:rule) - @new_index = args[:new_index] if args.key?(:new_index) - end - end - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - class TextFormat - include Google::Apis::Core::Hashable - - # True if the text is bold. - # Corresponds to the JSON property `bold` - # @return [Boolean] - attr_accessor :bold - alias_method :bold?, :bold - - # True if the text is italicized. - # Corresponds to the JSON property `italic` - # @return [Boolean] - attr_accessor :italic - alias_method :italic?, :italic - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `foregroundColor` - # @return [Google::Apis::SheetsV1::Color] - attr_accessor :foreground_color - - # The font family. - # Corresponds to the JSON property `fontFamily` - # @return [String] - attr_accessor :font_family - - # True if the text has a strikethrough. - # Corresponds to the JSON property `strikethrough` - # @return [Boolean] - attr_accessor :strikethrough - alias_method :strikethrough?, :strikethrough - - # The size of the font. - # Corresponds to the JSON property `fontSize` - # @return [Fixnum] - attr_accessor :font_size - - # True if the text is underlined. - # Corresponds to the JSON property `underline` - # @return [Boolean] - attr_accessor :underline - alias_method :underline?, :underline - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bold = args[:bold] if args.key?(:bold) - @italic = args[:italic] if args.key?(:italic) - @foreground_color = args[:foreground_color] if args.key?(:foreground_color) - @font_family = args[:font_family] if args.key?(:font_family) - @strikethrough = args[:strikethrough] if args.key?(:strikethrough) - @font_size = args[:font_size] if args.key?(:font_size) - @underline = args[:underline] if args.key?(:underline) - end - end - - # A coordinate in a sheet. - # All indexes are 0-based. - class GridCoordinate - include Google::Apis::Core::Hashable - - # The sheet this coordinate is on. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The row index of the coordinate. - # Corresponds to the JSON property `rowIndex` - # @return [Fixnum] - attr_accessor :row_index - - # The column index of the coordinate. - # Corresponds to the JSON property `columnIndex` - # @return [Fixnum] - attr_accessor :column_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @row_index = args[:row_index] if args.key?(:row_index) - @column_index = args[:column_index] if args.key?(:column_index) - end - end - - # Deletes a particular filter view. - class DeleteFilterViewRequest - include Google::Apis::Core::Hashable - - # The ID of the filter to delete. - # Corresponds to the JSON property `filterId` - # @return [Fixnum] - attr_accessor :filter_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter_id = args[:filter_id] if args.key?(:filter_id) - end - end - - # Updates properties of the named range with the specified named range id. - # It is an error to specify read only fields in the field mask. - class UpdateNamedRangeRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root 'namedRange' is implied and should not be specified. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # A named range. - # Corresponds to the JSON property `namedRange` - # @return [Google::Apis::SheetsV1::NamedRange] - attr_accessor :named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @named_range = args[:named_range] if args.key?(:named_range) - end - end - - # Properties of a spreadsheet. - class SpreadsheetProperties - include Google::Apis::Core::Hashable - - # The time zone of the spreadsheet, in CLDR format such as - # "America/New_York". If the time zone isn't recognized, this may be a - # custom time zone such as "GMT-07:00". - # Corresponds to the JSON property `timeZone` - # @return [String] - attr_accessor :time_zone - - # The amount of time to wait before volatile functions are recalculated. - # Corresponds to the JSON property `autoRecalc` - # @return [String] - attr_accessor :auto_recalc - - # The locale of the spreadsheet in the format of an ISO 639-1 language code - # (e.g. "en"), an ISO 639-2 language code (e.g. "fil") if no 639-1 code - # exists, or a combination of the ISO language code and country code - # (e.g. "en_US"). - # Note: when updating this field, not all locales/languages are supported. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # The title of the spreadsheet - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The format of a cell. - # Corresponds to the JSON property `defaultFormat` - # @return [Google::Apis::SheetsV1::CellFormat] - attr_accessor :default_format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @time_zone = args[:time_zone] if args.key?(:time_zone) - @auto_recalc = args[:auto_recalc] if args.key?(:auto_recalc) - @locale = args[:locale] if args.key?(:locale) - @title = args[:title] if args.key?(:title) - @default_format = args[:default_format] if args.key?(:default_format) - end - end - - # Data about a specific cell. - class CellData - include Google::Apis::Core::Hashable - - # A hyperlink this cell points to, if any. - # This field is read-only. (To set it, use a =HYPERLINK formula.) - # Corresponds to the JSON property `hyperlink` - # @return [String] - attr_accessor :hyperlink - - # The format of a cell. - # Corresponds to the JSON property `effectiveFormat` - # @return [Google::Apis::SheetsV1::CellFormat] - attr_accessor :effective_format - - # Any note on the cell. - # Corresponds to the JSON property `note` - # @return [String] - attr_accessor :note - - # The formatted value of the cell. - # This is the value as it's shown to the user. - # This field is read-only. - # Corresponds to the JSON property `formattedValue` - # @return [String] - attr_accessor :formatted_value - - # A data validation rule. - # Corresponds to the JSON property `dataValidation` - # @return [Google::Apis::SheetsV1::DataValidationRule] - attr_accessor :data_validation - - # Each kind of value a cell in a spreadsheet can have. - # Corresponds to the JSON property `userEnteredValue` - # @return [Google::Apis::SheetsV1::ExtendedValue] - attr_accessor :user_entered_value - - # The format of a cell. - # Corresponds to the JSON property `userEnteredFormat` - # @return [Google::Apis::SheetsV1::CellFormat] - attr_accessor :user_entered_format - - # Runs of rich text applied to subsections of the cell. - # Runs start at specific indexes in the text and continue until the next - # run. Properties of a run will continue unless explicitly changed - # in a subsequent run (and properties of the first run will continue - # the properties of the cell unless explicitly changed). - # When writing, the new runs will overwrite any prior runs. - # Corresponds to the JSON property `textFormatRuns` - # @return [Array] - attr_accessor :text_format_runs - - # Each kind of value a cell in a spreadsheet can have. - # Corresponds to the JSON property `effectiveValue` - # @return [Google::Apis::SheetsV1::ExtendedValue] - attr_accessor :effective_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hyperlink = args[:hyperlink] if args.key?(:hyperlink) - @effective_format = args[:effective_format] if args.key?(:effective_format) - @note = args[:note] if args.key?(:note) - @formatted_value = args[:formatted_value] if args.key?(:formatted_value) - @data_validation = args[:data_validation] if args.key?(:data_validation) - @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) - @user_entered_format = args[:user_entered_format] if args.key?(:user_entered_format) - @text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs) - @effective_value = args[:effective_value] if args.key?(:effective_value) - end - end - - # Unmerges cells in the given range. - class UnmergeCellsRequest - include Google::Apis::Core::Hashable - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - end - end - - # Splits a column of text into multiple columns, - # based on a delimiter in each cell. - class TextToColumnsRequest - include Google::Apis::Core::Hashable - - # The delimiter type to use. - # Corresponds to the JSON property `delimiterType` - # @return [String] - attr_accessor :delimiter_type - - # The delimiter to use. Used only if delimiterType is CUSTOM. - # Corresponds to the JSON property `delimiter` - # @return [String] - attr_accessor :delimiter - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @delimiter_type = args[:delimiter_type] if args.key?(:delimiter_type) - @delimiter = args[:delimiter] if args.key?(:delimiter) - @source = args[:source] if args.key?(:source) - end - end - - # The result of adding a new protected range. - class AddProtectedRangeResponse - include Google::Apis::Core::Hashable - - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV1::ProtectedRange] - attr_accessor :protected_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) - end - end - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - class BooleanCondition - include Google::Apis::Core::Hashable - - # The values of the condition. The number of supported values depends - # on the condition type. Some support zero values, others one or two values, - # and ONE_OF_LIST supports an arbitrary number of values. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - # The type of condition. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values = args[:values] if args.key?(:values) - @type = args[:type] if args.key?(:type) - end - end - - # Deletes the protected range with the given id. - class DeleteProtectedRangeRequest - include Google::Apis::Core::Hashable - - # The ID of the protected range to delete. - # Corresponds to the JSON property `protectedRangeId` - # @return [Fixnum] - attr_accessor :protected_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) - end - end - - # A range along a single dimension on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - class DimensionRange - include Google::Apis::Core::Hashable - - # The end (exclusive) of the span, or not set if unbounded. - # Corresponds to the JSON property `endIndex` - # @return [Fixnum] - attr_accessor :end_index - - # The sheet this span is on. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The start (inclusive) of the span, or not set if unbounded. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The dimension of the span. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_index = args[:end_index] if args.key?(:end_index) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @start_index = args[:start_index] if args.key?(:start_index) - @dimension = args[:dimension] if args.key?(:dimension) - end - end - - # A single response from an update. - class Response - include Google::Apis::Core::Hashable - - # The result of adding a filter view. - # Corresponds to the JSON property `addFilterView` - # @return [Google::Apis::SheetsV1::AddFilterViewResponse] - attr_accessor :add_filter_view - - # The result of moving an embedded object to a sheet. - # Corresponds to the JSON property `moveEmbeddedObjectToSheet` - # @return [Google::Apis::SheetsV1::MoveEmbeddedObjectToSheetResponse] - attr_accessor :move_embedded_object_to_sheet - - # The result of adding a sheet. - # Corresponds to the JSON property `addSheet` - # @return [Google::Apis::SheetsV1::AddSheetResponse] - attr_accessor :add_sheet - - # The result of the find/replace. - # Corresponds to the JSON property `findReplace` - # @return [Google::Apis::SheetsV1::FindReplaceResponse] - attr_accessor :find_replace - - # The result of adding a new protected range. - # Corresponds to the JSON property `addProtectedRange` - # @return [Google::Apis::SheetsV1::AddProtectedRangeResponse] - attr_accessor :add_protected_range - - # The result of updating a conditional format rule. - # Corresponds to the JSON property `updateConditionalFormatRule` - # @return [Google::Apis::SheetsV1::UpdateConditionalFormatRuleResponse] - attr_accessor :update_conditional_format_rule - - # The result of deleting a conditional format rule. - # Corresponds to the JSON property `deleteConditionalFormatRule` - # @return [Google::Apis::SheetsV1::DeleteConditionalFormatRuleResponse] - attr_accessor :delete_conditional_format_rule - - # The result of duplicating a sheet. - # Corresponds to the JSON property `duplicateSheet` - # @return [Google::Apis::SheetsV1::DuplicateSheetResponse] - attr_accessor :duplicate_sheet - - # The result of a filter view being duplicated. - # Corresponds to the JSON property `duplicateFilterView` - # @return [Google::Apis::SheetsV1::DuplicateFilterViewResponse] - attr_accessor :duplicate_filter_view - - # The result of adding a named range. - # Corresponds to the JSON property `addNamedRange` - # @return [Google::Apis::SheetsV1::AddNamedRangeResponse] - attr_accessor :add_named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) - @move_embedded_object_to_sheet = args[:move_embedded_object_to_sheet] if args.key?(:move_embedded_object_to_sheet) - @add_sheet = args[:add_sheet] if args.key?(:add_sheet) - @find_replace = args[:find_replace] if args.key?(:find_replace) - @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) - @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) - @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) - @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) - @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) - @add_named_range = args[:add_named_range] if args.key?(:add_named_range) - end - end - - # Adds a new conditional format rule at the given index. - # All subsequent rules' indexes are incremented. - class AddConditionalFormatRuleRequest - include Google::Apis::Core::Hashable - - # The 0-based index where the rule should be inserted. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # A rule describing a conditional format. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV1::ConditionalFormatRule] - attr_accessor :rule - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @index = args[:index] if args.key?(:index) - @rule = args[:rule] if args.key?(:rule) - end - end - - # A filter view. - class FilterView - include Google::Apis::Core::Hashable - - # The name of the filter view. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The named range this filter view is backed by, if any. - # When writing, only one of range or namedRangeId may be set. - # Corresponds to the JSON property `namedRangeId` - # @return [Fixnum] - attr_accessor :named_range_id - - # The sort order per column. Later specifications are used when values - # are equal in the earlier specifications. - # Corresponds to the JSON property `sortSpecs` - # @return [Array] - attr_accessor :sort_specs - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - # The criteria for showing/hiding values per column. - # The map's key is the column index, and the value is the criteria for - # that column. - # Corresponds to the JSON property `criteria` - # @return [Hash] - attr_accessor :criteria - - # The ID of the filter view. - # Corresponds to the JSON property `filterViewId` - # @return [Fixnum] - attr_accessor :filter_view_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @title = args[:title] if args.key?(:title) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) - @range = args[:range] if args.key?(:range) - @criteria = args[:criteria] if args.key?(:criteria) - @filter_view_id = args[:filter_view_id] if args.key?(:filter_view_id) - end - end - - # Sorts data in rows based on a sort order per column. - class SortRangeRequest - include Google::Apis::Core::Hashable - - # The sort order per column. Later specifications are used when values - # are equal in the earlier specifications. - # Corresponds to the JSON property `sortSpecs` - # @return [Array] - attr_accessor :sort_specs - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) - @range = args[:range] if args.key?(:range) - end - end - - # A run of a text format. The format of this run continues until explicitly - # overridden in the next run. - # When updating, all fields must be set. - class TextFormatRun - include Google::Apis::Core::Hashable - - # The character index where this run starts. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV1::TextFormat] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_index = args[:start_index] if args.key?(:start_index) - @format = args[:format] if args.key?(:format) - end - end - - # Updates properties of the filter view. - class UpdateFilterViewRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root 'filter' is implied and should not be specified. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV1::FilterView] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @filter = args[:filter] if args.key?(:filter) - end - end - - # The result of updating a conditional format rule. - class UpdateConditionalFormatRuleResponse - include Google::Apis::Core::Hashable - - # A rule describing a conditional format. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV1::ConditionalFormatRule] - attr_accessor :rule - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rule = args[:rule] if args.key?(:rule) - end - end - - # Criteria for showing/hiding rows in a filter or filter view. - class FilterCriteria - include Google::Apis::Core::Hashable - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::SheetsV1::BooleanCondition] - attr_accessor :condition - - # Values that should be hidden. - # Corresponds to the JSON property `hiddenValues` - # @return [Array] - attr_accessor :hidden_values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @condition = args[:condition] if args.key?(:condition) - @hidden_values = args[:hidden_values] if args.key?(:hidden_values) - end - end - - # Deletes the dimensions from the sheet. - class DeleteDimensionRequest - include Google::Apis::Core::Hashable - - # A range along a single dimension on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::DimensionRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - end - end - - # A data validation rule. - class DataValidationRule - include Google::Apis::Core::Hashable - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::SheetsV1::BooleanCondition] - attr_accessor :condition - - # A message to show the user when adding data to the cell. - # Corresponds to the JSON property `inputMessage` - # @return [String] - attr_accessor :input_message - - # True if the UI should be customized based on the kind of condition. - # If true, "List" conditions will show a dropdown. - # Corresponds to the JSON property `showCustomUi` - # @return [Boolean] - attr_accessor :show_custom_ui - alias_method :show_custom_ui?, :show_custom_ui - - # True if invalid data should be rejected. - # Corresponds to the JSON property `strict` - # @return [Boolean] - attr_accessor :strict - alias_method :strict?, :strict - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @condition = args[:condition] if args.key?(:condition) - @input_message = args[:input_message] if args.key?(:input_message) - @show_custom_ui = args[:show_custom_ui] if args.key?(:show_custom_ui) - @strict = args[:strict] if args.key?(:strict) - end - end - - # Updates properties of a spreadsheet. - # It is an error to specify read only fields in the field mask. - class UpdateSpreadsheetPropertiesRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root 'properties' is implied and should not be specified. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # Properties of a spreadsheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV1::SpreadsheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @properties = args[:properties] if args.key?(:properties) - end - end - - # The request for updating more than one range of values in a spreadsheet. - class BatchUpdateValuesRequest - include Google::Apis::Core::Hashable - - # The new values to apply to the spreadsheet. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # How the input data should be interpreted. - # Corresponds to the JSON property `valueInputOption` - # @return [String] - attr_accessor :value_input_option - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data = args[:data] if args.key?(:data) - @value_input_option = args[:value_input_option] if args.key?(:value_input_option) - end - end - - # Clears the basic filter, if any exists on the sheet. - class ClearBasicFilterRequest - include Google::Apis::Core::Hashable - - # The sheet ID on which the basic filter should be cleared. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - end - end - - # A rule describing a conditional format. - class ConditionalFormatRule - include Google::Apis::Core::Hashable - - # A rule that applies a gradient color scale format, based on - # the interpolation points listed. The format of a cell will vary - # based on its contents as compared to the values of the interpolation - # points. - # Corresponds to the JSON property `gradientRule` - # @return [Google::Apis::SheetsV1::GradientRule] - attr_accessor :gradient_rule - - # A rule that may or may not match, depending on the condition. - # Corresponds to the JSON property `booleanRule` - # @return [Google::Apis::SheetsV1::BooleanRule] - attr_accessor :boolean_rule - - # The ranges that will be formatted if the condition is true. - # All the ranges must be on the same grid. - # Corresponds to the JSON property `ranges` - # @return [Array] - attr_accessor :ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @gradient_rule = args[:gradient_rule] if args.key?(:gradient_rule) - @boolean_rule = args[:boolean_rule] if args.key?(:boolean_rule) - @ranges = args[:ranges] if args.key?(:ranges) - end - end - - # Updates the borders of a range. - # If a field is not set in the request, that means the border remains as-is. - # For example, with two subsequent SetBorderRequests: - # 1) range: A1:A5 `` top: RED, bottom: WHITE `` - # 2) range: A1:A5 `` left: BLUE `` - # That would result in A1:A5 having a borders of - # `` top: RED, bottom: WHITE, left: BLUE ``. - # If you want to clear a border, explicitly set the style to `NONE`. - class UpdateBordersRequest - include Google::Apis::Core::Hashable - - # A border along a cell. - # Corresponds to the JSON property `right` - # @return [Google::Apis::SheetsV1::Border] - attr_accessor :right - - # A border along a cell. - # Corresponds to the JSON property `innerVertical` - # @return [Google::Apis::SheetsV1::Border] - attr_accessor :inner_vertical - - # A border along a cell. - # Corresponds to the JSON property `top` - # @return [Google::Apis::SheetsV1::Border] - attr_accessor :top - - # A border along a cell. - # Corresponds to the JSON property `innerHorizontal` - # @return [Google::Apis::SheetsV1::Border] - attr_accessor :inner_horizontal - - # A border along a cell. - # Corresponds to the JSON property `bottom` - # @return [Google::Apis::SheetsV1::Border] - attr_accessor :bottom - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - # A border along a cell. - # Corresponds to the JSON property `left` - # @return [Google::Apis::SheetsV1::Border] - attr_accessor :left - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @right = args[:right] if args.key?(:right) - @inner_vertical = args[:inner_vertical] if args.key?(:inner_vertical) - @top = args[:top] if args.key?(:top) - @inner_horizontal = args[:inner_horizontal] if args.key?(:inner_horizontal) - @bottom = args[:bottom] if args.key?(:bottom) - @range = args[:range] if args.key?(:range) - @left = args[:left] if args.key?(:left) - end - end - - # The borders of the cell. - class Borders - include Google::Apis::Core::Hashable - - # A border along a cell. - # Corresponds to the JSON property `right` - # @return [Google::Apis::SheetsV1::Border] - attr_accessor :right - - # A border along a cell. - # Corresponds to the JSON property `left` - # @return [Google::Apis::SheetsV1::Border] - attr_accessor :left - - # A border along a cell. - # Corresponds to the JSON property `top` - # @return [Google::Apis::SheetsV1::Border] - attr_accessor :top - - # A border along a cell. - # Corresponds to the JSON property `bottom` - # @return [Google::Apis::SheetsV1::Border] - attr_accessor :bottom - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @right = args[:right] if args.key?(:right) - @left = args[:left] if args.key?(:left) - @top = args[:top] if args.key?(:top) - @bottom = args[:bottom] if args.key?(:bottom) - end - end - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - class Color - include Google::Apis::Core::Hashable - - # The amount of green in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `green` - # @return [Float] - attr_accessor :green - - # The amount of blue in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `blue` - # @return [Float] - attr_accessor :blue - - # The amount of red in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `red` - # @return [Float] - attr_accessor :red - - # The fraction of this color that should be applied to the pixel. That is, - # the final pixel color is defined by the equation: - # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - # This means that a value of 1.0 corresponds to a solid color, whereas - # a value of 0.0 corresponds to a completely transparent color. This - # uses a wrapper message rather than a simple float scalar so that it is - # possible to distinguish between a default value and the value being unset. - # If omitted, this color object is to be rendered as a solid color - # (as if the alpha value had been explicitly given with a value of 1.0). - # Corresponds to the JSON property `alpha` - # @return [Float] - attr_accessor :alpha - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @green = args[:green] if args.key?(:green) - @blue = args[:blue] if args.key?(:blue) - @red = args[:red] if args.key?(:red) - @alpha = args[:alpha] if args.key?(:alpha) - end - end - - # Adds a new sheet. - # When a sheet is added at a given index, - # all subsequent sheets' indexes are incremented. - class AddSheetRequest - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV1::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - end - end - - # Adds a new protected range. - class AddProtectedRangeRequest - include Google::Apis::Core::Hashable - - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV1::ProtectedRange] - attr_accessor :protected_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) - end - end - - # Data within a range of the spreadsheet. - class ValueRange - include Google::Apis::Core::Hashable - - # The data that was read or to be written. This is an array of arrays, - # the outer array representing all the data and each inner array - # representing a major dimension. Each item in the inner array - # corresponds with one cell. - # For output, empty trailing rows and columns will not be included. - # For input, supported value types are: bool, string, and double. - # Null and empty values will be skipped. - # To set a cell to an empty value, set the string value to an empty string. - # Corresponds to the JSON property `values` - # @return [Array>] - attr_accessor :values - - # The range the values cover, in A1 notation. - # For output, this range indicates the entire requested range, - # even though the values will exclude trailing rows and columns. - # Corresponds to the JSON property `range` - # @return [String] - attr_accessor :range - - # The major dimension of the values. - # For output, if the spreadsheet data is: A1=1,B1=2,A2=3,B2=4, - # then requesting range=A1:B2,majorDimension=ROWS will return [[1,2],[3,4]], - # whereas requesting range=A1:B2,majorDimension=COLUMNS will return - # [[1,3],[2,4]]. - # For input, with range=A1:B2,majorDimension=ROWS then [[1,2],[3,4]] - # will set A1=1,B1=2,A2=3,B2=4. With range=A1:B2,majorDimension=COLUMNS - # then [[1,2],[3,4]] will set A1=1,B1=3,A2=2,B2=4. - # When writing, if this field is not set, it defaults to ROWS. - # Corresponds to the JSON property `majorDimension` - # @return [String] - attr_accessor :major_dimension - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values = args[:values] if args.key?(:values) - @range = args[:range] if args.key?(:range) - @major_dimension = args[:major_dimension] if args.key?(:major_dimension) - end - end - - # The result of the find/replace. - class FindReplaceResponse - include Google::Apis::Core::Hashable - - # The number of non-formula cells changed. - # Corresponds to the JSON property `valuesChanged` - # @return [Fixnum] - attr_accessor :values_changed - - # The number of rows changed. - # Corresponds to the JSON property `rowsChanged` - # @return [Fixnum] - attr_accessor :rows_changed - - # The number of occurrences (possibly multiple within a cell) changed. - # For example, if replacing "e" with o" in "Google Sheets", this would - # be "3" because "Google Sheets" -> "Googlo Shoots". - # Corresponds to the JSON property `occurrencesChanged` - # @return [Fixnum] - attr_accessor :occurrences_changed - - # The number of sheets changed. - # Corresponds to the JSON property `sheetsChanged` - # @return [Fixnum] - attr_accessor :sheets_changed - - # The number of formula cells changed. - # Corresponds to the JSON property `formulasChanged` - # @return [Fixnum] - attr_accessor :formulas_changed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values_changed = args[:values_changed] if args.key?(:values_changed) - @rows_changed = args[:rows_changed] if args.key?(:rows_changed) - @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) - @sheets_changed = args[:sheets_changed] if args.key?(:sheets_changed) - @formulas_changed = args[:formulas_changed] if args.key?(:formulas_changed) - end - end - - # The format of a cell. - class CellFormat - include Google::Apis::Core::Hashable - - # The horizontal alignment of the value in cell. - # Corresponds to the JSON property `horizontalAlignment` - # @return [String] - attr_accessor :horizontal_alignment - - # How a hyperlink, if it exists, should be displayed in the cell. - # Corresponds to the JSON property `hyperlinkDisplayType` - # @return [String] - attr_accessor :hyperlink_display_type - - # The borders of the cell. - # Corresponds to the JSON property `borders` - # @return [Google::Apis::SheetsV1::Borders] - attr_accessor :borders - - # The direction of the text in the cell. - # Corresponds to the JSON property `textDirection` - # @return [String] - attr_accessor :text_direction - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `textFormat` - # @return [Google::Apis::SheetsV1::TextFormat] - attr_accessor :text_format - - # The amount of padding around the cell, in pixels. - # When updating padding, every field must be specified. - # Corresponds to the JSON property `padding` - # @return [Google::Apis::SheetsV1::Padding] - attr_accessor :padding - - # The number format of a cell. - # When updating, all fields must be set. - # Corresponds to the JSON property `numberFormat` - # @return [Google::Apis::SheetsV1::NumberFormat] - attr_accessor :number_format - - # The wrap strategy for the value in the cell. - # Corresponds to the JSON property `wrapStrategy` - # @return [String] - attr_accessor :wrap_strategy - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `backgroundColor` - # @return [Google::Apis::SheetsV1::Color] - attr_accessor :background_color - - # The vertical alignment of the value in cell. - # Corresponds to the JSON property `verticalAlignment` - # @return [String] - attr_accessor :vertical_alignment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment) - @hyperlink_display_type = args[:hyperlink_display_type] if args.key?(:hyperlink_display_type) - @borders = args[:borders] if args.key?(:borders) - @text_direction = args[:text_direction] if args.key?(:text_direction) - @text_format = args[:text_format] if args.key?(:text_format) - @padding = args[:padding] if args.key?(:padding) - @number_format = args[:number_format] if args.key?(:number_format) - @wrap_strategy = args[:wrap_strategy] if args.key?(:wrap_strategy) - @background_color = args[:background_color] if args.key?(:background_color) - @vertical_alignment = args[:vertical_alignment] if args.key?(:vertical_alignment) - end - end - - # Moves one or more rows or columns. - class MoveDimensionRequest - include Google::Apis::Core::Hashable - - # The 0-based start index of where to move the source data to, - # based on the coordinates *before* the source data is removed - # from the grid. Existing data will be shifted down or right - # (depending on the dimension) to make room for the moved dimensions. - # The source dimensions are removed from the grid, so the - # the data may end up in a different index than specified. - # For example, given A1..A5 of 0, 1, 2, 3, 4 and wanting to move - # "1" and "2" to between "3" and "4", the source would be `ROWS [1..3)`, - # and the destination index would be '4' (the 0-based index of row 5). - # The end result would be A1..A5 of 0, 3, 1, 2, 4. - # Corresponds to the JSON property `destinationIndex` - # @return [Fixnum] - attr_accessor :destination_index - - # A range along a single dimension on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV1::DimensionRange] - attr_accessor :source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination_index = args[:destination_index] if args.key?(:destination_index) - @source = args[:source] if args.key?(:source) - end - end - - # Properties about a dimension. - class DimensionProperties - include Google::Apis::Core::Hashable - - # The height (if a row) or width (if a column) of the dimension in pixels. - # Corresponds to the JSON property `pixelSize` - # @return [Fixnum] - attr_accessor :pixel_size - - # True if this dimension is explicitly hidden. - # Corresponds to the JSON property `hiddenByUser` - # @return [Boolean] - attr_accessor :hidden_by_user - alias_method :hidden_by_user?, :hidden_by_user - - # True if this dimension is being filtered. - # This field is read-only. - # Corresponds to the JSON property `hiddenByFilter` - # @return [Boolean] - attr_accessor :hidden_by_filter - alias_method :hidden_by_filter?, :hidden_by_filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pixel_size = args[:pixel_size] if args.key?(:pixel_size) - @hidden_by_user = args[:hidden_by_user] if args.key?(:hidden_by_user) - @hidden_by_filter = args[:hidden_by_filter] if args.key?(:hidden_by_filter) - end - end - - # A single interpolation point a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - class InterpolationPoint - include Google::Apis::Core::Hashable - - # The value this interpolation point uses. May be a formula. - # Unused if pointType is MIN or MAX. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `color` - # @return [Google::Apis::SheetsV1::Color] - attr_accessor :color - - # How the value should be interpreted. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @color = args[:color] if args.key?(:color) - @type = args[:type] if args.key?(:type) - end - end - - # An error in a cell. - class ErrorValue - include Google::Apis::Core::Hashable - - # The type of error. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # A message with more information about the error - # (in the spreadsheet's locale). - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @message = args[:message] if args.key?(:message) - end - end - - # Duplicates a particular filter view. - class DuplicateFilterViewRequest - include Google::Apis::Core::Hashable - - # The ID of the filter being duplicated. - # Corresponds to the JSON property `filterId` - # @return [Fixnum] - attr_accessor :filter_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter_id = args[:filter_id] if args.key?(:filter_id) - end - end - - # The request for updating any aspect of a spreadsheet. - class BatchUpdateSpreadsheetRequest - include Google::Apis::Core::Hashable - - # A list of updates to apply to the spreadsheet. - # Corresponds to the JSON property `requests` - # @return [Array] - attr_accessor :requests - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @requests = args[:requests] if args.key?(:requests) - end - end - - # Properties of a sheet. - class SheetProperties - include Google::Apis::Core::Hashable - - # The name of the sheet. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The index of the sheet within the spreadsheet. - # This uses a wrapper message rather than simple int32 value - # so that adding a new sheet can distinguish between adding - # it at index 0 and adding it at the default (end) location. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # True if the sheet is hidden in the UI, false if it's visible. - # Corresponds to the JSON property `hidden` - # @return [Boolean] - attr_accessor :hidden - alias_method :hidden?, :hidden - - # Properties of a grid. - # Corresponds to the JSON property `gridProperties` - # @return [Google::Apis::SheetsV1::GridProperties] - attr_accessor :grid_properties - - # The ID of the sheet. - # This field cannot be changed once set. - # This uses a wrapper message rather than simple int32 value because - # the sheet_id '0' is very common and we want the ID to be explicit. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # True if the sheet is an RTL sheet instead of an LTR sheet. - # Corresponds to the JSON property `rightToLeft` - # @return [Boolean] - attr_accessor :right_to_left - alias_method :right_to_left?, :right_to_left - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `tabColor` - # @return [Google::Apis::SheetsV1::Color] - attr_accessor :tab_color - - # The type of sheet. - # This field is read-only. - # Corresponds to the JSON property `sheetType` - # @return [String] - attr_accessor :sheet_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @title = args[:title] if args.key?(:title) - @index = args[:index] if args.key?(:index) - @hidden = args[:hidden] if args.key?(:hidden) - @grid_properties = args[:grid_properties] if args.key?(:grid_properties) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @right_to_left = args[:right_to_left] if args.key?(:right_to_left) - @tab_color = args[:tab_color] if args.key?(:tab_color) - @sheet_type = args[:sheet_type] if args.key?(:sheet_type) - end - end - - # A protected range. - class ProtectedRange - include Google::Apis::Core::Hashable - - # The list of unprotected ranges within a protected sheet. - # Unprotected ranges are only supported on protected sheets. - # Corresponds to the JSON property `unprotectedRanges` - # @return [Array] - attr_accessor :unprotected_ranges - - # The description of this protected range. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The named range this protected range is backed by, if any. - # When writing, only one of range or namedRangeId may be set. - # Corresponds to the JSON property `namedRangeId` - # @return [Fixnum] - attr_accessor :named_range_id - - # True if the user who requested this protected range can edit the - # protected area. - # This field is read-only. - # Corresponds to the JSON property `requestingUserCanEdit` - # @return [Boolean] - attr_accessor :requesting_user_can_edit - alias_method :requesting_user_can_edit?, :requesting_user_can_edit - - # The editors of a protected range. - # Corresponds to the JSON property `editors` - # @return [Google::Apis::SheetsV1::Editors] - attr_accessor :editors - - # The ID of the protected range. - # This field is read-only. - # Corresponds to the JSON property `protectedRangeId` - # @return [Fixnum] - attr_accessor :protected_range_id - - # True if this this protected range will show a warning when editing. - # Warning-based protection means that every user can edit data in the - # protected range, except editing will prompt a warning asking the user - # to confirm the edit. - # When warning: if this field is true, then `editors` is ignored. - # Additionally, if this field is changed from true to false and the - # editors field is not set (nor included in the field mask), then - # the editors will be set to all the editors in the document. - # Corresponds to the JSON property `warningOnly` - # @return [Boolean] - attr_accessor :warning_only - alias_method :warning_only?, :warning_only - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @unprotected_ranges = args[:unprotected_ranges] if args.key?(:unprotected_ranges) - @description = args[:description] if args.key?(:description) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @requesting_user_can_edit = args[:requesting_user_can_edit] if args.key?(:requesting_user_can_edit) - @editors = args[:editors] if args.key?(:editors) - @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) - @warning_only = args[:warning_only] if args.key?(:warning_only) - @range = args[:range] if args.key?(:range) - end - end - - # Deletes a conditional format rule at the given index. - # All subsequent rules' indexes are decremented. - class DeleteConditionalFormatRuleRequest - include Google::Apis::Core::Hashable - - # The sheet the rule is being deleted from. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The 0-based index of the rule to be deleted. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @index = args[:index] if args.key?(:index) - end - end - - # A combination of a source range and how to extend that source. - class SourceAndDestination - include Google::Apis::Core::Hashable - - # The number of rows or columns that data should be filled into. - # Positive numbers expand beyond the last row or last column - # of the source. Negative numbers expand before the first row - # or first column of the source. - # Corresponds to the JSON property `fillLength` - # @return [Fixnum] - attr_accessor :fill_length - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :source - - # The dimension that data should be filled into. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fill_length = args[:fill_length] if args.key?(:fill_length) - @source = args[:source] if args.key?(:source) - @dimension = args[:dimension] if args.key?(:dimension) - end - end - - # The value of the condition. - class ConditionValue - include Google::Apis::Core::Hashable - - # A relative date (based on the current date). - # Valid only if the type is DATE_BEFORE, DATE_AFTER, - # DATE_ON_OR_BEFORE or DATE_ON_OR_AFTER. - # Relative dates are not supported in data validation. - # They are supported only in conditional formatting and - # conditional filters. - # Corresponds to the JSON property `relativeDate` - # @return [String] - attr_accessor :relative_date - - # A value the condition is based on. - # The value will be parsed as if the user typed into a cell. - # Formulas are supported (and must begin with an '='). - # Corresponds to the JSON property `userEnteredValue` - # @return [String] - attr_accessor :user_entered_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @relative_date = args[:relative_date] if args.key?(:relative_date) - @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) - end - end - - # Inserts data into the spreadsheet starting at the specified coordinate. - class PasteDataRequest - include Google::Apis::Core::Hashable - - # The data to insert. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # A coordinate in a sheet. - # All indexes are 0-based. - # Corresponds to the JSON property `coordinate` - # @return [Google::Apis::SheetsV1::GridCoordinate] - attr_accessor :coordinate - - # The delimiter in the data. - # Corresponds to the JSON property `delimiter` - # @return [String] - attr_accessor :delimiter - - # How the data should be pasted. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # True if the data is HTML. - # Corresponds to the JSON property `html` - # @return [Boolean] - attr_accessor :html - alias_method :html?, :html - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data = args[:data] if args.key?(:data) - @coordinate = args[:coordinate] if args.key?(:coordinate) - @delimiter = args[:delimiter] if args.key?(:delimiter) - @type = args[:type] if args.key?(:type) - @html = args[:html] if args.key?(:html) - end - end - - # Finds and replaces data in cells over a range, sheet, or all sheets. - class FindReplaceRequest - include Google::Apis::Core::Hashable - - # The value to search. - # Corresponds to the JSON property `find` - # @return [String] - attr_accessor :find - - # The value to use as the replacement. - # Corresponds to the JSON property `replacement` - # @return [String] - attr_accessor :replacement - - # True if the find value is a regex. - # The regular expression and replacement should follow Java regex rules - # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. - # The replacement string is allowed to refer to capturing groups. - # For example, with cells "Google Sheets" and "Google Docs", - # searching for "o.* (.*)" with a replacement of "$1 Rocks" would create - # "GSheets Rocks" and "GDocs Rocks" respectively. - # Corresponds to the JSON property `searchByRegex` - # @return [Boolean] - attr_accessor :search_by_regex - alias_method :search_by_regex?, :search_by_regex - - # The sheet to find/replace over. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # True to find/replace over all sheets. - # Corresponds to the JSON property `allSheets` - # @return [Boolean] - attr_accessor :all_sheets - alias_method :all_sheets?, :all_sheets - - # True if the search is case sensitive. - # Corresponds to the JSON property `matchCase` - # @return [Boolean] - attr_accessor :match_case - alias_method :match_case?, :match_case - - # True if the search should include cells with formulas. - # False to skip cells with formulas. - # Corresponds to the JSON property `includeFormulas` - # @return [Boolean] - attr_accessor :include_formulas - alias_method :include_formulas?, :include_formulas - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - # True if the find value should match the entire cell. - # Corresponds to the JSON property `matchEntireCell` - # @return [Boolean] - attr_accessor :match_entire_cell - alias_method :match_entire_cell?, :match_entire_cell - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @find = args[:find] if args.key?(:find) - @replacement = args[:replacement] if args.key?(:replacement) - @search_by_regex = args[:search_by_regex] if args.key?(:search_by_regex) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @all_sheets = args[:all_sheets] if args.key?(:all_sheets) - @match_case = args[:match_case] if args.key?(:match_case) - @include_formulas = args[:include_formulas] if args.key?(:include_formulas) - @range = args[:range] if args.key?(:range) - @match_entire_cell = args[:match_entire_cell] if args.key?(:match_entire_cell) - end - end - - # A sort order associated with a specific column or row. - class SortSpec - include Google::Apis::Core::Hashable - - # The order data should be sorted. - # Corresponds to the JSON property `sortOrder` - # @return [String] - attr_accessor :sort_order - - # The dimension the sort should be applied to. - # Corresponds to the JSON property `dimensionIndex` - # @return [Fixnum] - attr_accessor :dimension_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sort_order = args[:sort_order] if args.key?(:sort_order) - @dimension_index = args[:dimension_index] if args.key?(:dimension_index) - end - end - - # The request to copy a sheet across spreadsheets. - class CopySheetToAnotherSpreadsheetRequest - include Google::Apis::Core::Hashable - - # The ID of the spreadsheet to copy the sheet to. - # Corresponds to the JSON property `destinationSpreadsheetId` - # @return [String] - attr_accessor :destination_spreadsheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination_spreadsheet_id = args[:destination_spreadsheet_id] if args.key?(:destination_spreadsheet_id) - end - end - - # The number format of a cell. - # When updating, all fields must be set. - class NumberFormat - include Google::Apis::Core::Hashable - - # Pattern string used for formatting. - # Corresponds to the JSON property `pattern` - # @return [String] - attr_accessor :pattern - - # The type of the number format. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pattern = args[:pattern] if args.key?(:pattern) - @type = args[:type] if args.key?(:type) - end - end - - # Updates properties of dimensions within the specified range. - # It is an error to specify read only fields in the field mask. - class UpdateDimensionPropertiesRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root 'properties' is implied and should not be specified. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # Properties about a dimension. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV1::DimensionProperties] - attr_accessor :properties - - # A range along a single dimension on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::DimensionRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @properties = args[:properties] if args.key?(:properties) - @range = args[:range] if args.key?(:range) - end - end - - # The editors of a protected range. - class Editors - include Google::Apis::Core::Hashable - - # True if anyone in the document's domain has edit access to the protected - # range. Domain protection is only supported on documents within a domain. - # Corresponds to the JSON property `domainUsersCanEdit` - # @return [Boolean] - attr_accessor :domain_users_can_edit - alias_method :domain_users_can_edit?, :domain_users_can_edit - - # The email addresses of groups with edit access to the protected range. - # Corresponds to the JSON property `groups` - # @return [Array] - attr_accessor :groups - - # The email addresses of users with edit access to the protected range. - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @domain_users_can_edit = args[:domain_users_can_edit] if args.key?(:domain_users_can_edit) - @groups = args[:groups] if args.key?(:groups) - @users = args[:users] if args.key?(:users) - end - end - - # A spreadsheet. - class Spreadsheet - include Google::Apis::Core::Hashable - - # The ID of the spreadsheet. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # Properties of a spreadsheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV1::SpreadsheetProperties] - attr_accessor :properties - - # The named ranges in the spreadsheet. - # Corresponds to the JSON property `namedRanges` - # @return [Array] - attr_accessor :named_ranges - - # Each sheet in the spreadsheet. - # Corresponds to the JSON property `sheets` - # @return [Array] - attr_accessor :sheets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @properties = args[:properties] if args.key?(:properties) - @named_ranges = args[:named_ranges] if args.key?(:named_ranges) - @sheets = args[:sheets] if args.key?(:sheets) - end - end - - # Data in the grid, as well as metadata about the dimensions. - class GridData - include Google::Apis::Core::Hashable - - # Metadata about the requested columns in the grid, starting with the column - # in startColumn. - # Corresponds to the JSON property `columnMetadata` - # @return [Array] - attr_accessor :column_metadata - - # The data in the grid, one entry per row, - # starting with the row in startRow. - # The values in RowData will correspond to columns starting - # at start_column. - # Corresponds to the JSON property `rowData` - # @return [Array] - attr_accessor :row_data - - # Metadata about the requested rows in the grid, starting with the row - # in startRow. - # Corresponds to the JSON property `rowMetadata` - # @return [Array] - attr_accessor :row_metadata - - # The first row this GridData refers to, 0-based. - # Corresponds to the JSON property `startRow` - # @return [Fixnum] - attr_accessor :start_row - - # The first column this GridData refers to, 0-based. - # Corresponds to the JSON property `startColumn` - # @return [Fixnum] - attr_accessor :start_column - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_metadata = args[:column_metadata] if args.key?(:column_metadata) - @row_data = args[:row_data] if args.key?(:row_data) - @row_metadata = args[:row_metadata] if args.key?(:row_metadata) - @start_row = args[:start_row] if args.key?(:start_row) - @start_column = args[:start_column] if args.key?(:start_column) - end - end - - # The default filter associated with a sheet. - class BasicFilter - include Google::Apis::Core::Hashable - - # The criteria for showing/hiding values per column. - # The map's key is the column index, and the value is the criteria for - # that column. - # Corresponds to the JSON property `criteria` - # @return [Hash] - attr_accessor :criteria - - # The sort order per column. Later specifications are used when values - # are equal in the earlier specifications. - # Corresponds to the JSON property `sortSpecs` - # @return [Array] - attr_accessor :sort_specs - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @criteria = args[:criteria] if args.key?(:criteria) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) - @range = args[:range] if args.key?(:range) - end - end - - # Duplicates the contents of a sheet. - class DuplicateSheetRequest - include Google::Apis::Core::Hashable - - # If set, the ID of the new sheet. If not set, an ID is chosen. - # If set, the ID must not conflict with any existing sheet ID. - # Corresponds to the JSON property `newSheetId` - # @return [Fixnum] - attr_accessor :new_sheet_id - - # The sheet to duplicate. - # Corresponds to the JSON property `sourceSheetId` - # @return [Fixnum] - attr_accessor :source_sheet_id - - # The name of the new sheet. If empty, a new name is chosen for you. - # Corresponds to the JSON property `newSheetName` - # @return [String] - attr_accessor :new_sheet_name - - # The 0-based index the new sheet should be inserted at. - # The index of all sheets after this are incremented. - # Corresponds to the JSON property `insertSheetIndex` - # @return [Fixnum] - attr_accessor :insert_sheet_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id) - @source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id) - @new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name) - @insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index) - end - end - - # The result of adding a filter view. - class AddFilterViewResponse - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV1::FilterView] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - end - end - - # The result of duplicating a sheet. - class DuplicateSheetResponse - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV1::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - end - end - - # A border along a cell. - class Border - include Google::Apis::Core::Hashable - - # The width of the border, in pixels. - # Corresponds to the JSON property `width` - # @return [Fixnum] - attr_accessor :width - - # The style of the border. - # Corresponds to the JSON property `style` - # @return [String] - attr_accessor :style - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `color` - # @return [Google::Apis::SheetsV1::Color] - attr_accessor :color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @width = args[:width] if args.key?(:width) - @style = args[:style] if args.key?(:style) - @color = args[:color] if args.key?(:color) - end - end - - # Adds a named range to the spreadsheet. - class AddNamedRangeRequest - include Google::Apis::Core::Hashable - - # A named range. - # Corresponds to the JSON property `namedRange` - # @return [Google::Apis::SheetsV1::NamedRange] - attr_accessor :named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range = args[:named_range] if args.key?(:named_range) - end - end - - # Adds new cells to the last row with data in a sheet, - # inserting new rows into the sheet if necessary. - class AppendCellsRequest - include Google::Apis::Core::Hashable - - # The sheet ID to append the data to. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The data to append. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # The fields of CellData to that should be updated. - # At least one field must be specified. - # The root is the CellData; 'row.values.' should not be specified. - # Corresponds to the JSON property `cellDataFields` - # @return [String] - attr_accessor :cell_data_fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @rows = args[:rows] if args.key?(:rows) - @cell_data_fields = args[:cell_data_fields] if args.key?(:cell_data_fields) - end - end - - # Data about each cell in a row. - class RowData - include Google::Apis::Core::Hashable - - # The values in the row, one per column. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values = args[:values] if args.key?(:values) - end - end - - # Updates all cells in the range to the values in the given Cell object. - # Only the fields set in the fields will be updated. - # If writing a cell with a formula, the formula's ranges will automatically - # increment for each field in the range. - # For example, if writing a cell with formula `=A1` into range B2:C4, - # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, - # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. - # To keep the formula's ranges static, use the `$` indicator. - # For example, if the formula was `=$A$1`, then neither - # the row nor column would increment. - class RepeatCellRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root 'cell' is implied and should not be specified. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # Data about a specific cell. - # Corresponds to the JSON property `cell` - # @return [Google::Apis::SheetsV1::CellData] - attr_accessor :cell - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @cell = args[:cell] if args.key?(:cell) - @range = args[:range] if args.key?(:range) - end - end - - # A named range. - class NamedRange - include Google::Apis::Core::Hashable - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - # The ID of the named range. - # Corresponds to the JSON property `namedRangeId` - # @return [Fixnum] - attr_accessor :named_range_id - - # The name of the named range. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @name = args[:name] if args.key?(:name) - end - end - - # Sets the basic filter associated with a sheet. - class SetBasicFilterRequest - include Google::Apis::Core::Hashable - - # The default filter associated with a sheet. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV1::BasicFilter] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - end - end - - # Automatically resizes one or more dimensions based on the contents - # of the cells in that dimension. - class AutoResizeDimensionsRequest - include Google::Apis::Core::Hashable - - # A range along a single dimension on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `dimensions` - # @return [Google::Apis::SheetsV1::DimensionRange] - attr_accessor :dimensions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimensions = args[:dimensions] if args.key?(:dimensions) - end - end - - # The result of a filter view being duplicated. - class DuplicateFilterViewResponse - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV1::FilterView] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - end - end - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - class GridRange - include Google::Apis::Core::Hashable - - # The start column (inclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `startColumnIndex` - # @return [Fixnum] - attr_accessor :start_column_index - - # The sheet this range is on. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The end column (exclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `endColumnIndex` - # @return [Fixnum] - attr_accessor :end_column_index - - # The end row (exclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `endRowIndex` - # @return [Fixnum] - attr_accessor :end_row_index - - # The start row (inclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `startRowIndex` - # @return [Fixnum] - attr_accessor :start_row_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_column_index = args[:start_column_index] if args.key?(:start_column_index) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @end_column_index = args[:end_column_index] if args.key?(:end_column_index) - @end_row_index = args[:end_row_index] if args.key?(:end_row_index) - @start_row_index = args[:start_row_index] if args.key?(:start_row_index) - end - end - - # Deletes the requested sheet. - class DeleteSheetRequest - include Google::Apis::Core::Hashable - - # The ID of the sheet to delete. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - end - end - - # Moves an embedded object (such as a chart or image) to its own sheet. - class MoveEmbeddedObjectToSheetRequest - include Google::Apis::Core::Hashable - - # The sheet to move it to. If not set, a sheet ID is chosen for you. - # If set, the ID must not conflict with any existing sheet ID. - # Corresponds to the JSON property `newSheetId` - # @return [Fixnum] - attr_accessor :new_sheet_id - - # The id of the object to moved. - # Corresponds to the JSON property `objectId` - # @return [Fixnum] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # Updates all cells in a range with new data. - class UpdateCellsRequest - include Google::Apis::Core::Hashable - - # The data to write. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # The fields of CellData to that should be updated. - # At least one field must be specified. - # The root is the CellData; 'row.values.' should not be specified. - # Corresponds to the JSON property `cellDataFields` - # @return [String] - attr_accessor :cell_data_fields - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - # A coordinate in a sheet. - # All indexes are 0-based. - # Corresponds to the JSON property `start` - # @return [Google::Apis::SheetsV1::GridCoordinate] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rows = args[:rows] if args.key?(:rows) - @cell_data_fields = args[:cell_data_fields] if args.key?(:cell_data_fields) - @range = args[:range] if args.key?(:range) - @start = args[:start] if args.key?(:start) - end - end - - # Copies data from the source to the destination. - class CopyPasteRequest - include Google::Apis::Core::Hashable - - # How that data should be oriented when pasting. - # Corresponds to the JSON property `pasteOrientation` - # @return [String] - attr_accessor :paste_orientation - - # What kind of data to paste. - # Corresponds to the JSON property `pasteType` - # @return [String] - attr_accessor :paste_type - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :source - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `destination` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :destination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @paste_orientation = args[:paste_orientation] if args.key?(:paste_orientation) - @paste_type = args[:paste_type] if args.key?(:paste_type) - @source = args[:source] if args.key?(:source) - @destination = args[:destination] if args.key?(:destination) - end - end - - # A sheet in a spreadsheet. - class Sheet - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV1::SheetProperties] - attr_accessor :properties - - # The filter views in this sheet. - # Corresponds to the JSON property `filterViews` - # @return [Array] - attr_accessor :filter_views - - # The conditional format rules in this sheet. - # Corresponds to the JSON property `conditionalFormats` - # @return [Array] - attr_accessor :conditional_formats - - # The protected ranges in this sheet. - # Corresponds to the JSON property `protectedRanges` - # @return [Array] - attr_accessor :protected_ranges - - # The default filter associated with a sheet. - # Corresponds to the JSON property `basicFilter` - # @return [Google::Apis::SheetsV1::BasicFilter] - attr_accessor :basic_filter - - # The ranges that are merged together. - # Corresponds to the JSON property `merges` - # @return [Array] - attr_accessor :merges - - # Data in the grid, if this is a grid sheet. - # The number of GridData objects returned is dependent on the number of - # ranges requested on this sheet. For example, if this is representing - # Sheet1, and the spreadsheet was requested with ranges - # Sheet1!A1:C10 and Sheet1!D15:E20, then the first GridData will have a - # startRow/startColumn of 0, while the second one will have startRow of - # 14 (0-based row 15), and startColumn 3 (0-based column D). - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - @filter_views = args[:filter_views] if args.key?(:filter_views) - @conditional_formats = args[:conditional_formats] if args.key?(:conditional_formats) - @protected_ranges = args[:protected_ranges] if args.key?(:protected_ranges) - @basic_filter = args[:basic_filter] if args.key?(:basic_filter) - @merges = args[:merges] if args.key?(:merges) - @data = args[:data] if args.key?(:data) - end - end - - # The reply for batch updating a spreadsheet. - class BatchUpdateSpreadsheetResponse - include Google::Apis::Core::Hashable - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The reply of the updates. This maps 1:1 with the updates, although - # replies to some requests may be empty. - # Corresponds to the JSON property `replies` - # @return [Array] - attr_accessor :replies - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @replies = args[:replies] if args.key?(:replies) - end - end - - # Each kind of value a cell in a spreadsheet can have. - class ExtendedValue - include Google::Apis::Core::Hashable - - # An error in a cell. - # Corresponds to the JSON property `errorValue` - # @return [Google::Apis::SheetsV1::ErrorValue] - attr_accessor :error_value - - # Represents a formula. - # Corresponds to the JSON property `formulaValue` - # @return [String] - attr_accessor :formula_value - - # Represents a boolean value. - # Corresponds to the JSON property `boolValue` - # @return [Boolean] - attr_accessor :bool_value - alias_method :bool_value?, :bool_value - - # Represents a string value. - # Leading single quotes are not included. For example, if the user typed - # '123 into the UI, this would be represented as a string_value of "123". - # Corresponds to the JSON property `stringValue` - # @return [String] - attr_accessor :string_value - - # Represents a double value. - # Note: Dates, Times and DateTimes are represented as "serial numbers". - # See the note on GetValuesRequest.RenderedDateTimeOption.SERIAL_TIME for - # more information. - # Corresponds to the JSON property `numberValue` - # @return [Float] - attr_accessor :number_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @error_value = args[:error_value] if args.key?(:error_value) - @formula_value = args[:formula_value] if args.key?(:formula_value) - @bool_value = args[:bool_value] if args.key?(:bool_value) - @string_value = args[:string_value] if args.key?(:string_value) - @number_value = args[:number_value] if args.key?(:number_value) - end - end - - # Moves data from the source to the destination. - class CutPasteRequest - include Google::Apis::Core::Hashable - - # What kind of data to paste. All the source data will be cut, regardless - # of what is pasted. - # Corresponds to the JSON property `pasteType` - # @return [String] - attr_accessor :paste_type - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :source - - # A coordinate in a sheet. - # All indexes are 0-based. - # Corresponds to the JSON property `destination` - # @return [Google::Apis::SheetsV1::GridCoordinate] - attr_accessor :destination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @paste_type = args[:paste_type] if args.key?(:paste_type) - @source = args[:source] if args.key?(:source) - @destination = args[:destination] if args.key?(:destination) - end - end - - # A rule that applies a gradient color scale format, based on - # the interpolation points listed. The format of a cell will vary - # based on its contents as compared to the values of the interpolation - # points. - class GradientRule - include Google::Apis::Core::Hashable - - # A single interpolation point a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `maxpoint` - # @return [Google::Apis::SheetsV1::InterpolationPoint] - attr_accessor :maxpoint - - # A single interpolation point a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `midpoint` - # @return [Google::Apis::SheetsV1::InterpolationPoint] - attr_accessor :midpoint - - # A single interpolation point a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `minpoint` - # @return [Google::Apis::SheetsV1::InterpolationPoint] - attr_accessor :minpoint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @maxpoint = args[:maxpoint] if args.key?(:maxpoint) - @midpoint = args[:midpoint] if args.key?(:midpoint) - @minpoint = args[:minpoint] if args.key?(:minpoint) - end - end - - # Fills in more data based on existing data. - class AutoFillRequest - include Google::Apis::Core::Hashable - - # True if we should generate data with the "alternate" series. - # This differs based on the type and amount of source data. - # Corresponds to the JSON property `useAlternateSeries` - # @return [Boolean] - attr_accessor :use_alternate_series - alias_method :use_alternate_series?, :use_alternate_series - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - # A combination of a source range and how to extend that source. - # Corresponds to the JSON property `sourceAndDestination` - # @return [Google::Apis::SheetsV1::SourceAndDestination] - attr_accessor :source_and_destination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @use_alternate_series = args[:use_alternate_series] if args.key?(:use_alternate_series) - @range = args[:range] if args.key?(:range) - @source_and_destination = args[:source_and_destination] if args.key?(:source_and_destination) - end - end - - # Updates properties of the sheet with the specified sheet id. - # It is an error to specify read only fields in the field mask. - class UpdateSheetPropertiesRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root 'properties' is implied and should not be specified. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV1::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @properties = args[:properties] if args.key?(:properties) - end - end - - # Appends rows or columns to the end of a sheet. - class AppendDimensionRequest - include Google::Apis::Core::Hashable - - # The sheet to append rows or columns to. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The number of rows or columns to append. - # Corresponds to the JSON property `length` - # @return [Fixnum] - attr_accessor :length - - # Whether rows or columns should be appended. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @length = args[:length] if args.key?(:length) - @dimension = args[:dimension] if args.key?(:dimension) - end - end - - # A rule that may or may not match, depending on the condition. - class BooleanRule - include Google::Apis::Core::Hashable - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::SheetsV1::BooleanCondition] - attr_accessor :condition - - # The format of a cell. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV1::CellFormat] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @condition = args[:condition] if args.key?(:condition) - @format = args[:format] if args.key?(:format) - end - end - - # Adds a filter view. - class AddFilterViewRequest - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV1::FilterView] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - end - end - - # Properties of a grid. - class GridProperties - include Google::Apis::Core::Hashable - - # The number of columns in the grid. - # Corresponds to the JSON property `columnCount` - # @return [Fixnum] - attr_accessor :column_count - - # The number of rows in the grid. - # Corresponds to the JSON property `rowCount` - # @return [Fixnum] - attr_accessor :row_count - - # The number of rows that are frozen in the grid. - # Corresponds to the JSON property `frozenRowCount` - # @return [Fixnum] - attr_accessor :frozen_row_count - - # True if the grid isn't showing gridlines in the UI. - # Corresponds to the JSON property `hideGridlines` - # @return [Boolean] - attr_accessor :hide_gridlines - alias_method :hide_gridlines?, :hide_gridlines - - # The number of columns that are frozen in the grid. - # Corresponds to the JSON property `frozenColumnCount` - # @return [Fixnum] - attr_accessor :frozen_column_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_count = args[:column_count] if args.key?(:column_count) - @row_count = args[:row_count] if args.key?(:row_count) - @frozen_row_count = args[:frozen_row_count] if args.key?(:frozen_row_count) - @hide_gridlines = args[:hide_gridlines] if args.key?(:hide_gridlines) - @frozen_column_count = args[:frozen_column_count] if args.key?(:frozen_column_count) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Removes the named range with the given ID from the spreadsheet. - class DeleteNamedRangeRequest - include Google::Apis::Core::Hashable - - # The ID of the named range to delete. - # Corresponds to the JSON property `namedRangeId` - # @return [Fixnum] - attr_accessor :named_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - end - end - - # Sets a data validation rule to every cell in the range. - # To clear validation in a range, call this with no rule specified. - class SetDataValidationRequest - include Google::Apis::Core::Hashable - - # A data validation rule. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV1::DataValidationRule] - attr_accessor :rule - - # A range on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if "Sheet1" is grid ID 0, then: - # Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1 - # Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2 - # Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2 - # Sheet1 == sheet_id:0 - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as "#REF!". - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rule = args[:rule] if args.key?(:rule) - @range = args[:range] if args.key?(:range) - end - end - - # The response when retrieving more than one range of values in a spreadsheet. - class BatchGetValuesResponse - include Google::Apis::Core::Hashable - - # The requested values. The order of the ValueRanges is the same as the - # order of the requested ranges. - # Corresponds to the JSON property `valueRanges` - # @return [Array] - attr_accessor :value_ranges - - # The id of the spreadsheet to retrieve data from. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value_ranges = args[:value_ranges] if args.key?(:value_ranges) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - end - end - - # A single kind of update to apply to a spreadsheet. - class Request - include Google::Apis::Core::Hashable - - # Removes the named range with the given ID from the spreadsheet. - # Corresponds to the JSON property `deleteNamedRange` - # @return [Google::Apis::SheetsV1::DeleteNamedRangeRequest] - attr_accessor :delete_named_range - - # Updates properties of the named range with the specified named range id. - # It is an error to specify read only fields in the field mask. - # Corresponds to the JSON property `updateNamedRange` - # @return [Google::Apis::SheetsV1::UpdateNamedRangeRequest] - attr_accessor :update_named_range - - # Adds a filter view. - # Corresponds to the JSON property `addFilterView` - # @return [Google::Apis::SheetsV1::AddFilterViewRequest] - attr_accessor :add_filter_view - - # Updates properties of a spreadsheet. - # It is an error to specify read only fields in the field mask. - # Corresponds to the JSON property `updateSpreadsheetProperties` - # @return [Google::Apis::SheetsV1::UpdateSpreadsheetPropertiesRequest] - attr_accessor :update_spreadsheet_properties - - # Appends rows or columns to the end of a sheet. - # Corresponds to the JSON property `appendDimension` - # @return [Google::Apis::SheetsV1::AppendDimensionRequest] - attr_accessor :append_dimension - - # Moves an embedded object (such as a chart or image) to its own sheet. - # Corresponds to the JSON property `moveEmbeddedObjectToSheet` - # @return [Google::Apis::SheetsV1::MoveEmbeddedObjectToSheetRequest] - attr_accessor :move_embedded_object_to_sheet - - # Unmerges cells in the given range. - # Corresponds to the JSON property `unmergeCells` - # @return [Google::Apis::SheetsV1::UnmergeCellsRequest] - attr_accessor :unmerge_cells - - # Updates an existing protected range with the specified protected range id. - # Corresponds to the JSON property `updateProtectedRange` - # @return [Google::Apis::SheetsV1::UpdateProtectedRangeRequest] - attr_accessor :update_protected_range - - # Deletes a particular filter view. - # Corresponds to the JSON property `deleteFilterView` - # @return [Google::Apis::SheetsV1::DeleteFilterViewRequest] - attr_accessor :delete_filter_view - - # Clears the basic filter, if any exists on the sheet. - # Corresponds to the JSON property `clearBasicFilter` - # @return [Google::Apis::SheetsV1::ClearBasicFilterRequest] - attr_accessor :clear_basic_filter - - # Sorts data in rows based on a sort order per column. - # Corresponds to the JSON property `sortRange` - # @return [Google::Apis::SheetsV1::SortRangeRequest] - attr_accessor :sort_range - - # Sets a data validation rule to every cell in the range. - # To clear validation in a range, call this with no rule specified. - # Corresponds to the JSON property `setDataValidation` - # @return [Google::Apis::SheetsV1::SetDataValidationRequest] - attr_accessor :set_data_validation - - # Updates all cells in the range to the values in the given Cell object. - # Only the fields set in the fields will be updated. - # If writing a cell with a formula, the formula's ranges will automatically - # increment for each field in the range. - # For example, if writing a cell with formula `=A1` into range B2:C4, - # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, - # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. - # To keep the formula's ranges static, use the `$` indicator. - # For example, if the formula was `=$A$1`, then neither - # the row nor column would increment. - # Corresponds to the JSON property `repeatCell` - # @return [Google::Apis::SheetsV1::RepeatCellRequest] - attr_accessor :repeat_cell - - # Updates all cells in a range with new data. - # Corresponds to the JSON property `updateCells` - # @return [Google::Apis::SheetsV1::UpdateCellsRequest] - attr_accessor :update_cells - - # Updates properties of the filter view. - # Corresponds to the JSON property `updateFilterView` - # @return [Google::Apis::SheetsV1::UpdateFilterViewRequest] - attr_accessor :update_filter_view - - # Adds a new sheet. - # When a sheet is added at a given index, - # all subsequent sheets' indexes are incremented. - # Corresponds to the JSON property `addSheet` - # @return [Google::Apis::SheetsV1::AddSheetRequest] - attr_accessor :add_sheet - - # Updates properties of the sheet with the specified sheet id. - # It is an error to specify read only fields in the field mask. - # Corresponds to the JSON property `updateSheetProperties` - # @return [Google::Apis::SheetsV1::UpdateSheetPropertiesRequest] - attr_accessor :update_sheet_properties - - # Deletes the requested sheet. - # Corresponds to the JSON property `deleteSheet` - # @return [Google::Apis::SheetsV1::DeleteSheetRequest] - attr_accessor :delete_sheet - - # Updates properties of dimensions within the specified range. - # It is an error to specify read only fields in the field mask. - # Corresponds to the JSON property `updateDimensionProperties` - # @return [Google::Apis::SheetsV1::UpdateDimensionPropertiesRequest] - attr_accessor :update_dimension_properties - - # Deletes the protected range with the given id. - # Corresponds to the JSON property `deleteProtectedRange` - # @return [Google::Apis::SheetsV1::DeleteProtectedRangeRequest] - attr_accessor :delete_protected_range - - # Adds a new protected range. - # Corresponds to the JSON property `addProtectedRange` - # @return [Google::Apis::SheetsV1::AddProtectedRangeRequest] - attr_accessor :add_protected_range - - # Finds and replaces data in cells over a range, sheet, or all sheets. - # Corresponds to the JSON property `findReplace` - # @return [Google::Apis::SheetsV1::FindReplaceRequest] - attr_accessor :find_replace - - # Updates a conditional format rule at the given index, - # or moves a conditional format rule to another index. - # Corresponds to the JSON property `updateConditionalFormatRule` - # @return [Google::Apis::SheetsV1::UpdateConditionalFormatRuleRequest] - attr_accessor :update_conditional_format_rule - - # Sets the basic filter associated with a sheet. - # Corresponds to the JSON property `setBasicFilter` - # @return [Google::Apis::SheetsV1::SetBasicFilterRequest] - attr_accessor :set_basic_filter - - # Merges all cells in the range. - # Corresponds to the JSON property `mergeCells` - # @return [Google::Apis::SheetsV1::MergeCellsRequest] - attr_accessor :merge_cells - - # Deletes a conditional format rule at the given index. - # All subsequent rules' indexes are decremented. - # Corresponds to the JSON property `deleteConditionalFormatRule` - # @return [Google::Apis::SheetsV1::DeleteConditionalFormatRuleRequest] - attr_accessor :delete_conditional_format_rule - - # Deletes the dimensions from the sheet. - # Corresponds to the JSON property `deleteDimension` - # @return [Google::Apis::SheetsV1::DeleteDimensionRequest] - attr_accessor :delete_dimension - - # Inserts data into the spreadsheet starting at the specified coordinate. - # Corresponds to the JSON property `pasteData` - # @return [Google::Apis::SheetsV1::PasteDataRequest] - attr_accessor :paste_data - - # Deletes the embedded object with the given ID. - # Corresponds to the JSON property `deleteEmbeddedObject` - # @return [Google::Apis::SheetsV1::DeleteEmbeddedObjectRequest] - attr_accessor :delete_embedded_object - - # Adds a new conditional format rule at the given index. - # All subsequent rules' indexes are incremented. - # Corresponds to the JSON property `addConditionalFormatRule` - # @return [Google::Apis::SheetsV1::AddConditionalFormatRuleRequest] - attr_accessor :add_conditional_format_rule - - # Updates the borders of a range. - # If a field is not set in the request, that means the border remains as-is. - # For example, with two subsequent SetBorderRequests: - # 1) range: A1:A5 `` top: RED, bottom: WHITE `` - # 2) range: A1:A5 `` left: BLUE `` - # That would result in A1:A5 having a borders of - # `` top: RED, bottom: WHITE, left: BLUE ``. - # If you want to clear a border, explicitly set the style to `NONE`. - # Corresponds to the JSON property `updateBorders` - # @return [Google::Apis::SheetsV1::UpdateBordersRequest] - attr_accessor :update_borders - - # Automatically resizes one or more dimensions based on the contents - # of the cells in that dimension. - # Corresponds to the JSON property `autoResizeDimensions` - # @return [Google::Apis::SheetsV1::AutoResizeDimensionsRequest] - attr_accessor :auto_resize_dimensions - - # Duplicates the contents of a sheet. - # Corresponds to the JSON property `duplicateSheet` - # @return [Google::Apis::SheetsV1::DuplicateSheetRequest] - attr_accessor :duplicate_sheet - - # Duplicates a particular filter view. - # Corresponds to the JSON property `duplicateFilterView` - # @return [Google::Apis::SheetsV1::DuplicateFilterViewRequest] - attr_accessor :duplicate_filter_view - - # Moves data from the source to the destination. - # Corresponds to the JSON property `cutPaste` - # @return [Google::Apis::SheetsV1::CutPasteRequest] - attr_accessor :cut_paste - - # Adds new cells to the last row with data in a sheet, - # inserting new rows into the sheet if necessary. - # Corresponds to the JSON property `appendCells` - # @return [Google::Apis::SheetsV1::AppendCellsRequest] - attr_accessor :append_cells - - # Fills in more data based on existing data. - # Corresponds to the JSON property `autoFill` - # @return [Google::Apis::SheetsV1::AutoFillRequest] - attr_accessor :auto_fill - - # Adds a named range to the spreadsheet. - # Corresponds to the JSON property `addNamedRange` - # @return [Google::Apis::SheetsV1::AddNamedRangeRequest] - attr_accessor :add_named_range - - # Splits a column of text into multiple columns, - # based on a delimiter in each cell. - # Corresponds to the JSON property `textToColumns` - # @return [Google::Apis::SheetsV1::TextToColumnsRequest] - attr_accessor :text_to_columns - - # Moves one or more rows or columns. - # Corresponds to the JSON property `moveDimension` - # @return [Google::Apis::SheetsV1::MoveDimensionRequest] - attr_accessor :move_dimension - - # Inserts rows or columns in a sheet at a particular index. - # Corresponds to the JSON property `insertDimension` - # @return [Google::Apis::SheetsV1::InsertDimensionRequest] - attr_accessor :insert_dimension - - # Copies data from the source to the destination. - # Corresponds to the JSON property `copyPaste` - # @return [Google::Apis::SheetsV1::CopyPasteRequest] - attr_accessor :copy_paste - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @delete_named_range = args[:delete_named_range] if args.key?(:delete_named_range) - @update_named_range = args[:update_named_range] if args.key?(:update_named_range) - @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) - @update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties) - @append_dimension = args[:append_dimension] if args.key?(:append_dimension) - @move_embedded_object_to_sheet = args[:move_embedded_object_to_sheet] if args.key?(:move_embedded_object_to_sheet) - @unmerge_cells = args[:unmerge_cells] if args.key?(:unmerge_cells) - @update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range) - @delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view) - @clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter) - @sort_range = args[:sort_range] if args.key?(:sort_range) - @set_data_validation = args[:set_data_validation] if args.key?(:set_data_validation) - @repeat_cell = args[:repeat_cell] if args.key?(:repeat_cell) - @update_cells = args[:update_cells] if args.key?(:update_cells) - @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view) - @add_sheet = args[:add_sheet] if args.key?(:add_sheet) - @update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties) - @delete_sheet = args[:delete_sheet] if args.key?(:delete_sheet) - @update_dimension_properties = args[:update_dimension_properties] if args.key?(:update_dimension_properties) - @delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range) - @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) - @find_replace = args[:find_replace] if args.key?(:find_replace) - @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) - @set_basic_filter = args[:set_basic_filter] if args.key?(:set_basic_filter) - @merge_cells = args[:merge_cells] if args.key?(:merge_cells) - @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) - @delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension) - @paste_data = args[:paste_data] if args.key?(:paste_data) - @delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object) - @add_conditional_format_rule = args[:add_conditional_format_rule] if args.key?(:add_conditional_format_rule) - @update_borders = args[:update_borders] if args.key?(:update_borders) - @auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions) - @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) - @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) - @cut_paste = args[:cut_paste] if args.key?(:cut_paste) - @append_cells = args[:append_cells] if args.key?(:append_cells) - @auto_fill = args[:auto_fill] if args.key?(:auto_fill) - @add_named_range = args[:add_named_range] if args.key?(:add_named_range) - @text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns) - @move_dimension = args[:move_dimension] if args.key?(:move_dimension) - @insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension) - @copy_paste = args[:copy_paste] if args.key?(:copy_paste) - end - end - - # Inserts rows or columns in a sheet at a particular index. - class InsertDimensionRequest - include Google::Apis::Core::Hashable - - # Whether dimension properties should be extended from the dimensions - # before or after the newly inserted dimensions. - # True to inherit from the dimensions before (in which case the start - # index must be greater than 0), and false to inherit from the dimensions - # after. - # For example, if row index 0 has red background and row index 1 - # has a green background, then inserting 2 rows at index 1 can inherit - # either the green or red background. If inheritFromBefore is true, - # the two new rows will be red (because the row before the insertion point - # was red), whereas if inheritFromBefore is false, the two new rows will - # be green (because the rows after the insertion point were green). - # Corresponds to the JSON property `inheritFromBefore` - # @return [Boolean] - attr_accessor :inherit_from_before - alias_method :inherit_from_before?, :inherit_from_before - - # A range along a single dimension on a sheet. - # All indexes are 0-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV1::DimensionRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @inherit_from_before = args[:inherit_from_before] if args.key?(:inherit_from_before) - @range = args[:range] if args.key?(:range) - end - end - - # Deletes the embedded object with the given ID. - class DeleteEmbeddedObjectRequest - include Google::Apis::Core::Hashable - - # The ID of the embedded object to delete. - # Corresponds to the JSON property `objectId` - # @return [Fixnum] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # The result of deleting a conditional format rule. - class DeleteConditionalFormatRuleResponse - include Google::Apis::Core::Hashable - - # A rule describing a conditional format. - # Corresponds to the JSON property `deleted` - # @return [Google::Apis::SheetsV1::ConditionalFormatRule] - attr_accessor :deleted - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @deleted = args[:deleted] if args.key?(:deleted) - end - end - end - end -end diff --git a/generated/google/apis/sheets_v1/representations.rb b/generated/google/apis/sheets_v1/representations.rb deleted file mode 100644 index df2ccb505..000000000 --- a/generated/google/apis/sheets_v1/representations.rb +++ /dev/null @@ -1,1703 +0,0 @@ -# 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 'date' -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 SheetsV1 - - class MoveEmbeddedObjectToSheetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddNamedRangeResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateProtectedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Padding - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MergeCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddSheetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateConditionalFormatRuleRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TextFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridCoordinate - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateNamedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SpreadsheetProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CellData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UnmergeCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TextToColumnsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddProtectedRangeResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BooleanCondition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteProtectedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DimensionRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Response - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddConditionalFormatRuleRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FilterView - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SortRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TextFormatRun - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateConditionalFormatRuleResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FilterCriteria - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteDimensionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DataValidationRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateSpreadsheetPropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateValuesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ClearBasicFilterRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ConditionalFormatRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateBordersRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Borders - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Color - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddSheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddProtectedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ValueRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FindReplaceResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CellFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MoveDimensionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DimensionProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InterpolationPoint - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ErrorValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateSpreadsheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SheetProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ProtectedRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteConditionalFormatRuleRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SourceAndDestination - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ConditionValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PasteDataRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FindReplaceRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SortSpec - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CopySheetToAnotherSpreadsheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class NumberFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateDimensionPropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Editors - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Spreadsheet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateSheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddFilterViewResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateSheetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Border - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddNamedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AppendCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RowData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RepeatCellRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class NamedRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetBasicFilterRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AutoResizeDimensionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateFilterViewResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteSheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MoveEmbeddedObjectToSheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CopyPasteRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Sheet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateSpreadsheetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ExtendedValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CutPasteRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GradientRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AutoFillRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateSheetPropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AppendDimensionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BooleanRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteNamedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetDataValidationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchGetValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Request - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InsertDimensionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteEmbeddedObjectRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteConditionalFormatRuleResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MoveEmbeddedObjectToSheetResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV1::SheetProperties, decorator: Google::Apis::SheetsV1::SheetProperties::Representation - - end - end - - class AddNamedRangeResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range, as: 'namedRange', class: Google::Apis::SheetsV1::NamedRange, decorator: Google::Apis::SheetsV1::NamedRange::Representation - - end - end - - class UpdateProtectedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV1::ProtectedRange, decorator: Google::Apis::SheetsV1::ProtectedRange::Representation - - property :fields, as: 'fields' - end - end - - class Padding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :left, as: 'left' - property :right, as: 'right' - property :top, as: 'top' - property :bottom, as: 'bottom' - end - end - - class MergeCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :merge_type, as: 'mergeType' - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - end - end - - class AddSheetResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV1::SheetProperties, decorator: Google::Apis::SheetsV1::SheetProperties::Representation - - end - end - - class UpdateConditionalFormatRuleRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :index, as: 'index' - property :rule, as: 'rule', class: Google::Apis::SheetsV1::ConditionalFormatRule, decorator: Google::Apis::SheetsV1::ConditionalFormatRule::Representation - - property :new_index, as: 'newIndex' - end - end - - class TextFormat - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bold, as: 'bold' - property :italic, as: 'italic' - property :foreground_color, as: 'foregroundColor', class: Google::Apis::SheetsV1::Color, decorator: Google::Apis::SheetsV1::Color::Representation - - property :font_family, as: 'fontFamily' - property :strikethrough, as: 'strikethrough' - property :font_size, as: 'fontSize' - property :underline, as: 'underline' - end - end - - class GridCoordinate - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :row_index, as: 'rowIndex' - property :column_index, as: 'columnIndex' - end - end - - class DeleteFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter_id, as: 'filterId' - end - end - - class UpdateNamedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :named_range, as: 'namedRange', class: Google::Apis::SheetsV1::NamedRange, decorator: Google::Apis::SheetsV1::NamedRange::Representation - - end - end - - class SpreadsheetProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :time_zone, as: 'timeZone' - property :auto_recalc, as: 'autoRecalc' - property :locale, as: 'locale' - property :title, as: 'title' - property :default_format, as: 'defaultFormat', class: Google::Apis::SheetsV1::CellFormat, decorator: Google::Apis::SheetsV1::CellFormat::Representation - - end - end - - class CellData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :hyperlink, as: 'hyperlink' - property :effective_format, as: 'effectiveFormat', class: Google::Apis::SheetsV1::CellFormat, decorator: Google::Apis::SheetsV1::CellFormat::Representation - - property :note, as: 'note' - property :formatted_value, as: 'formattedValue' - property :data_validation, as: 'dataValidation', class: Google::Apis::SheetsV1::DataValidationRule, decorator: Google::Apis::SheetsV1::DataValidationRule::Representation - - property :user_entered_value, as: 'userEnteredValue', class: Google::Apis::SheetsV1::ExtendedValue, decorator: Google::Apis::SheetsV1::ExtendedValue::Representation - - property :user_entered_format, as: 'userEnteredFormat', class: Google::Apis::SheetsV1::CellFormat, decorator: Google::Apis::SheetsV1::CellFormat::Representation - - collection :text_format_runs, as: 'textFormatRuns', class: Google::Apis::SheetsV1::TextFormatRun, decorator: Google::Apis::SheetsV1::TextFormatRun::Representation - - property :effective_value, as: 'effectiveValue', class: Google::Apis::SheetsV1::ExtendedValue, decorator: Google::Apis::SheetsV1::ExtendedValue::Representation - - end - end - - class UnmergeCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - end - end - - class TextToColumnsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :delimiter_type, as: 'delimiterType' - property :delimiter, as: 'delimiter' - property :source, as: 'source', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - end - end - - class AddProtectedRangeResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV1::ProtectedRange, decorator: Google::Apis::SheetsV1::ProtectedRange::Representation - - end - end - - class BooleanCondition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :values, as: 'values', class: Google::Apis::SheetsV1::ConditionValue, decorator: Google::Apis::SheetsV1::ConditionValue::Representation - - property :type, as: 'type' - end - end - - class DeleteProtectedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range_id, as: 'protectedRangeId' - end - end - - class DimensionRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :end_index, as: 'endIndex' - property :sheet_id, as: 'sheetId' - property :start_index, as: 'startIndex' - property :dimension, as: 'dimension' - end - end - - class Response - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV1::AddFilterViewResponse, decorator: Google::Apis::SheetsV1::AddFilterViewResponse::Representation - - property :move_embedded_object_to_sheet, as: 'moveEmbeddedObjectToSheet', class: Google::Apis::SheetsV1::MoveEmbeddedObjectToSheetResponse, decorator: Google::Apis::SheetsV1::MoveEmbeddedObjectToSheetResponse::Representation - - property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV1::AddSheetResponse, decorator: Google::Apis::SheetsV1::AddSheetResponse::Representation - - property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV1::FindReplaceResponse, decorator: Google::Apis::SheetsV1::FindReplaceResponse::Representation - - property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV1::AddProtectedRangeResponse, decorator: Google::Apis::SheetsV1::AddProtectedRangeResponse::Representation - - property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV1::UpdateConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV1::UpdateConditionalFormatRuleResponse::Representation - - property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV1::DeleteConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV1::DeleteConditionalFormatRuleResponse::Representation - - property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV1::DuplicateSheetResponse, decorator: Google::Apis::SheetsV1::DuplicateSheetResponse::Representation - - property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV1::DuplicateFilterViewResponse, decorator: Google::Apis::SheetsV1::DuplicateFilterViewResponse::Representation - - property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV1::AddNamedRangeResponse, decorator: Google::Apis::SheetsV1::AddNamedRangeResponse::Representation - - end - end - - class AddConditionalFormatRuleRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :index, as: 'index' - property :rule, as: 'rule', class: Google::Apis::SheetsV1::ConditionalFormatRule, decorator: Google::Apis::SheetsV1::ConditionalFormatRule::Representation - - end - end - - class FilterView - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :title, as: 'title' - property :named_range_id, as: 'namedRangeId' - collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV1::SortSpec, decorator: Google::Apis::SheetsV1::SortSpec::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - hash :criteria, as: 'criteria', class: Google::Apis::SheetsV1::FilterCriteria, decorator: Google::Apis::SheetsV1::FilterCriteria::Representation - - property :filter_view_id, as: 'filterViewId' - end - end - - class SortRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV1::SortSpec, decorator: Google::Apis::SheetsV1::SortSpec::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - end - end - - class TextFormatRun - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_index, as: 'startIndex' - property :format, as: 'format', class: Google::Apis::SheetsV1::TextFormat, decorator: Google::Apis::SheetsV1::TextFormat::Representation - - end - end - - class UpdateFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :filter, as: 'filter', class: Google::Apis::SheetsV1::FilterView, decorator: Google::Apis::SheetsV1::FilterView::Representation - - end - end - - class UpdateConditionalFormatRuleResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :rule, as: 'rule', class: Google::Apis::SheetsV1::ConditionalFormatRule, decorator: Google::Apis::SheetsV1::ConditionalFormatRule::Representation - - end - end - - class FilterCriteria - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :condition, as: 'condition', class: Google::Apis::SheetsV1::BooleanCondition, decorator: Google::Apis::SheetsV1::BooleanCondition::Representation - - collection :hidden_values, as: 'hiddenValues' - end - end - - class DeleteDimensionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV1::DimensionRange, decorator: Google::Apis::SheetsV1::DimensionRange::Representation - - end - end - - class DataValidationRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :condition, as: 'condition', class: Google::Apis::SheetsV1::BooleanCondition, decorator: Google::Apis::SheetsV1::BooleanCondition::Representation - - property :input_message, as: 'inputMessage' - property :show_custom_ui, as: 'showCustomUi' - property :strict, as: 'strict' - end - end - - class UpdateSpreadsheetPropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :properties, as: 'properties', class: Google::Apis::SheetsV1::SpreadsheetProperties, decorator: Google::Apis::SheetsV1::SpreadsheetProperties::Representation - - end - end - - class BatchUpdateValuesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :data, as: 'data', class: Google::Apis::SheetsV1::ValueRange, decorator: Google::Apis::SheetsV1::ValueRange::Representation - - property :value_input_option, as: 'valueInputOption' - end - end - - class ClearBasicFilterRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - end - end - - class ConditionalFormatRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :gradient_rule, as: 'gradientRule', class: Google::Apis::SheetsV1::GradientRule, decorator: Google::Apis::SheetsV1::GradientRule::Representation - - property :boolean_rule, as: 'booleanRule', class: Google::Apis::SheetsV1::BooleanRule, decorator: Google::Apis::SheetsV1::BooleanRule::Representation - - collection :ranges, as: 'ranges', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - end - end - - class UpdateBordersRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :right, as: 'right', class: Google::Apis::SheetsV1::Border, decorator: Google::Apis::SheetsV1::Border::Representation - - property :inner_vertical, as: 'innerVertical', class: Google::Apis::SheetsV1::Border, decorator: Google::Apis::SheetsV1::Border::Representation - - property :top, as: 'top', class: Google::Apis::SheetsV1::Border, decorator: Google::Apis::SheetsV1::Border::Representation - - property :inner_horizontal, as: 'innerHorizontal', class: Google::Apis::SheetsV1::Border, decorator: Google::Apis::SheetsV1::Border::Representation - - property :bottom, as: 'bottom', class: Google::Apis::SheetsV1::Border, decorator: Google::Apis::SheetsV1::Border::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - property :left, as: 'left', class: Google::Apis::SheetsV1::Border, decorator: Google::Apis::SheetsV1::Border::Representation - - end - end - - class Borders - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :right, as: 'right', class: Google::Apis::SheetsV1::Border, decorator: Google::Apis::SheetsV1::Border::Representation - - property :left, as: 'left', class: Google::Apis::SheetsV1::Border, decorator: Google::Apis::SheetsV1::Border::Representation - - property :top, as: 'top', class: Google::Apis::SheetsV1::Border, decorator: Google::Apis::SheetsV1::Border::Representation - - property :bottom, as: 'bottom', class: Google::Apis::SheetsV1::Border, decorator: Google::Apis::SheetsV1::Border::Representation - - end - end - - class Color - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :green, as: 'green' - property :blue, as: 'blue' - property :red, as: 'red' - property :alpha, as: 'alpha' - end - end - - class AddSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV1::SheetProperties, decorator: Google::Apis::SheetsV1::SheetProperties::Representation - - end - end - - class AddProtectedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV1::ProtectedRange, decorator: Google::Apis::SheetsV1::ProtectedRange::Representation - - end - end - - class ValueRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :values, as: 'values', :class => Array do - include Representable::JSON::Collection - items - end - - property :range, as: 'range' - property :major_dimension, as: 'majorDimension' - end - end - - class FindReplaceResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :values_changed, as: 'valuesChanged' - property :rows_changed, as: 'rowsChanged' - property :occurrences_changed, as: 'occurrencesChanged' - property :sheets_changed, as: 'sheetsChanged' - property :formulas_changed, as: 'formulasChanged' - end - end - - class CellFormat - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :horizontal_alignment, as: 'horizontalAlignment' - property :hyperlink_display_type, as: 'hyperlinkDisplayType' - property :borders, as: 'borders', class: Google::Apis::SheetsV1::Borders, decorator: Google::Apis::SheetsV1::Borders::Representation - - property :text_direction, as: 'textDirection' - property :text_format, as: 'textFormat', class: Google::Apis::SheetsV1::TextFormat, decorator: Google::Apis::SheetsV1::TextFormat::Representation - - property :padding, as: 'padding', class: Google::Apis::SheetsV1::Padding, decorator: Google::Apis::SheetsV1::Padding::Representation - - property :number_format, as: 'numberFormat', class: Google::Apis::SheetsV1::NumberFormat, decorator: Google::Apis::SheetsV1::NumberFormat::Representation - - property :wrap_strategy, as: 'wrapStrategy' - property :background_color, as: 'backgroundColor', class: Google::Apis::SheetsV1::Color, decorator: Google::Apis::SheetsV1::Color::Representation - - property :vertical_alignment, as: 'verticalAlignment' - end - end - - class MoveDimensionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :destination_index, as: 'destinationIndex' - property :source, as: 'source', class: Google::Apis::SheetsV1::DimensionRange, decorator: Google::Apis::SheetsV1::DimensionRange::Representation - - end - end - - class DimensionProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :pixel_size, as: 'pixelSize' - property :hidden_by_user, as: 'hiddenByUser' - property :hidden_by_filter, as: 'hiddenByFilter' - end - end - - class InterpolationPoint - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' - property :color, as: 'color', class: Google::Apis::SheetsV1::Color, decorator: Google::Apis::SheetsV1::Color::Representation - - property :type, as: 'type' - end - end - - class ErrorValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :message, as: 'message' - end - end - - class DuplicateFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter_id, as: 'filterId' - end - end - - class BatchUpdateSpreadsheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :requests, as: 'requests', class: Google::Apis::SheetsV1::Request, decorator: Google::Apis::SheetsV1::Request::Representation - - end - end - - class SheetProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :title, as: 'title' - property :index, as: 'index' - property :hidden, as: 'hidden' - property :grid_properties, as: 'gridProperties', class: Google::Apis::SheetsV1::GridProperties, decorator: Google::Apis::SheetsV1::GridProperties::Representation - - property :sheet_id, as: 'sheetId' - property :right_to_left, as: 'rightToLeft' - property :tab_color, as: 'tabColor', class: Google::Apis::SheetsV1::Color, decorator: Google::Apis::SheetsV1::Color::Representation - - property :sheet_type, as: 'sheetType' - end - end - - class ProtectedRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :unprotected_ranges, as: 'unprotectedRanges', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - property :description, as: 'description' - property :named_range_id, as: 'namedRangeId' - property :requesting_user_can_edit, as: 'requestingUserCanEdit' - property :editors, as: 'editors', class: Google::Apis::SheetsV1::Editors, decorator: Google::Apis::SheetsV1::Editors::Representation - - property :protected_range_id, as: 'protectedRangeId' - property :warning_only, as: 'warningOnly' - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - end - end - - class DeleteConditionalFormatRuleRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :index, as: 'index' - end - end - - class SourceAndDestination - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fill_length, as: 'fillLength' - property :source, as: 'source', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - property :dimension, as: 'dimension' - end - end - - class ConditionValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :relative_date, as: 'relativeDate' - property :user_entered_value, as: 'userEnteredValue' - end - end - - class PasteDataRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :data, as: 'data' - property :coordinate, as: 'coordinate', class: Google::Apis::SheetsV1::GridCoordinate, decorator: Google::Apis::SheetsV1::GridCoordinate::Representation - - property :delimiter, as: 'delimiter' - property :type, as: 'type' - property :html, as: 'html' - end - end - - class FindReplaceRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :find, as: 'find' - property :replacement, as: 'replacement' - property :search_by_regex, as: 'searchByRegex' - property :sheet_id, as: 'sheetId' - property :all_sheets, as: 'allSheets' - property :match_case, as: 'matchCase' - property :include_formulas, as: 'includeFormulas' - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - property :match_entire_cell, as: 'matchEntireCell' - end - end - - class SortSpec - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sort_order, as: 'sortOrder' - property :dimension_index, as: 'dimensionIndex' - end - end - - class CopySheetToAnotherSpreadsheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :destination_spreadsheet_id, as: 'destinationSpreadsheetId' - end - end - - class NumberFormat - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :pattern, as: 'pattern' - property :type, as: 'type' - end - end - - class UpdateDimensionPropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :properties, as: 'properties', class: Google::Apis::SheetsV1::DimensionProperties, decorator: Google::Apis::SheetsV1::DimensionProperties::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV1::DimensionRange, decorator: Google::Apis::SheetsV1::DimensionRange::Representation - - end - end - - class Editors - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :domain_users_can_edit, as: 'domainUsersCanEdit' - collection :groups, as: 'groups' - collection :users, as: 'users' - end - end - - class Spreadsheet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - property :properties, as: 'properties', class: Google::Apis::SheetsV1::SpreadsheetProperties, decorator: Google::Apis::SheetsV1::SpreadsheetProperties::Representation - - collection :named_ranges, as: 'namedRanges', class: Google::Apis::SheetsV1::NamedRange, decorator: Google::Apis::SheetsV1::NamedRange::Representation - - collection :sheets, as: 'sheets', class: Google::Apis::SheetsV1::Sheet, decorator: Google::Apis::SheetsV1::Sheet::Representation - - end - end - - class GridData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :column_metadata, as: 'columnMetadata', class: Google::Apis::SheetsV1::DimensionProperties, decorator: Google::Apis::SheetsV1::DimensionProperties::Representation - - collection :row_data, as: 'rowData', class: Google::Apis::SheetsV1::RowData, decorator: Google::Apis::SheetsV1::RowData::Representation - - collection :row_metadata, as: 'rowMetadata', class: Google::Apis::SheetsV1::DimensionProperties, decorator: Google::Apis::SheetsV1::DimensionProperties::Representation - - property :start_row, as: 'startRow' - property :start_column, as: 'startColumn' - end - end - - class BasicFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :criteria, as: 'criteria', class: Google::Apis::SheetsV1::FilterCriteria, decorator: Google::Apis::SheetsV1::FilterCriteria::Representation - - collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV1::SortSpec, decorator: Google::Apis::SheetsV1::SortSpec::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - end - end - - class DuplicateSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :new_sheet_id, as: 'newSheetId' - property :source_sheet_id, as: 'sourceSheetId' - property :new_sheet_name, as: 'newSheetName' - property :insert_sheet_index, as: 'insertSheetIndex' - end - end - - class AddFilterViewResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV1::FilterView, decorator: Google::Apis::SheetsV1::FilterView::Representation - - end - end - - class DuplicateSheetResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV1::SheetProperties, decorator: Google::Apis::SheetsV1::SheetProperties::Representation - - end - end - - class Border - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :width, as: 'width' - property :style, as: 'style' - property :color, as: 'color', class: Google::Apis::SheetsV1::Color, decorator: Google::Apis::SheetsV1::Color::Representation - - end - end - - class AddNamedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range, as: 'namedRange', class: Google::Apis::SheetsV1::NamedRange, decorator: Google::Apis::SheetsV1::NamedRange::Representation - - end - end - - class AppendCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - collection :rows, as: 'rows', class: Google::Apis::SheetsV1::RowData, decorator: Google::Apis::SheetsV1::RowData::Representation - - property :cell_data_fields, as: 'cellDataFields' - end - end - - class RowData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :values, as: 'values', class: Google::Apis::SheetsV1::CellData, decorator: Google::Apis::SheetsV1::CellData::Representation - - end - end - - class RepeatCellRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :cell, as: 'cell', class: Google::Apis::SheetsV1::CellData, decorator: Google::Apis::SheetsV1::CellData::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - end - end - - class NamedRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - property :named_range_id, as: 'namedRangeId' - property :name, as: 'name' - end - end - - class SetBasicFilterRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV1::BasicFilter, decorator: Google::Apis::SheetsV1::BasicFilter::Representation - - end - end - - class AutoResizeDimensionsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dimensions, as: 'dimensions', class: Google::Apis::SheetsV1::DimensionRange, decorator: Google::Apis::SheetsV1::DimensionRange::Representation - - end - end - - class DuplicateFilterViewResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV1::FilterView, decorator: Google::Apis::SheetsV1::FilterView::Representation - - end - end - - class GridRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_column_index, as: 'startColumnIndex' - property :sheet_id, as: 'sheetId' - property :end_column_index, as: 'endColumnIndex' - property :end_row_index, as: 'endRowIndex' - property :start_row_index, as: 'startRowIndex' - end - end - - class DeleteSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - end - end - - class MoveEmbeddedObjectToSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :new_sheet_id, as: 'newSheetId' - property :object_id_prop, as: 'objectId' - end - end - - class UpdateCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :rows, as: 'rows', class: Google::Apis::SheetsV1::RowData, decorator: Google::Apis::SheetsV1::RowData::Representation - - property :cell_data_fields, as: 'cellDataFields' - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - property :start, as: 'start', class: Google::Apis::SheetsV1::GridCoordinate, decorator: Google::Apis::SheetsV1::GridCoordinate::Representation - - end - end - - class CopyPasteRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :paste_orientation, as: 'pasteOrientation' - property :paste_type, as: 'pasteType' - property :source, as: 'source', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - property :destination, as: 'destination', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - end - end - - class Sheet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV1::SheetProperties, decorator: Google::Apis::SheetsV1::SheetProperties::Representation - - collection :filter_views, as: 'filterViews', class: Google::Apis::SheetsV1::FilterView, decorator: Google::Apis::SheetsV1::FilterView::Representation - - collection :conditional_formats, as: 'conditionalFormats', class: Google::Apis::SheetsV1::ConditionalFormatRule, decorator: Google::Apis::SheetsV1::ConditionalFormatRule::Representation - - collection :protected_ranges, as: 'protectedRanges', class: Google::Apis::SheetsV1::ProtectedRange, decorator: Google::Apis::SheetsV1::ProtectedRange::Representation - - property :basic_filter, as: 'basicFilter', class: Google::Apis::SheetsV1::BasicFilter, decorator: Google::Apis::SheetsV1::BasicFilter::Representation - - collection :merges, as: 'merges', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - collection :data, as: 'data', class: Google::Apis::SheetsV1::GridData, decorator: Google::Apis::SheetsV1::GridData::Representation - - end - end - - class BatchUpdateSpreadsheetResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - collection :replies, as: 'replies', class: Google::Apis::SheetsV1::Response, decorator: Google::Apis::SheetsV1::Response::Representation - - end - end - - class ExtendedValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :error_value, as: 'errorValue', class: Google::Apis::SheetsV1::ErrorValue, decorator: Google::Apis::SheetsV1::ErrorValue::Representation - - property :formula_value, as: 'formulaValue' - property :bool_value, as: 'boolValue' - property :string_value, as: 'stringValue' - property :number_value, as: 'numberValue' - end - end - - class CutPasteRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :paste_type, as: 'pasteType' - property :source, as: 'source', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - property :destination, as: 'destination', class: Google::Apis::SheetsV1::GridCoordinate, decorator: Google::Apis::SheetsV1::GridCoordinate::Representation - - end - end - - class GradientRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :maxpoint, as: 'maxpoint', class: Google::Apis::SheetsV1::InterpolationPoint, decorator: Google::Apis::SheetsV1::InterpolationPoint::Representation - - property :midpoint, as: 'midpoint', class: Google::Apis::SheetsV1::InterpolationPoint, decorator: Google::Apis::SheetsV1::InterpolationPoint::Representation - - property :minpoint, as: 'minpoint', class: Google::Apis::SheetsV1::InterpolationPoint, decorator: Google::Apis::SheetsV1::InterpolationPoint::Representation - - end - end - - class AutoFillRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :use_alternate_series, as: 'useAlternateSeries' - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - property :source_and_destination, as: 'sourceAndDestination', class: Google::Apis::SheetsV1::SourceAndDestination, decorator: Google::Apis::SheetsV1::SourceAndDestination::Representation - - end - end - - class UpdateSheetPropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :properties, as: 'properties', class: Google::Apis::SheetsV1::SheetProperties, decorator: Google::Apis::SheetsV1::SheetProperties::Representation - - end - end - - class AppendDimensionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :length, as: 'length' - property :dimension, as: 'dimension' - end - end - - class BooleanRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :condition, as: 'condition', class: Google::Apis::SheetsV1::BooleanCondition, decorator: Google::Apis::SheetsV1::BooleanCondition::Representation - - property :format, as: 'format', class: Google::Apis::SheetsV1::CellFormat, decorator: Google::Apis::SheetsV1::CellFormat::Representation - - end - end - - class AddFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV1::FilterView, decorator: Google::Apis::SheetsV1::FilterView::Representation - - end - end - - class GridProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :column_count, as: 'columnCount' - property :row_count, as: 'rowCount' - property :frozen_row_count, as: 'frozenRowCount' - property :hide_gridlines, as: 'hideGridlines' - property :frozen_column_count, as: 'frozenColumnCount' - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class DeleteNamedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range_id, as: 'namedRangeId' - end - end - - class SetDataValidationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :rule, as: 'rule', class: Google::Apis::SheetsV1::DataValidationRule, decorator: Google::Apis::SheetsV1::DataValidationRule::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV1::GridRange, decorator: Google::Apis::SheetsV1::GridRange::Representation - - end - end - - class BatchGetValuesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :value_ranges, as: 'valueRanges', class: Google::Apis::SheetsV1::ValueRange, decorator: Google::Apis::SheetsV1::ValueRange::Representation - - property :spreadsheet_id, as: 'spreadsheetId' - end - end - - class Request - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :delete_named_range, as: 'deleteNamedRange', class: Google::Apis::SheetsV1::DeleteNamedRangeRequest, decorator: Google::Apis::SheetsV1::DeleteNamedRangeRequest::Representation - - property :update_named_range, as: 'updateNamedRange', class: Google::Apis::SheetsV1::UpdateNamedRangeRequest, decorator: Google::Apis::SheetsV1::UpdateNamedRangeRequest::Representation - - property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV1::AddFilterViewRequest, decorator: Google::Apis::SheetsV1::AddFilterViewRequest::Representation - - property :update_spreadsheet_properties, as: 'updateSpreadsheetProperties', class: Google::Apis::SheetsV1::UpdateSpreadsheetPropertiesRequest, decorator: Google::Apis::SheetsV1::UpdateSpreadsheetPropertiesRequest::Representation - - property :append_dimension, as: 'appendDimension', class: Google::Apis::SheetsV1::AppendDimensionRequest, decorator: Google::Apis::SheetsV1::AppendDimensionRequest::Representation - - property :move_embedded_object_to_sheet, as: 'moveEmbeddedObjectToSheet', class: Google::Apis::SheetsV1::MoveEmbeddedObjectToSheetRequest, decorator: Google::Apis::SheetsV1::MoveEmbeddedObjectToSheetRequest::Representation - - property :unmerge_cells, as: 'unmergeCells', class: Google::Apis::SheetsV1::UnmergeCellsRequest, decorator: Google::Apis::SheetsV1::UnmergeCellsRequest::Representation - - property :update_protected_range, as: 'updateProtectedRange', class: Google::Apis::SheetsV1::UpdateProtectedRangeRequest, decorator: Google::Apis::SheetsV1::UpdateProtectedRangeRequest::Representation - - property :delete_filter_view, as: 'deleteFilterView', class: Google::Apis::SheetsV1::DeleteFilterViewRequest, decorator: Google::Apis::SheetsV1::DeleteFilterViewRequest::Representation - - property :clear_basic_filter, as: 'clearBasicFilter', class: Google::Apis::SheetsV1::ClearBasicFilterRequest, decorator: Google::Apis::SheetsV1::ClearBasicFilterRequest::Representation - - property :sort_range, as: 'sortRange', class: Google::Apis::SheetsV1::SortRangeRequest, decorator: Google::Apis::SheetsV1::SortRangeRequest::Representation - - property :set_data_validation, as: 'setDataValidation', class: Google::Apis::SheetsV1::SetDataValidationRequest, decorator: Google::Apis::SheetsV1::SetDataValidationRequest::Representation - - property :repeat_cell, as: 'repeatCell', class: Google::Apis::SheetsV1::RepeatCellRequest, decorator: Google::Apis::SheetsV1::RepeatCellRequest::Representation - - property :update_cells, as: 'updateCells', class: Google::Apis::SheetsV1::UpdateCellsRequest, decorator: Google::Apis::SheetsV1::UpdateCellsRequest::Representation - - property :update_filter_view, as: 'updateFilterView', class: Google::Apis::SheetsV1::UpdateFilterViewRequest, decorator: Google::Apis::SheetsV1::UpdateFilterViewRequest::Representation - - property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV1::AddSheetRequest, decorator: Google::Apis::SheetsV1::AddSheetRequest::Representation - - property :update_sheet_properties, as: 'updateSheetProperties', class: Google::Apis::SheetsV1::UpdateSheetPropertiesRequest, decorator: Google::Apis::SheetsV1::UpdateSheetPropertiesRequest::Representation - - property :delete_sheet, as: 'deleteSheet', class: Google::Apis::SheetsV1::DeleteSheetRequest, decorator: Google::Apis::SheetsV1::DeleteSheetRequest::Representation - - property :update_dimension_properties, as: 'updateDimensionProperties', class: Google::Apis::SheetsV1::UpdateDimensionPropertiesRequest, decorator: Google::Apis::SheetsV1::UpdateDimensionPropertiesRequest::Representation - - property :delete_protected_range, as: 'deleteProtectedRange', class: Google::Apis::SheetsV1::DeleteProtectedRangeRequest, decorator: Google::Apis::SheetsV1::DeleteProtectedRangeRequest::Representation - - property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV1::AddProtectedRangeRequest, decorator: Google::Apis::SheetsV1::AddProtectedRangeRequest::Representation - - property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV1::FindReplaceRequest, decorator: Google::Apis::SheetsV1::FindReplaceRequest::Representation - - property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV1::UpdateConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV1::UpdateConditionalFormatRuleRequest::Representation - - property :set_basic_filter, as: 'setBasicFilter', class: Google::Apis::SheetsV1::SetBasicFilterRequest, decorator: Google::Apis::SheetsV1::SetBasicFilterRequest::Representation - - property :merge_cells, as: 'mergeCells', class: Google::Apis::SheetsV1::MergeCellsRequest, decorator: Google::Apis::SheetsV1::MergeCellsRequest::Representation - - property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV1::DeleteConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV1::DeleteConditionalFormatRuleRequest::Representation - - property :delete_dimension, as: 'deleteDimension', class: Google::Apis::SheetsV1::DeleteDimensionRequest, decorator: Google::Apis::SheetsV1::DeleteDimensionRequest::Representation - - property :paste_data, as: 'pasteData', class: Google::Apis::SheetsV1::PasteDataRequest, decorator: Google::Apis::SheetsV1::PasteDataRequest::Representation - - property :delete_embedded_object, as: 'deleteEmbeddedObject', class: Google::Apis::SheetsV1::DeleteEmbeddedObjectRequest, decorator: Google::Apis::SheetsV1::DeleteEmbeddedObjectRequest::Representation - - property :add_conditional_format_rule, as: 'addConditionalFormatRule', class: Google::Apis::SheetsV1::AddConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV1::AddConditionalFormatRuleRequest::Representation - - property :update_borders, as: 'updateBorders', class: Google::Apis::SheetsV1::UpdateBordersRequest, decorator: Google::Apis::SheetsV1::UpdateBordersRequest::Representation - - property :auto_resize_dimensions, as: 'autoResizeDimensions', class: Google::Apis::SheetsV1::AutoResizeDimensionsRequest, decorator: Google::Apis::SheetsV1::AutoResizeDimensionsRequest::Representation - - property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV1::DuplicateSheetRequest, decorator: Google::Apis::SheetsV1::DuplicateSheetRequest::Representation - - property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV1::DuplicateFilterViewRequest, decorator: Google::Apis::SheetsV1::DuplicateFilterViewRequest::Representation - - property :cut_paste, as: 'cutPaste', class: Google::Apis::SheetsV1::CutPasteRequest, decorator: Google::Apis::SheetsV1::CutPasteRequest::Representation - - property :append_cells, as: 'appendCells', class: Google::Apis::SheetsV1::AppendCellsRequest, decorator: Google::Apis::SheetsV1::AppendCellsRequest::Representation - - property :auto_fill, as: 'autoFill', class: Google::Apis::SheetsV1::AutoFillRequest, decorator: Google::Apis::SheetsV1::AutoFillRequest::Representation - - property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV1::AddNamedRangeRequest, decorator: Google::Apis::SheetsV1::AddNamedRangeRequest::Representation - - property :text_to_columns, as: 'textToColumns', class: Google::Apis::SheetsV1::TextToColumnsRequest, decorator: Google::Apis::SheetsV1::TextToColumnsRequest::Representation - - property :move_dimension, as: 'moveDimension', class: Google::Apis::SheetsV1::MoveDimensionRequest, decorator: Google::Apis::SheetsV1::MoveDimensionRequest::Representation - - property :insert_dimension, as: 'insertDimension', class: Google::Apis::SheetsV1::InsertDimensionRequest, decorator: Google::Apis::SheetsV1::InsertDimensionRequest::Representation - - property :copy_paste, as: 'copyPaste', class: Google::Apis::SheetsV1::CopyPasteRequest, decorator: Google::Apis::SheetsV1::CopyPasteRequest::Representation - - end - end - - class InsertDimensionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :inherit_from_before, as: 'inheritFromBefore' - property :range, as: 'range', class: Google::Apis::SheetsV1::DimensionRange, decorator: Google::Apis::SheetsV1::DimensionRange::Representation - - end - end - - class DeleteEmbeddedObjectRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - end - end - - class DeleteConditionalFormatRuleResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :deleted, as: 'deleted', class: Google::Apis::SheetsV1::ConditionalFormatRule, decorator: Google::Apis::SheetsV1::ConditionalFormatRule::Representation - - end - end - end - end -end diff --git a/generated/google/apis/sheets_v1/service.rb b/generated/google/apis/sheets_v1/service.rb deleted file mode 100644 index 08d0412fb..000000000 --- a/generated/google/apis/sheets_v1/service.rb +++ /dev/null @@ -1,363 +0,0 @@ -# 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 SheetsV1 - # Google Sheets API - # - # An API for reading and modifying Google Sheets. - # - # @example - # require 'google/apis/sheets_v1' - # - # Sheets = Google::Apis::SheetsV1 # Alias the module - # service = Sheets::SheetsService.new - # - # @see - class SheetsService < Google::Apis::Core::BaseService - # @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 - - # @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 - - def initialize - super('https://sheets.googleapis.com/', '') - end - - # 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, - # or FieldMaskContext.response_mask in the request extensions in an RPC), or - # by setting 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. - # To retrieve only subsets of the spreadsheet, use the ?range 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. - # @param [String] spreadsheet_id - # The spreadsheet to request. - # @param [Array, String] ranges - # The ranges to retrieve from the spreadsheet. - # @param [Boolean] include_grid_data - # True if grid data should be returned. - # This parameter is ignored if a field mask was set in the request. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV1::Spreadsheet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV1::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, ranges: nil, include_grid_data: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/spreadsheets/{spreadsheetId}', options) - command.response_representation = Google::Apis::SheetsV1::Spreadsheet::Representation - command.response_class = Google::Apis::SheetsV1::Spreadsheet - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['ranges'] = ranges unless ranges.nil? - command.query['includeGridData'] = include_grid_data unless include_grid_data.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # 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 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 all the updates in the request will be - # applied atomically. Your changes may be altered with respect to - # collaborator changes. If there are no collaborators, the spreadsheet - # should reflect your changes. - # @param [String] spreadsheet_id - # The spreadsheet to apply the updates to. - # @param [Google::Apis::SheetsV1::BatchUpdateSpreadsheetRequest] batch_update_spreadsheet_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV1::BatchUpdateSpreadsheetResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV1::BatchUpdateSpreadsheetResponse] - # - # @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_spreadsheet(spreadsheet_id, batch_update_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/spreadsheets/{spreadsheetId}:batchUpdate', options) - command.request_representation = Google::Apis::SheetsV1::BatchUpdateSpreadsheetRequest::Representation - command.request_object = batch_update_spreadsheet_request_object - command.response_representation = Google::Apis::SheetsV1::BatchUpdateSpreadsheetResponse::Representation - command.response_class = Google::Apis::SheetsV1::BatchUpdateSpreadsheetResponse - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Sets values in a range of a spreadsheet. - # The caller must specify the spreadsheet ID, range, and valueInputOption. - # @param [String] spreadsheet_id - # The id of the spreadsheet to update. - # @param [String] range - # The A1 notation of the values to update. - # @param [Google::Apis::SheetsV1::ValueRange] value_range_object - # @param [String] value_input_option - # How the input data should be interpreted. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV1::Empty] - # - # @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 update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/spreadsheets/{spreadsheetId}/values/{range}', options) - command.request_representation = Google::Apis::SheetsV1::ValueRange::Representation - command.request_object = value_range_object - command.response_representation = Google::Apis::SheetsV1::Empty::Representation - command.response_class = Google::Apis::SheetsV1::Empty - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['range'] = range unless range.nil? - command.query['valueInputOption'] = value_input_option unless value_input_option.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns one or more ranges of values from a spreadsheet. - # The caller must specify the spreadsheet ID and one or more ranges. - # @param [String] spreadsheet_id - # The id of the spreadsheet to retrieve data from. - # @param [String] date_time_render_option - # How dates, times, and durations should be represented in the output. - # This is ignored if valueRenderOption is FORMATTED_VALUE. - # @param [String] value_render_option - # How values should be represented in the output. - # @param [Array, String] ranges - # The A1 notation of the values to retrieve. - # @param [String] major_dimension - # 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 will return [[1,2],[3,4]], - # whereas requesting range=A1:B2,majorDimension=COLUMNS will return - # [[1,3],[2,4]]. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV1::BatchGetValuesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV1::BatchGetValuesResponse] - # - # @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(spreadsheet_id, date_time_render_option: nil, value_render_option: nil, ranges: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/spreadsheets/{spreadsheetId}/values:batchGet', options) - command.response_representation = Google::Apis::SheetsV1::BatchGetValuesResponse::Representation - command.response_class = Google::Apis::SheetsV1::BatchGetValuesResponse - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? - command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? - command.query['ranges'] = ranges unless ranges.nil? - command.query['majorDimension'] = major_dimension unless major_dimension.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a range of values from a spreadsheet. - # The caller must specify the spreadsheet ID and a range. - # @param [String] spreadsheet_id - # The id of the spreadsheet to retrieve data from. - # @param [String] range - # The A1 notation of the values to retrieve. - # @param [String] date_time_render_option - # How dates, times, and durations should be represented in the output. - # This is ignored if the valueRenderOption option is FORMATTED_VALUE. - # @param [String] value_render_option - # How values should be represented in the output. - # @param [String] major_dimension - # 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 will return [[1,2],[3,4]], - # whereas requesting range=A1:B2,majorDimension=COLUMNS will return - # [[1,3],[2,4]]. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV1::ValueRange] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV1::ValueRange] - # - # @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_value(spreadsheet_id, range, date_time_render_option: nil, value_render_option: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/spreadsheets/{spreadsheetId}/values/{range}', options) - command.response_representation = Google::Apis::SheetsV1::ValueRange::Representation - command.response_class = Google::Apis::SheetsV1::ValueRange - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['range'] = range unless range.nil? - command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? - command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? - command.query['majorDimension'] = major_dimension unless major_dimension.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Sets values in a range of a spreadsheet. - # The caller must specify the spreadsheet ID, valueInputOption, and one - # or more ValueRanges. - # @param [String] spreadsheet_id - # The id of the spreadsheet to update. - # @param [Google::Apis::SheetsV1::BatchUpdateValuesRequest] batch_update_values_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV1::Empty] - # - # @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, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/spreadsheets/{spreadsheetId}/values:batchUpdate', options) - command.request_representation = Google::Apis::SheetsV1::BatchUpdateValuesRequest::Representation - command.request_object = batch_update_values_request_object - command.response_representation = Google::Apis::SheetsV1::Empty::Representation - command.response_class = Google::Apis::SheetsV1::Empty - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Copies a single sheet from a spreadsheet to another spreadsheet. - # Returns the properties of the newly created sheet. - # @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::SheetsV1::CopySheetToAnotherSpreadsheetRequest] copy_sheet_to_another_spreadsheet_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV1::SheetProperties] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV1::SheetProperties] - # - # @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 copy_spreadsheet_sheet_to(spreadsheet_id, sheet_id, copy_sheet_to_another_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo', options) - command.request_representation = Google::Apis::SheetsV1::CopySheetToAnotherSpreadsheetRequest::Representation - command.request_object = copy_sheet_to_another_spreadsheet_request_object - command.response_representation = Google::Apis::SheetsV1::SheetProperties::Representation - command.response_class = Google::Apis::SheetsV1::SheetProperties - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['sheetId'] = sheet_id unless sheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - protected - - def apply_command_defaults(command) - command.query['key'] = key unless key.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - end - end - end - end -end